Patent ID: 8811486

Claim:
A video encoding method which compresses video data by dividing the video data including frames constituted from a pair of fields into macroblocks of a predetermined size and which outputs a bit stream, comprising: a first step of dividing a rectangle including M pixels along a horizontal direction and 2M pixels along a vertical direction into a pair of rectangles including M pixels along a horizontal direction and M pixels along a vertical direction, conducting a motion detection regarding each of said pair of rectangles and calculating both motion vectors and a frame detection cost which is an encoding cost upon using the motion vector; a second step of dividing the rectangle including M pixels along a horizontal direction and 2M pixels along a vertical direction into a rectangle including M pixels along a horizontal direction and M pixels constituted from odd lines along a vertical direction and a rectangle including M pixels along a horizontal direction and M pixels constituted from even lines along a vertical direction, conducting a motion detection regarding each of a pair of rectangles and calculating both motion vectors and a field detection cost which is an encoding cost upon using the motion vector; a third step of calculating an evaluation value of size of motion vectors determined as a result of motion detection of both the first step and second step; a fourth step of, if the evaluation value of size of the motion vectors calculated in the third step is larger than a predetermined threshold, comparing the frame detection cost of the first step to the field detection cost of the second step and choosing comparatively small cost; a fifth step of, if the frame detection cost is chosen at the fourth step, conducting encoding on the encoding target area using frame macroblock mode; a sixth step of, if the field detection cost is chosen at the fourth step, conducting encoding on the encoding target area using field macroblock mode; a seventh step of, if the evaluation value of size of the motion vector calculated at the third step is smaller than the predetermined threshold, calculating a sum of absolute values of differences between neighboring pixels in a vertical direction regarding the frame macro blocks using frame pixel cost, calculating a sum of absolute values of differences between neighboring pixels in a vertical direction regarding the field macro blocks using field pixel cost and choosing comparatively small pixel cost; an eighth step of, if the frame pixel cost is chosen at the seventh step, conducting encoding on the encoding target area using frame macroblock mode; a ninth step of, if the field pixel cost is chosen at the seventh step, conducting encoding on the encoding target area using field macroblock mode.