Patent ID: 8064518

Claim:
An encoding hardware apparatus for encoding images of frames which form a moving image by motion compensation, comprising: input means for inputting images of frames; section division means for dividing the frames into a plurality of sections on the basis of the images of the frames input by the input means; representative image setting means for setting, as a representative image, an image of a self frame, which has a smallest sum total value of differences from a group of images of other frames in each of the sections divided by the section division means; and reference image selection means for selecting one representative image to be referred to so as to encode an image of a frame of interest from the representative images set for respective sections, and wherein the image of the frame of interest is encoded by motion compensation using the images of the frames in the section that includes the representative image selected by the reference image selection means; wherein the section division means comprises: determination means for determining whether or not a frame of interest is included in a section to which a frame immediately before the frame of interest belongs; first setting means for, when the frame of interest is included in the section to which the frame immediately before the frame of interest belongs, setting the representative frame set in the section or the frame of interest as a new representative image in the section on the basis of images of respective frames in the section and an image of the frame of interest; and second setting means for, when the frame of interest is not included in the section to which the frame immediately before the frame of interest belongs, setting a new section which is different from the section and includes the frame of interest; wherein the first setting means comprises: first calculation means for calculating differences between respective frames in the section and the frame of interest, and calculating a sum total value of the calculated differences; second calculation means for calculating a difference between the representative frame set in the section and the image of the frame of interest; representative frame setting means for, when a sum of the value calculated by the second calculation means and a threshold is not less than the sum total value calculated by the first calculation means, setting the frame of interest as a new representative frame in the section; first threshold setting means for, when the sum value is not less than the sum total value calculated by the first calculation means, setting the sum total value calculated by the first calculation means as the threshold; and second threshold means for, when the sum value is not more than the sum total value calculated by the first calculation means, setting the sum value as the threshold.