Patent ID: 8306124

Claim:
An encoding method used by a digital television, new generation mobile communication apparatus, broadband communications network apparatus or family consumer electronics apparatus for skipped macroblocks in a video image, characterized in that it comprises the steps of: step 1 , adding one indication bit into a picture header for indicating a coding mode for skipped macroblocks in a current image; step 2 , selecting a run_length coding mode or a joint coding mode of the number of skipped macroblocks and the macroblock types for a macroblock type in the current image according to the number of skipped macroblocks, wherein the run_length coding mode is employed for the current image with a plurality of skipped macroblock, and the joint coding mode is employed for the current image with few skipped macroblocks, wherein the run_length coding mode is to employ a variable_length coding to encode the number of skipped macroblocks for continuous skipped macroblocks; and add one indication bit between continuous non-skipped macroblocks to indicate that the number of skipped macroblocks is 0, wherein selecting a run_length coding mode or a joint coding mode of the number of skipped macroblocks and the macroblock types for a macroblock type in the current image is through a twice encoding procedure comprising the particular steps of: step 200 , employing the run_length coding mode for all the macroblocks in the current image to be coded, and obtaining corresponding coding performance parameters after above processing; step 201 , secondly encoding the current image to be coded, employing the joint coding mode of the number of skipped macroblocks and the macroblock type for all the macroblocks, and obtaining corresponding coding performance parameters after above processing; step 202 , comparing the performance parameters obtained from the twice encoding, and selecting an optimal coding mode for the skipped macroblocks in the current image, if it is the run_length coding mode, then proceeding to step 3 ; if it is the joint coding mode of the number of skipped macroblocks and the macroblock type, then proceeding to step 4 ; step 3 , setting the indication bit of the picture header as a status indicating a run_length coding, and encoding the macroblock type in the image by the run_length coding mode; then proceeding to step 5 ; step 4 , setting the indication bit of the picture header as status indicating a joint coding and encoding the macroblock type in the image by the joint coding mode of the number of skipped macroblocks and the macroblock type; then proceeding to step 5 ; step 5 , encoding the current image and writing data into a code stream.