A method for determining a coding cost of a coding unit, CU, performed by a server, the method comprising: determining a CU subject to predictive coding in an intra-frame prediction mode and obtaining a first coding cost by performing the predictive coding on the CU using a current size of the CU as a size of a prediction unit, PU; determining pixel gradient information corresponding to the CU, the pixel gradient information comprising a pixel gradient variance, and the pixel gradient variance being a variance of image gradients of at least some pixels in the CU; making a division predecision on the CU according to the pixel gradient information indicating whether the CU is to be divided; dividing the CU into at least two sub-CUs in a case that a result of the division predecision on the CU is positive; performing, by using each of the at least two sub-CUs as a new CU subject to predictive coding in the intra-frame prediction mode, the method for determining a coding cost of a CU, to determine a coding cost of each of the at least two sub-CUs; determining a first coding cost as a second coding cost of the CU in a case that a sum of coding costs of the at least two sub-CUs is greater than or equal to the first coding cost; and determining the sum of the coding costs of the at least two sub-CUs as the second coding cost of the CU in a case that the sum of the coding costs of the at least two sub-CUs is less than the first coding cost; and determining the first coding cost as the second coding cost of the CU in a case that the result of the division predecision on the CU is negative, wherein the second coding cost is used for determining a division policy of a coding tree unit, CTU, corresponding to the CU. determining a CU subject to predictive coding in an intra-frame prediction mode and obtaining a first coding cost by performing the predictive coding on the CU using a current size of the CU as a size of a prediction unit, PU; determining pixel gradient information corresponding to the CU, the pixel gradient information comprising a pixel gradient variance, and the pixel gradient variance being a variance of image gradients of at least some pixels in the CU; making a division predecision on the CU according to the pixel gradient information indicating whether the CU is to be divided; dividing the CU into at least two sub-CUs in a case that a result of the division predecision on the CU is positive; performing, by using each of the at least two sub-CUs as a new CU subject to predictive coding in the intra-frame prediction mode, the method for determining a coding cost of a CU, to determine a coding cost of each of the at least two sub-CUs; determining a first coding cost as a second coding cost of the CU in a case that a sum of coding costs of the at least two sub-CUs is greater than or equal to the first coding cost; and determining the sum of the coding costs of the at least two sub-CUs as the second coding cost of the CU in a case that the sum of the coding costs of the at least two sub-CUs is less than the first coding cost; and determining the first coding cost as the second coding cost of the CU in a case that the result of the division predecision on the CU is negative, wherein the second coding cost is used for determining a division policy of a coding tree unit, CTU, corresponding to the CU.