The invention discloses
direct mode selection based H.264 / AVC (Advanced Video Coding) fast
transcoding method and device, which mainly overcomes the defects of high operation complexity, poor real-time performance and high
occupancy rate on operation / storage and other resources in the prior art. The
transcoding device comprises a decoder, a
macroblock distortion estimation module, a
macroblock mode selection module and a coder, wherein the decoder
decodes a compressed code
stream to obtain a
macroblock mode, movement information, a residual and a decoding frame image; the macroblock
distortion estimation module and the macroblock
mode selection module perform macroblock
distortion estimation and
fast mode selection according to the decoding information and the reference frames of the coder and the decoder; and the coder performs RDO (Remote
Data Objects) judgment to the I frame of the current GOP (
Group of Pictures) and the first P frame, and counts the
average distortion of the firstP frame in all optimal interframe mode as a threshold for the
fast mode selection, otherwise, the fast coding is carried out on the decoding frame image to obtain the H.264 / AVC compressed code streamwith a set target
code rate. The invention greatly reduces the operation complexity of
transcoding and decreases the time on transcoding, and can be applied to the real-time
multimedia transmission and other data transmissions.