Abstract:
Provided is a video encoding device having an AFF-mode-determining unit ( 140 ) for determining the AFF mode when an input image is an interlaced image, and a video encoding unit ( 110 ) for encoding the input image depending on a result of the mode determination obtained from the AFF-mode-determining unit ( 140 ). The AFF-mode-determining unit ( 140 ) makes a determination combining: a mode determination result based on each of a texture value when an image is treated as a field and a frame, or based on an equivalent object; and a mode determination result based on the ease of predicting a motion vector in both encodings estimated with reference to a previously obtained movement vector, or based on the cost.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates to a video encoding device for encoding a moving picture, and more particularly to a video encoding device for adaptive field/frame coding. 
       BACKGROUND OF THE INVENTION 
       [0002]    In recent years, video encoding technology has become essential technology due to an increase in video streaming content with the development of broadband networks, the use of large-screen video display equipment and high-capacity storage media such as a DVD, or the like. Further, along with a high resolution image pickup device or a high resolution display device, a technique for encoding at high resolution in the moving picture encoding technology has become essential. 
         [0003]    An encoding process is a process of converting an original image that is inputted to a video encoding device into a stream with less amount of data. However, as one of video encoding techniques capable of achieving encoding with high image quality and high resolution, there is H.264/AVC (Advanced Video Coding) that is an international standard. In the H.264/AVC encoding scheme, encoding is performed using prediction techniques such as intra-frame prediction and inter-frame prediction. Further, in the H.264/AVC encoding process, generally, processing is performed on the basis of a macroblock (hereinafter, appropriately referred to as “MB”) consisting of 16×16 pixels for the original image. 
         [0004]    As a prediction scheme used in H.264/AVC encoding, mainly, there are two prediction schemes of intra-frame prediction and inter-frame prediction. In the intra-frame prediction, there are provided a plurality of prediction schemes in accordance with the size of a block serving as a unit of prediction or to a combination of prediction directions. Also in the inter-frame prediction, there are provided a plurality of prediction schemes in accordance with the size of a block serving as a unit of prediction. In H.264/AVC, the prediction scheme is selected dynamically in accordance with the code amount or target image quality, thereby realizing an encoding scheme with high image quality and high compression. 
         [0005]    Hereinafter, an outline of H.264/AVC encoding will be described with reference to  FIG. 18 .  FIG. 18  is a diagram showing a configuration of a conventional video encoding device for performing a H.264/AVC encoding process. 
         [0006]    In an encoding process using intra-frame prediction, a mode selection unit  930  selects an intra-frame prediction unit  910 . Then, a stream  91  is obtained from an original image  90  through the intra-frame prediction unit  910 , an orthogonal transformation unit  940 , a quantization unit  950  and a variable length encoding unit  980 . Further, in an encoding process using inter-frame prediction, the mode selection unit  930  selects an inter-frame prediction unit  920 . Then, the stream  91  is obtained from the original image  90  through the inter-frame prediction unit  920 , the orthogonal transformation unit  940 , the quantization unit  950  and the variable length encoding unit  980 . 
         [0007]    The original image  90  and a reconstructed image  92  are inputted to the intra-frame prediction unit  910 . The reconstructed image  92  is an image configured by combining a restored difference image  97  outputted from an inverse orthogonal transformation unit  970  and a prediction image  95  outputted from the mode selection unit  930 . 
         [0008]    Further, an appropriate intra-frame prediction mode is selected from the original image  90  and the reconstructed image  92  by an intra-frame prediction process to generate intra-frame prediction information D 81  representing mode information of the intra-frame prediction mode, an intra-frame prediction image  93  that is a prediction result, and an intra-frame prediction error D 82  representing a difference between the original image  90  and the intra-frame prediction image  93 . Further, the intra-frame prediction information D 81  includes intra-frame prediction mode information representing the direction of the intra-frame prediction, and an intra-frame prediction block type representing the block size when the intra-frame prediction is performed. 
         [0009]    The inter-frame prediction unit  920  receives the original image  90  and the reconstructed image  92  generated from an original image before or after the original image  90  (in the past or future), and generates inter-frame prediction information D 83 , an inter-frame prediction image  94 , and an inter-frame prediction error D 84  representing a difference between the original image  90  and the inter-frame prediction image  94 . The inter-frame prediction information D 83  includes motion vector information as a result of performing motion compensation, and an inter-frame prediction block type representing the block size when the inter-frame prediction is performed. 
         [0010]    An encoding controller  990  determines an encoding mode of one of intra-frame prediction and inter-frame prediction in accordance with an encoding mode selection algorithm based on the intra-frame prediction error D 82  inputted from the intra-frame prediction unit  910 , the inter-frame prediction error D 84  inputted from the inter-frame prediction unit  920 , and code amount information D 86  (which will be described later) inputted from the variable length encoding unit  980 . Then, the encoding controller  990  outputs, to the mode selection unit  930 , encoding mode selection information D 87  indicating the determined encoding mode. Also the encoding controller  990  determines a quantization coefficient D 88  in accordance with a rate control algorithm, and outputs the quantization coefficient D 88  to the quantization unit  950 . 
         [0011]    Since the encoding mode selection algorithm and the rate control algorithm have a great influence on the code amount of the stream  91  and image quality, there are various ways depending on the content of the original image  90  to be encoded or the application of video coding. 
         [0012]    In accordance with the encoding mode selection information D 87  inputted from the encoding controller  990 , the mode selection unit  930  outputs the intra-frame prediction image  93  as a prediction image  95  if the intra-frame prediction unit  910  has been selected, and outputs the inter-frame prediction image  94  as the prediction image  95  if the inter-frame prediction unit  920  has been selected. 
         [0013]    The orthogonal transformation unit  940  generates frequency components D 89  from a difference image  96  corresponding to a difference between the original image  90  and the prediction image  95  by using an orthogonal transform process. 
         [0014]    The quantization unit  950  performs a quantization process on the frequency components D 89  inputted from the orthogonal transformation unit  940  based on the quantization coefficient D 88  inputted from the encoding controller  990 , and outputs quantization values D 90  with a reduced amount of information. 
         [0015]    An inverse quantization unit  960  performs an inverse quantization process on the quantization values D 90  to generate restored frequency components D 91 . 
         [0016]    The inverse orthogonal transformation unit  970  performs an inverse orthogonal transform process on the restored frequency components D 91  to generate the restored difference image  97 . Then, the generated restored difference image  97  and the prediction image  95  outputted from the mode selection unit  930  may be combined and stored as the reconstructed image  92 . 
         [0017]    The variable length encoding unit  980  encodes the quantization values D 90  and the intra-frame prediction information D 81  or inter-frame prediction information D 83  into a data string having a smaller amount of data, and outputs the data string as a stream  91 . Also, the variable length encoding unit  980  outputs the code amount information D 86  to the encoding controller  990 . The code amount information D 86  indicates the code amount of the stream  11  after variable length encoding. 
         [0018]    In the conventional video encoding device shown in  FIG. 18 , as the original image  90  to be inputted, there are two types, i.e., an interlaced image and a progressive image. 
         [0019]      FIGS. 19A and 19B  are diagrams illustrating an interlaced image and a progressive image. 
         [0020]    As shown in  FIG. 19A , the interlaced image is configured by extracting 1/2 of the progressive image in a vertical direction, and the whole image is obtained by alternately arranging a top field obtained by extracting only odd-numbered lines and a bottom field obtained by extracting only even-numbered lines from the top of the screen. 
         [0021]    On the other hand, as shown in  FIG. 19B , the progressive image is a full-size image that is not subjected to an extraction process. 
         [0022]    However, in H.264/AVC, when the original image  90  is the interlaced image, there is provided an encoding tool called adaptive field/frame coding (hereinafter, referred to as “AFF”) which is capable of improving the encoding efficiency (see, e.g., Patent Document 1). 
         [0023]      FIG. 20  is a diagram illustrating adaptive field/frame coding (AFF) of conventional H.264/AVC. In the case where the input image is the interlaced image, the AFF is an encoding process method in which encoding is performed while switching, on a frame-by-frame basis, between frame coding for encoding the top field and bottom field as one frame as shown in (a) of  FIG. 20 , and field coding for encoding the top field and bottom field as separate pictures as shown in (b) of  FIG. 20 . 
         [0024]    For example, if there is no change in the brightness or if the motion of the image is small, i.e., if the difference is small between the top field and the bottom field, the pixel density in the vertical direction in frame coding becomes two times as large as that in field coding, and thus pixel correlation in the image increases in frame coding. Accordingly, it can be expected that the accuracy of the intra-frame prediction is improved, and the encoding efficiency is improved. Also in the inter-frame prediction, in frame coding compared to field coding, prediction efficiency in a pixel block is improved due to an increase in the pixel density. Accordingly, a larger prediction block can be easily selected, and thus the encoding efficiency may be improved. 
         [0025]    On the other hand, if a change in brightness or motion in the image is large, and a change occurs between images of the top field and bottom field, pixel correlation in the image decreases in frame coding. Thus, in both of the intra-frame prediction and the inter-frame prediction, the encoding efficiency is lowered when performing frame coding than performing field coding. 
         [0026]    Therefore, in the case of using the AFF of H.264/AVC, in order to improve the encoding efficiency, it is important to appropriately perform switching between field coding and frame coding depending on the status of the image. 
         [0027]    Further,  FIG. 21  is a diagram showing an outline of an encoding mode determination method of the conventional AFF. In reference software JM in conventional H.264/AVC, a multi-pass technique has been used to determine the encoding mode of the AFF. 
         [0028]    Specifically, the original image  90  is encoded by both a video encoding unit  810  for frame coding and a video encoding unit  820  for field coding. Then, an output stream of either one is selected by an AFF mode selection unit  830 , and it is outputted finally as the stream  91 . 
         [0029]    Further, in the AFF, there are a method of performing switching between field coding and frame coding for each picture, and a method of performing switching between field coding and frame coding for each macroblock. The former is called picture adaptive field/frame coding (PAFF), and the latter is called macroblock adaptive field/frame coding (MBAFF). 
         [0030]      FIG. 22  is a diagram showing an outline of an encoding mode determination method in conventional PAFF and MBAFF. In the H.264/AVC standard, the PAFF and MBAFF may be nested in each other, and the MBAFF can be used only when frame coding is selected in the PAFF. In the case of using the PAFF, two units, i.e., a video encoding unit  860  and a video encoding unit  870  are used for frames so that frame coding is performed by the video encoding unit  860  and field coding is performed by the video encoding unit  870 . Then, a PAFF mode selection unit  880  determines which one of AFF modes is advantageous in encoding efficiency based on the encoding results for each frame, and selects the encoding result with higher efficiency. 
         [0031]    If frame coding is selected in the PAFF, the MBAFF can be also used. Similarly, in the case of using the MBAFF, two units, i.e., video encoding units  861  and  862  are used so that frame coding is performed by one video encoding unit  861  and field coding is performed by the other video encoding unit  862 . Then, a MBAFF mode selection unit  863  determines which one of AFF modes is advantageous in encoding efficiency from the encoding results for each super MB of 16×32 pixels (the number of horizontal pixels×the number of vertical pixels, the same applies to the following), and selects the encoding result with higher efficiency. 
         [0032]    Then, each of the MBAFF mode selection unit  863  and the PAFF mode selection unit  880  selects an output stream of one of modes in each frame for each super MB of 16×32 pixels, and finally outputs the selected output stream as the stream  91 . 
         [0033]    [Patent Document 1] Japanese Patent Application Publication No. 2008-283595 
         [0034]    However, in the conventional encoding method, it is necessary to perform different types of encoding processes, i.e., frame coding and field coding, multiple times on a frame basis or on a pixel block basis of 16×32 pixels for one input image. Accordingly, in the case of using the AFF, the processing amount may increase two or more times as compared to when the AFF is not used. 
       SUMMARY OF THE INVENTION 
       [0035]    In view of the above, the present invention provides a video encoding device for performing adaptive field/frame coding (AFF) and capable of reducing the processing amount of an encoding process in the case of using the AFF. 
         [0036]    In accordance with an aspect of the present invention, there is provided a video encoding device including an AFF mode determining unit configured to perform mode determination of adaptive field/frame coding when an input image is an interlaced image, and a video encoding unit configured to encode the input image in accordance with a determination result of the mode determination by the AFF mode determining unit. 
         [0037]    In accordance with another aspect of the present invention, the AFF mode determining unit performs the mode determination by comparing pixel differences in the field coding and the frame coding of the input image. 
         [0038]    In accordance with still another aspect of the present invention, the AFF mode determining unit performs the mode determination by using motion vector information that is a result of inter-frame prediction of a picture that has been subjected to an encoding process in the video encoding unit. 
         [0039]    In accordance with still another aspect of the present invention, the AFF mode determining unit includes a vertical pixel difference (VPD) determination unit configured to perform mode determination of the adaptive field/frame coding by estimating a texture value in field coding of the input image based on an absolute difference of pixel values between a top field and a bottom field constituting a pair, estimating a texture value in the frame coding based on an absolute difference of pixel values between adjacent lines in the top field or the bottom field, and selecting the coding that gives a smaller texture value, a motion vector (MV) determination unit configured to perform mode determination of the adaptive field/frame coding by receiving motion vector information that is a result of inter-frame prediction of a picture that has been subjected to an encoding process in the video encoding unit, estimating a motion vector cost while assigning different weights to x and y components of the vector information, and calculating the number of times at which the estimated cost exceeds a critical value, and an integration determination unit configured to perform the mode determination based on a mode determination result in the VPD determination unit and a mode determination result in the MV determination unit. 
         [0040]    In accordance with the present invention, it is possible to reduce the processing amount of an encoding process while maintaining encoding efficiency. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0041]      FIG. 1  is a diagram illustrating the concept of an encoding method in a video encoding device in accordance with an embodiment of the present invention. 
           [0042]      FIG. 2  is a diagram showing an example of the configuration of the video encoding device in accordance with the embodiment of the present invention. 
           [0043]      FIG. 3  is a diagram showing an example of the configuration of a video encoding unit  110 . 
           [0044]      FIGS. 4A and 4B  are diagrams for explaining the operation of an original image generating unit  150 . 
           [0045]      FIG. 5  is a diagram showing an example of the configuration of the original image generating unit  150 . 
           [0046]      FIGS. 6A and 6B  are diagrams for explaining an operation (write operation) of a reconstructed image converting unit  160 . 
           [0047]      FIGS. 7A and 7B  are diagrams for explaining an operation (read operation) of the reconstructed image converting unit  160 . 
           [0048]      FIG. 8  is a diagram showing an example of the configuration of the reconstructed image converting unit  160 . 
           [0049]      FIG. 9  is a diagram showing an example of arrangement of pixels used in the calculation of a FRM difference and a FLD difference in a VPD scheme. 
           [0050]      FIG. 10  is a flowchart showing an example of a process flow of AFF mode determination of the VPD scheme. 
           [0051]      FIG. 11  is a diagram showing an example of arrangement of pixels used in the calculation of the FRM difference and the FLD difference in the VPD scheme. 
           [0052]      FIG. 12  is a diagram showing an example of arrangement of pixels used in the calculation of the FRM difference and the FLD difference in the VPD scheme. 
           [0053]      FIG. 13  is a diagram showing the concept of MV derivation on an 8×8 pixel block basis in the MV scheme. 
           [0054]      FIG. 14  is a flowchart showing an example of a process flow of AFF mode determination of the MV scheme. 
           [0055]      FIG. 15  is a flowchart showing an example of a process flow of integration determination of an AFF mode. 
           [0056]      FIG. 16  is a diagram showing an example of the configuration of an AFF mode determining unit  140 . 
           [0057]      FIG. 17  is a block diagram illustrating an example of the hardware configuration of the video encoding device in accordance with the embodiment of the present invention. 
           [0058]      FIG. 18  is a diagram showing a configuration of a conventional video encoding device for performing a H. 264/AVC encoding process. 
           [0059]      FIGS. 19A and 19B  are diagrams illustrating an interlaced image and a progressive image. 
           [0060]      FIG. 20  is a diagram illustrating adaptive field frame coding of conventional H.264/AVC. 
           [0061]      FIG. 21  is a diagram showing an outline of an encoding mode determination method of the conventional AFF. 
           [0062]      FIG. 22  is a diagram showing an outline of an encoding mode determination method in conventional PAFF and MBAFF. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0063]    Hereinafter, embodiments of the present invention will be described with reference to the drawings. In each of the drawings referred to in the following description, the same components as those of the other drawings are denoted by the same reference numerals. 
         [0064]    (Concept of Encoding Method) 
         [0065]      FIG. 1  is a diagram illustrating the concept of an encoding method in a video encoding device in accordance with the present embodiment. 
         [0066]    In the encoding method in accordance with the present embodiment, AFF mode determination is performed to determine which one of frame coding and field coding is advantageous in encoding efficiency (S 01 ) before encoding of an original image  10  inputted to the video encoding device is performed (S 02 ). Then, in accordance with the result of the AFF mode determination, either the frame coding or field coding is performed. 
         [0067]    Thus, it is possible to reduce a processing amount of encoding process almost without lowering encoding efficiency, compared to a conventional encoding method. 
         [0068]    (Configuration of Video Encoding Device) 
         [0069]      FIG. 2  is a diagram showing an example of the configuration of a video encoding device in accordance with the present embodiment. A video encoding device  1  includes a video encoding unit  110  for performing H.264/AVC encoding, an external memory  120  for storing a reconstructed image, an encoding controller  130  for performing determination of an encoding mode and the like, an AFF mode determining unit  140  for performing determination of an AFF mode, an original image generating unit  150  for generating an original image  10  from an input image  9  based on the determined AFF mode, a reconstructed image converting unit  160  for converting the reconstructed image in accordance with the AFF mode between the video encoding unit  110  and the external memory  120 , and a memory bus  170  for connecting between the reconstructed image converting unit  160  and the external memory  120 . 
         [0070]    The video encoding unit  110  receives the original image  10  outputted from the original image generating unit  150  on a macroblock (MB) basis of 16×16 pixels, performs the H.264/AVC encoding by inter-frame prediction or intra-frame prediction in accordance with encoding mode information outputted from the encoding controller  130 , and outputs a stream  11 . 
         [0071]    The encoding controller  130  receives encoding setting information S 1  from the outside of the video encoding device  1  and information about encoding from the video encoding unit  110 . The encoding setting information  51  is information for controlling the operation of the video encoding unit  110 . Further, the encoding controller  130  outputs, to the video encoding unit  110 , encoding mode selection information indicating an encoding mode of one of inter-frame prediction and intra-frame prediction. 
         [0072]    The AFF mode determining unit  140  performs AFF mode determination based on the input image  9  inputted from the outside of the video encoding device  1  and motion vector (MV) information inputted from the video encoding unit  110 , and outputs the determination result as AFF mode determination information. 
         [0073]    The original image generating unit  150  converts the input image  9  inputted from the outside of the video encoding device  1  based on the AFF mode determination information outputted from the AFF mode determining unit  140 , generates the original image  10 , and outputs the original image  10  to the video encoding unit  110 . 
         [0074]    The reconstructed image converting unit  160  performs conversion of the reconstructed image data based on the AFF mode determination information outputted from the AFF mode determining unit  140  when the video encoding unit  110  performs writing and reading of the reconstructed image data to and from the external memory  120 . 
         [0075]    The video encoding unit  110  uses the external memory  120  to temporarily store the reconstructed image. That is, the external memory  120  buffers the reconstructed image outputted from the video encoding unit  110  via the memory bus  170 . The external memory  120  includes a volatile memory such as a DRAM. 
         [0076]    Hereinafter, main components will be described in detail. 
         [0077]    (Video Encoding Unit  110 ) 
         [0078]    Hereinafter, the video encoding unit  110  will be described in detail.  FIG. 3  is a diagram showing an example of the configuration of the video encoding unit  110 . (Further, in  FIG. 3 , components other than the video encoding unit  110  are also shown in order to represent a relationship between the video encoding unit  110  and the other components.) 
         [0079]    As shown in  FIG. 3 , the video encoding unit  110  is configured to include an intra-frame prediction unit  210 , an inter-frame prediction unit  220 , a mode selection unit  230 , an orthogonal transformation unit  240 , a quantization unit  250 , an inverse quantization unit  260 , an inverse orthogonal transformation unit  270  and a variable length encoding unit  280 . 
         [0080]    The intra-frame prediction unit  210  receives the original image  10  outputted from the original image generating unit  150  (see  FIG. 2 ) and a reconstructed image  12  around a current MB (macroblock in an encoding process). Then, the intra-frame prediction unit  210  generates intra-frame prediction information D 1 , an intra-frame prediction image  13  as a result of intra-frame prediction, and an intra-frame prediction error D 2  indicating a difference between the original image  10  and the intra-frame prediction image  13 . The intra-frame prediction information D 1  is outputted to the variable length encoding unit  280 , the intra-frame prediction image  13  is outputted to the mode selection unit  230 , and the intra-frame prediction error D 2  is outputted to the encoding controller  130 . 
         [0081]    The inter-frame prediction unit  220  receives the original image  10  outputted from the original image generating unit  150  (see  FIG. 2 ) and a reconstructed image  12 ′ generated from the original image  10  in the past or future (original image  10  inputted before or after the original image  10  under processing) in the reconstructed image converting unit  160 . Further, the reconstructed image  12 ′ is obtained by a memory controller (reconstructed image converting unit  160 ) reading out the reconstructed image  12  stored in the external memory  120 . 
         [0082]    Then, the inter-frame prediction unit  220  generates inter-frame prediction information D 3  including motion vector information, an inter-frame prediction image  14  as a result of inter-frame prediction, and an inter-frame prediction error D 4  indicating a difference between the original image  10  and the inter-frame prediction image  14 . Then, the inter-frame prediction information D 3  is outputted to the variable length encoding unit  280 , the inter-frame prediction image  14  is outputted to the mode selection unit  230 , and the inter-frame prediction error D 4  is outputted to the encoding controller  130 . 
         [0083]    Further, the encoding controller  130  determines an encoding mode (inter-frame prediction or intra-frame prediction) in accordance with an encoding mode selection algorithm based on the intra-frame prediction error D 2  outputted from the intra-frame prediction unit  210 , the inter-frame prediction error D 4  outputted from the inter-frame prediction unit  220  and code amount information D 6  outputted from the variable length encoding unit  280 . Then, the encoding controller  130  outputs, to the mode selection unit  230 , encoding mode selection information D 7  indicating the determined encoding mode. In addition, the encoding controller  130  determines a quantization coefficient D 8  in accordance with a rate control algorithm, and outputs the quantization coefficient D 8  to the quantization unit  250 . 
         [0084]    The encoding mode selection algorithm and the rate control algorithm used in the encoding controller  130  have a great influence on the code amount of the stream and image quality. Thus, there are various algorithms depending on the content of the original image  10  to be encoded or the application of video encoding. 
         [0085]    In accordance with the encoding mode selection information D 7 , which is inputted from the encoding controller  130 , indicating an encoding mode of one of intra-frame prediction and inter-frame prediction, the mode selection unit  230  outputs the intra-frame prediction image  13  as a prediction image  15  if the intra-frame prediction has been selected in the encoding mode selection information D 7 , and outputs the inter-frame prediction image  14  as the prediction image  15  if the inter-frame prediction has been selected in the encoding mode selection information D 7 . 
         [0086]    The orthogonal transformation unit  240  performs an orthogonal transform process on a difference image  16  corresponding to a difference between the original image  10  and the prediction image  15  to generate frequency components D 9 , and outputs the frequency components D 9  to the quantization unit  250 . 
         [0087]    The quantization unit  250  performs a quantization process on the frequency components D 9  outputted from the orthogonal transformation unit  240  based on the quantization coefficient D 8  outputted from the encoding controller  130 , and outputs quantization values D 10  with a reduced amount of information. 
         [0088]    The inverse quantization unit  260  performs an inverse quantization process on the quantization values D 10  to generate restored frequency components D 11 , and outputs the restored frequency components D 11  to the inverse orthogonal transformation unit  270 . 
         [0089]    The inverse orthogonal transformation unit  270  performs an inverse orthogonal transform process on the restored frequency components D 11  to generate and output a restored difference image  17 . Then, the restored difference image  17  and the prediction image  15  selected by the mode selection unit  230  are combined to generate the reconstructed image  12 , and the generated reconstructed image  12  is stored in the external memory  120 . 
         [0090]    The variable length encoding unit  280  encodes the quantization values D 10  and the intra-frame prediction information D 1  or inter-frame prediction information D 3  into a data string having a smaller amount of data (variable length encoding), and outputs the data string as a stream  11 . Also, the variable length encoding unit  280  outputs the code amount information D 6  to the encoding controller  130 . The code amount information D 6  indicates the code amount of the stream  11  after variable length encoding. 
         [0091]    (Original Image Generating Unit  150 ) 
         [0092]    Hereinafter, the original image generating unit  150  will be described in detail.  FIGS. 4A and 4B  are diagrams for explaining the operation of the original image generating unit  150 . 
         [0093]    As described above, in the video encoding unit  110 , an encoding process is performed on a macroblock basis of 16×16 pixels. The original image generating unit  150  receives the AFF mode determination information outputted from the AFF mode determining unit  140 , converts the input image  9  in accordance with the AFF mode determination result indicated by the AFF mode determination information, and outputs it as the original image  10  on a macroblock basis. 
         [0094]    If the input image  9  is an interlaced image, the original image generating unit  150  generates the original image  10  to be outputted in accordance with the AFF mode determination result of the AFF mode determining unit  140 . In this case, if the AFF mode determination result indicates field coding, 16×16 pixels are cut out from either the top field or the bottom field of the input image  9  and outputted as the original image  10  on a macroblock basis (see  FIG. 4A ). 
         [0095]    On the other hand, if the AFF mode determination result indicates frame coding, 16×8 pixels are cut out from both the top field and the bottom field and converted into 16×16 pixels by alternately arranging each line of the top field and each line of the bottom field. Then, the 16×16 pixels are outputted as the original image  10  on a macroblock basis (see  FIG. 4B ). 
         [0096]    If the input image  9  is a progressive image, since the AFF process is not performed, 16×16 pixels are cut out regardless of the AFF mode determination result and outputted as the original image  10  on a macroblock basis. 
         [0097]      FIG. 5  is a diagram showing an example of the configuration of the original image generating unit  150 . The original image generating unit  150  is configured to include an original image converting unit  151  and an original image memory  152 . 
         [0098]    The original image memory  152 , which is used only when the input image  9  is an interlaced image, is for buffering data of the original image  10  corresponding to one field. 
         [0099]    The original image converting unit  151  converts the input image  9  in accordance with AFF mode determination information D 21  outputted from the AFF mode determining unit  140  (see  FIG. 2 ). Specifically, if the input image  9  is an interlaced image and a field coding mode has been selected in the AFF mode determination information D 21 , 16×16 pixels of either the top field or the bottom field of the input image  9  are read out from the original image memory  152 , and outputted as the original image  10  on a macroblock basis. 
         [0100]    On the other hand, if the input image  9  is an interlaced image and a frame coding mode has been selected in the AFF mode determination information D 21 , 16×8 pixels of both the top field and bottom field of the input image  9  are read out from the original image memory  152 . Then, 16×16 pixels are obtained by alternately arranging each line of the top field and each line of the bottom field and outputted as the original image  10  on a macroblock basis. 
         [0101]    Further, if the input image  9  is a progressive image, the original image converting unit  151  outputs 16×16 pixels of the input image  9  as the original image  10  as they are. 
       (Reconstructed Image Converting Unit  160 ) 
       [0102]    Hereinafter, the reconstructed image converting unit  160  will be described in detail.  FIGS. 6 and 7  are diagrams for explaining operations of the reconstructed image converting unit  160 . In the operations of the reconstructed image conversion, an operation of writing the reconstructed image  12  is shown in  FIGS. 6A and 6B , and an operation of reading the reconstructed image  12  is shown in  FIGS. 7A and 7B . 
         [0103]    The reconstructed image converting unit  160  converts data of the reconstructed image  12  outputted from the video encoding unit  110  in accordance with the AFF mode determination information D 21  outputted from the AFF mode determining unit  140  and writes the converted data to the external memory  120 . Also, the reconstructed image converting unit  160  converts data of the reconstructed image read out at an appropriate timing from the external memory  120  and supplies the converted data to the video encoding unit  110 . 
         [0104]    (Writing Operation) 
         [0105]    If the input image  9  is a progressive image, or if the input image  9  is an interlaced image and the AFF mode determination information D 21  indicates a field coding mode, data of the reconstructed image  12  are written to the external memory  120  as they are without being converted (see  FIG. 6B ). 
         [0106]    On the other hand, if the input image  9  is an interlaced image and the AFF mode determination information D 21  indicates a frame coding mode, data of the reconstructed image  12  are divided into the top field and the bottom field and then written to the external memory  120  (see  FIG. 6A ). 
         [0107]    (Reading Operation) 
         [0108]    If the input image  9  is a progressive image, or if the input image  9  is an interlaced image and the AFF mode determination information D 21  indicates a field coding mode, data of the reconstructed image  12  are read, as they are, from the external memory  120  (see  FIG. 7B ). 
         [0109]    On the other hand, if the input image  9  is an interlaced image and the AFF mode determination information D 21  indicates a frame coding mode, image data are read from two memory areas for the top field and bottom field, and outputted as one sheet of the reconstructed image  12  by alternately and sequentially arranging each line of each field (see  FIG. 7A ). 
         [0110]      FIG. 8  is a diagram showing an example of the configuration of the reconstructed image converting unit  160 . The reconstructed image converting unit  160  is configured to include a reconstructed image writing unit  161  and a reconstructed image reading unit  162 . 
         [0111]    The reconstructed image writing unit  161  receives the AFF mode determination information D 21 , and converts data of the reconstructed image  12  outputted from the video encoding unit  110  in accordance with the AFF mode determination information D 21  and writes the converted data to the external memory  120 . Specifically, if the input image  9  is an interlaced image and the AFF mode determination information D 21  indicates a frame coding mode, the received reconstructed image  12  is divided into the top field and the bottom field and then written to the external memory  120 . 
         [0112]    On the other hand, if the input image  9  is a progressive image, or if the input image  9  is an interlaced image and the AFF mode determination information D 21  indicates a field coding mode, the reconstructed image  12  is written to the external memory  120  as it is. 
         [0113]    The reconstructed image reading unit  162  converts data of the reconstructed image  12  read out from the external memory  120  in accordance with the AFF mode determination information D 21 , and outputs the converted data to the video encoding unit  110 . Specifically, if the input image  9  is an interlaced image and the AFF mode determination information D 21  indicates a frame coding mode, the reconstructed image reading unit  162  reads pixel values at the same pixel position of the top field and bottom field from the external memory  120 , and outputs, as the reconstructed image  12 , data obtained by alternately arranging the pixel values for each line of each field. 
         [0114]    On the other hand, if the input image  9  is a progressive image or if the input image  9  is an interlaced image and the AFF mode determination information D 21  indicates a field coding mode, the reconstructed image  12  read out from the external memory  120  is outputted to the video encoding unit  110  as it is. 
         [0115]    (AFF Mode Determining Unit  140 ) 
         [0116]    Hereinafter, an algorithm of AFF mode determination in the AFF mode determining unit  140  will be explained. 
         [0117]    In the present embodiment, for example, in the AFF mode determination algorithm, there are used two schemes, i.e., a vertical pixel difference (VPD) scheme using texture information of the input image  9  and a motion vector (MV) scheme using MV information outputted from the inter-frame prediction unit  220 . 
         [0118]    The AFF mode determining unit  140  performs AFF mode determination by using these two schemes, determines a final AFF mode by integrating the determination results, and outputs AFF mode determination information. 
         [0119]    (VPD Scheme) 
         [0120]    First, as one scheme of the AFF mode determination algorithm, there will be explained a VPD scheme in which AFF mode determination is performed based on the texture information of the input image  9 . 
         [0121]    In the VPD scheme, AFF mode determination is performed by calculating two feature values, i.e., a frame difference (hereinafter, referred to “FRM difference”) and a field difference (hereinafter, referred to “FLD difference”) on a pixel-by-pixel basis from the texture information of the input image  9 , and comparing the calculation results. 
         [0122]    As shown in  FIG. 9 , in the VPD scheme to be described below, as an example, the FRM difference and the FLD difference are calculated by using pixel values of pixels T 1 , B 1 , T 2 , B 2 , T 3 , B 3  . . . of the respective fields arranged at the same position in a vertical direction in an image. Specifically, the FRM difference and the FLD difference may be calculated by the following Equations (1) and (2). Further, the following equations are intended to calculate the feature values (FRM difference and FLD difference) by a pixel difference for the position of the pixel Bn. (In Equations (1) and (2), VTn is the pixel value of the pixel Tn, VBn is the pixel value of the pixel Bn, and abs(x) is the absolute value of x.) 
         [0000]        FRM  difference=(abs( V   Tn+1   −V   Bn )+abs( V   Bn   −V   Tn ))/2  Equation (1)
 
         [0000]        FLD  difference=abs( V   Bn+1   −V   Bn )  Equation (2)
 
         [0123]    An example of a process flow of AFF mode determination of the VPD scheme is shown in  FIG. 10 . 
         [0124]    First, initial values are set as follows: the number of pixels (votes) in FRM coding=0; the number of pixels (votes) in FLD coding=0 (step S 101 ). 
         [0125]    The FRM difference and the FLD difference are calculated by the above Equations (1) and (2) (step S 102 ). After comparing the FRM difference with the FLD difference calculated in step S 102 , if the FRM difference is equal to or greater than the FLD difference (step S 103 ), 1 is added to the number of pixels in FLD coding (step S 104 ), and if the FRM difference is smaller than the FLD difference (step S 103 ), 1 is added to the number of pixels in FRM coding (step S 105 ). 
         [0126]    A process of steps S 102  to S 105  is repeated for pixel values in one frame if it is a determination in picture adaptive field/frame coding (PAFF), and for pixel values within an evaluation target range of 16×32 pixels if it is a determination in macroblock adaptive field/frame coding (MBAFF) (step S 106 ). 
         [0127]    If the evaluation of the evaluation target is completed, the number of pixels in FRM coding is compared with the number of pixels in FLD coding. If the number of pixels in FRM coding is equal to or greater than the number of pixels in FLD coding (step S 107 ), “frame coding” is outputted as a VPD determination result (step S 106 ). If the number of pixels in FRM coding is smaller than the number of pixels in FLD coding (step S 107 ), “field coding” is outputted as a VPD determination result (step S 109 ). The outputted VPD determination result is used for integration determination to be described later. 
         [0128]    Further, Equations (1) and (2) for calculating the FRM difference and the FLD difference in the VPD scheme is intended to calculate a difference of texture in the frame coding and the field coding. Therefore, equations other than Equations (1) and (2) may be used as long as this intention is achieved. For example, the following equations may be employed. The following equations are intended to calculate the feature values (FRM difference and FLD difference) by a pixel difference for the position of the pixel Bn. 
         [0000]        FRM  difference=abs( V   Tn+1   −V   Bn )  Equation (3)
 
         [0000]        FLD  difference=abs( V   Bn   −V   Bn−1 )  Equation (4)
 
         [0129]    Further, the pixel values used in the calculation using the above Equations (1) to (4) of the FRM difference and the FLD difference of the VPD scheme are for calculating the difference of texture in the frame coding and the field coding. Accordingly, as long as this intention is achieved, the pixel values do not necessarily have to be pixel values of pixels arranged in the vertical direction in the image. For example, as shown in  FIG. 11 , the pixel values may be pixel values of pixels T 1 , B 1 , T 2 , B 2 , T 3 , B 3  arranged in a diagonal direction in the image. 
         [0130]    Further, similarly, as shown in  FIG. 12 , among pixel columns arranged in different directions 21 to 25 in the image, the pixel difference of the pixel column having the smallest pixel difference may be used as a feature value. In this way, by using, as the feature value, the pixel difference in the direction in which the pixel difference becomes smaller, in a case where there is an edge in evaluation pixels, the feature value obtained along the edge is used in the determination. This brings an advantage of improving the quality of the edge which generally can be seen easily by the human eyes. 
         [0131]    (MV Scheme) 
         [0132]    In the MV scheme, AFF mode determination is performed by receiving a motion vector (hereinafter, referred to “MV”) of the previous picture from the inter-frame prediction unit  220 , and comparing the magnitude of the motion vector with a critical value (hereinafter, referred to “MV critical value”). Hereinafter, the AFF mode determination using the MV scheme will be explained. 
         [0133]    First, the AFF mode determining unit  140  obtains the motion vector (MV) from the inter-frame prediction unit  220 . In this case, the MV is obtained on an 8×8 pixel block basis.  FIG. 13  is a diagram showing the concept of MV derivation on an 8×8 pixel block basis in the MV scheme. 
         [0134]    Specifically, if the MV of a 16×16 pixel block is one, the MV of the 16×16 pixel block is assigned to each 8×8 pixel block (see (a) of  FIG. 13 ). With regard to the MV of an 8×16 pixel block or 16×8 pixel block, the MVs corresponding to the number of 8×8 pixel blocks are assigned (see (b) of  FIG. 13 ). 
         [0135]    With regard to a 4×4 pixel block, a 4×8 pixel block and an 8×4 pixel block, the MV is obtained by averaging the MVs of 4×4 pixel block units included in each 8×8 pixel block (see (c) of  FIG. 13 ). 
         [0136]    Further, the MV may be one that has been frame-coded or field-coded. Further, although the MV is obtained on an 8×8 pixel block basis in the example of  FIG. 13 , but it is not limited thereto. The MV may be obtained on a 4×4 pixel block basis or on a 16×16 pixel block basis. 
         [0137]    Next, a motion vector cost MVCost will be calculated by the following Equation (5). 
         [0000]        MV Cost= Wx*MVx+Wy*MVy   Equation (5)
 
         [0138]    In Equation (5), MVx is the x coordinate of the MV, MVy is the y coordinate of the MV, and Wx and Wy are weights of MVx and MVy, respectively. Although the weights Wx and Wy can be set to any values, since a motion in the vertical direction in the image is more important than a motion in the horizontal direction in the image in the AFF mode determination, it is preferable that Wy is set to a value greater than Wx (e.g., Wx=0.5 and Wy=1) 
         [0139]    An example of a process flow of AFF mode determination of the MV scheme is shown in  FIG. 14 . 
         [0140]    First, initial values are set as follows: the number of MVs in FRM coding=0; the number of MVs in FLD coding=0 (step S 201 ). 
         [0141]    Then, the motion vector cost MVCost is calculated by the above Equation (5) (step S 202 ). If the MVCost is smaller than the MV critical value (step S 203 ), 1 is added to the number of MVs in FRM coding (step S 205 ). If the MVCost is equal to or greater than the MV critical value (step S 203 ), 1 is added to the number of MVs in FLD coding (step S 204 ). In this scheme, by utilizing the fact that the FLD coding provides higher encoding efficiency than the FRM coding in the image having a large motion in the vertical direction, it is intended to evaluate whether the number of motion vectors suitable for FRM coding is larger or the number of motion vectors suitable for FLD coding is larger. In addition, since a value suitable for the MV critical value in step S 203  is different depending on the image size, it is preferable to set the value through an external device of the video encoding device  1 . 
         [0142]    A process of steps S 202  to S 205  is repeated for the MVs of one frame if it is a determination in picture adaptive field/frame coding (PAFF), and for the MVs of pixel blocks within an evaluation target range of 16×32 pixels if it is a determination in macroblock adaptive field/frame coding (MBAFF)(step S 206 ). 
         [0143]    If the evaluation of the evaluation target has been completed, the number of MVs in FLD coding is compared with the number of MVs in FRM coding. If the number of MVs in FRM coding is equal to or greater than the number of MVs in FLD coding (step S 207 ), “frame coding” is outputted as a MV determination result (step S 208 ), and if the number of MVs in FRM coding is smaller than the number of MVs in FLD coding (step S 207 ), “field coding” is outputted as a MV determination result (step S 209 ). The outputted MV determination result is used for integration determination to be described later. 
         [0144]    Further, the above Equation (5) for calculating the MVCost is intended to calculate the magnitude of the MV. Therefore, other equations may be used as long as it is possible to calculate the magnitude of the MV. For example, the following equation may be employed. 
         [0000]        MV Cost=√{square root over ( Wx*MVx   2   +Wy*MVy   2 ))}  Equation (6)
 
         [0145]    In the above-described MV scheme, since a mechanism such as a conventional video encoding device can be used, it is advantageous in that the implementation cost is low, and the processing amount hardly increases as compared with the conventional video encoding device. 
         [0146]    (Integration Determination of VPD Scheme and MV Scheme) 
         [0147]    In the present embodiment, the AFF mode determining unit  140  performs AFF mode determination by the above-described VPD scheme and MV scheme, and determines a final AFF mode by integrating the determination results thereof. 
         [0148]      FIG. 15  is a flowchart showing an example of a process flow of integration determination. 
         [0149]    First, the VPD determination result is obtained (step S 301 ). Specifically, this step has the same process as shown in  FIG. 10 . Further, the MV determination result is obtained (step S 302 ). Specifically, this step has the same process as that shown in  FIG. 14 . 
         [0150]    The AFF mode determining unit  140  has a VPD enable (VPD determination flag) indicating whether the VPD determination result obtained in step S 301  is valid or invalid, and a MV enable (MV determination flag) indicating whether the MV determination result obtained in step S 302  is valid or invalid. In the following process, final AFF mode determination is carried out in accordance with the VPD determination result, the MV determination result, and the VPD determination flag and the MV determination flag (steps S 303  and S 304 ). 
         [0151]    If both of the VPD determination result and the MV determination result are “frame coding,” “frame coding” is outputted as a result of final AFF mode determination (step S 305 ). 
         [0152]    If the VPD determination result is “frame coding” and the MV determination result is “field coding,” “frame coding” is outputted when the VPD determination flag is enabled (step S 305 ), and “field coding” is outputted when the VPD determination flag is disabled (step S 306 ). 
         [0153]    If the VPD determination result is “field coding” and the MV determination result is “frame coding,” “frame coding” is outputted when the MV determination flag is enabled (step S 305 ), and “field coding” is outputted when the MV determination flag is disabled (step S 306 ). 
         [0154]    If both of the VPD determination result and the MV determination result are “field coding,” “field coding” is outputted as a result of final AFF mode determination (step S 306 ). 
         [0155]      FIG. 16  is a diagram showing an example of the configuration of the AFF mode determining unit  140 . The AFF mode determining unit  140  is configured to include a VPD determination unit  141 , a MV determination unit  142 , an integration determination unit  143 , and a changing unit  144 . 
         [0156]    The VPD determination unit  141  buffers pixel information D 31  to a VPD buffer  141   a , performs the AFF mode determination process shown in  FIG. 10  in accordance with the VPD scheme, and outputs a VPD determination result as a result of the determination. 
         [0157]    The MV determination unit  142  buffers MV information D 32 , inputted from the inter-frame prediction unit  220  of the video encoding unit  110 , to a MV buffer  142   a , performs the AFF mode determination process shown in  FIG. 14  in accordance with the MV scheme using a MV critical value D 33  inputted from the encoding controller  130 , and outputs a MV determination result as a result of the determination. 
         [0158]    The integration determination unit  143  receives a VPD flag (VPD enable) signal and a MV flag (MV enable) signal from the encoding controller  130 . Then, the integration determination unit  143  outputs a result of final AFF mode determination in accordance with an integration determination algorithm shown in  FIG. 15  based on the VPD flag signal and the MV flag signal, the VPD determination result from the VPD determination unit  141 , and the MV determination result from the MV determination unit  142 . 
         [0159]    The changing unit  144  changes the setting for AFF mode determination in the integration determination unit  143 . For example, the changing unit  144  may automatically change the weights (e.g., weights Wvpd and Wmv in Equation (7) which will be described later) for the VPD determination result in the VPD determination unit  141  and the MV determination result in the MV determination unit  142  in accordance with the operation setting of the video encoding device  1 . Further, it may be changed manually by receiving an input operation of the user. 
         [0160]    In accordance with AFF mode determination method described above, by combining two AFF mode determination schemes (VPD scheme and MV scheme) having different principles, appropriate mode selection can be performed even for poor quality of input image or under poor encoding conditions in each scheme, thereby improving the encoding efficiency. 
         [0161]    However, in the VPD scheme and the MV scheme, besides the above-described method, various algorithms may be selected in accordance with information that can be used in the AFF mode determination, a delay occurring in the AFF mode determination process or the like. Hereinafter, a modification example of the AFT mode determination method will be described. 
         [0162]    (Modification Example of AFF Mode Determination Method) 
         [0163]    Hereinafter, there will be described a method of using weights in the integration determination algorithm executed in the integration determination unit  143  (hereinafter referred to as “weighted integration determination”). 
         [0164]    Specifically, the integration determination unit  143  performs AFF mode evaluation using the following equation, based on the number of pixels in FRM coding and the number of pixels in FLD coding of the VPD scheme, and the number of MVs in FRM coding and the number of MVs in FLD coding of the MV scheme (in the following Equation (7), Wvpd is a weighting factor for the VPD scheme, and Wmv is a weighting factor for the MV scheme). 
         [0000]        Wvpd*FRM  coding pixel number+ Wmv*FRM  coding  MV  number≦ Wvpd*FLD  coding pixel number+ Wmv*FLD  coding  MV  number  Equation (7)
 
         [0165]    As a result of final AFF mode determination, the integration determination unit  143  selects “field coding” if the above Equation (7) is satisfied, and selects “frame coding” if the above Equation (7) is not satisfied. 
         [0166]    In accordance with the weight-based integration determination of the present embodiment, it is possible to improve efficiency of the encoding process by specifying appropriate weighting factors Wvpd and Wmv in accordance with the image size or encoding process conditions. 
         [0167]    Meanwhile, in the MV scheme, since the MV that is an inter-frame prediction result is used for the determination, there is a feature that the MV of the current picture under the encoding process cannot be used. For this reason, in the MV scheme, it is more necessary to use the inter-frame prediction result of the previous picture as the delay between a timing at which the AFF mode determination is performed and an operation timing of the inter-frame prediction process becomes larger. Thus, the accuracy of the AFF mode determination may be deteriorated. 
         [0168]    On the other hand, in the VPD scheme, since the input image  9  is used for the AFF mode determination, it is necessary to provide an internal buffer for holding pixels constituting the input image  9 . Further, since the pixels are held in accordance with the evaluation unit of the AFF mode evaluation, there is a feature that a larger buffer is required as the image size increases. 
         [0169]    Therefore, in the VPD scheme, if the available pixel buffer size is determined, the number of vertical pixel lines that can be ensured is changed depending on the image size. Accordingly, the number of vertical pixel lines that can be ensured decreases as the image size increases, and thus the accuracy of the AFF mode determination may be deteriorated. 
         [0170]    Therefore, when using the weight-based integration determination in the integration determination algorithm, the weighting factors of the VPD scheme and the MV scheme of the weight-based integration determination are changed by the changing unit  144  depending on the image size or the amount of delay required by the user during the operation of the video encoding device  1 . Accordingly, it is possible to prevent the deterioration of the accuracy of the AFF mode determination. 
         [0171]    Hereinafter, an example of a method of changing a weighting factor will be described. 
         [0172]    In this example, the image size that affects the VPD scheme is one selected from 1920×1080 and 720×480 pixels. 
         [0173]    Further, this example has a buffer for buffering 16 pixels in one vertical pixel line for each MB in the image of 1920×1080 pixels. In this case, in the image of 720×480 pixels, since a ratio of the image size is about 1/6, the buffer having the same capacity can buffer 96 pixels in six vertical pixel lines for each MB. 
         [0174]    Therefore, in the VPD scheme, when the image size is 720×480 pixels rather than 1920×1080 pixels, the AFF mode determination can be achieved with higher accuracy. 
         [0175]    Here, for example, by designating the weighting factor Wvpd of the VPD scheme as “1” when the image size is 1920×1080 pixels, and as “2” when the image size is 720×480 pixels, it is possible to cope with a difference in the accuracy of AFF mode determination due to the image size. 
         [0176]    Further, in this embodiment, the delay amount that affects the MV scheme is one selected from one-frame delay and two-frame delay. 
         [0177]    In the case of the one-frame delay, in the MV scheme, the MV of the inter-frame prediction result of the picture that is two frames (=1 frame+1 frame) earlier than the current picture is used. On the other hand, in the case of the two-frame delay, in the MV scheme, the MV of the inter-frame prediction result of the picture that is three frames (=1 frame+2 frames) earlier than the current picture is used. 
         [0178]    Therefore, in the MV scheme, AFF mode determination with the higher accuracy is achieved in the one-frame delay rather than the two-frame delay. 
         [0179]    Here, for example, by designating the weighting factor Wmv of the MV scheme as “4” in the case of the one-frame delay, and as “3” in the case of the two-frame delay, it is possible to cope with a difference in the accuracy of AFF mode determination caused by the required delay time. 
         [0180]    In this way, with respect to the weight-based integration determination of the VPD scheme and the MV scheme, values of the weighting factors Wvpd and Wmv are changed by the changing unit  144  in accordance with the operating parameters of the video encoding device  1  that affects each scheme. Accordingly, it is possible to perform the AFF mode determination with high accuracy, thereby improving the encoding efficiency. 
         [0181]    Further, as the factors affecting the weighting factors of the weight-based integration determination, the pixel buffer size and the delay amount have been provided in the above modification example, but they are not limited thereto. Other factors are applicable as long as they affect the accuracy of determination of the VPD scheme and the MV scheme. 
         [0182]    Also, the values of the weighting factors Wvpd and Wmv of the VPD scheme and the MV scheme are not limited to the numerical values represented in the above description, and may be other values. 
         [0183]    In accordance with the above AFF mode determination method, by assigning the weights to the results of the AFF mode determination of the two schemes depending on the required determination accuracy or encoding delay, it is possible to select an appropriate AFF mode determination method in accordance with the purpose. Thus, it is possible to further improve the encoding efficiency. 
         [0184]    (Hardware Configuration of Video Encoding Device) 
         [0185]      FIG. 17  is a block diagram illustrating an example of the hardware configuration of the video encoding device in accordance with the present embodiment. In the video encoding device  1  that is a computer device shown in  FIG. 17 , a CPU  301  controls the entire system in accordance with the program stored in a ROM  304  and/or hard disk drive  306  while using a RAM  305  as a working memory for primary storage. 
         [0186]    Accordingly, there is realized the process in the video encoding unit  110 , the encoding controller  130 , the AFF mode determining unit  140 , the original image generating unit  150  and the reconstructed image converting unit  160  in the video encoding device in accordance with the present embodiment. Further, the external memory  120  in the video encoding device in accordance with the present embodiment may be realized by the RAM  305 , the hard disk drive  306  or the like. 
         [0187]    Further, the input image  9 , the original image  10 , the stream  11 , the reconstructed image  12 , the encoding setting information S 1 , the AFF mode determination information D 21 , the pixel information D 31 , the motion vector (MV) information D 32 , the MV critical value D 33 , and other data are stored in the storage area of the RAM  305 , the hard disk drive  306  or the like. 
         [0188]    Further, the CPU  301  may perform the setting change of various data in the video encoding process in accordance with the present embodiment on the basis of the program stored in the hard disk drive  306  in accordance with the instructions of the user inputted through a mouse  302   a  or keyboard  302 . A display interface  303  is connected to a display such as a CRT and LCD to display information for the user, such as process results, progress of the process, setting change screen of the video encoding process executed by the CPU  301 . 
         [0189]    A removable media drive  307  is mainly used when writing a file to the hard disk drive  306  from removable media, or writing the file read from the hard disk drive  306  to the removable media. As the removable media, a floppy disk (FD), CD-ROM, CD-R, CD-R/W, DVD-ROM, DVD-R, DVD-R/W or MO, memory card, CF card, smart media, SD card, memory stick or the like may be used. 
         [0190]    A network interface  308  is for connecting the video encoding device  1  that is a computer device to an external network. For example, the input image  9  is inputted to the video encoding device  1  through the network interface  308 , and the stream  11  after the encoding process is outputted to an external device or the like from the video encoding device  1  through the network interface  308 . 
         [0191]    Further, the hardware configuration of the video encoding device in accordance with the present embodiment shown in  FIG. 17  is merely an example, and it is needless to say that any other hardware configuration may be used. 
         [0192]    (Summary) 
         [0193]    As described above, in accordance with the present embodiment, it is possible to reduce the processing amount of the encoding process while maintaining the encoding efficiency. 
         [0194]    Further, the scope of the present invention is not limited to the exemplary embodiment that has been illustrated and described, and also includes all embodiments which provide effects equivalent to those of the present invention. Moreover, the scope of the present invention may be defined by a desired combination of specific features among all the disclosed features. 
       APPENDICES 
       [0195]    As is apparent from what has been described in detail in the embodiments in accordance with the present invention, some or all of the above-described embodiments may be also described as the following appendices. However, the following appendices are merely simple examples, and the present invention is not limited thereto. 
       Appendix 1 
       [0196]    A video encoding method, which is performed by a video encoding device having an AFF mode determining unit and a video encoding unit, the method including a first step of performing mode determination of adaptive field/frame coding by the AFF mode determining unit when an input image is an interlaced image, and a second step of encoding the input image by the video encoding unit in accordance with a determination result of the mode determination in the first step. 
       Appendix 2 
       [0197]    A computer-readable storage medium storing a video encoding program for executing a first step of performing mode determination of adaptive field/frame coding when an input image is an interlaced image, and a second step of encoding the input image in accordance with a determination result of the mode determination in the first step. 
         [0198]    In accordance with these configurations, it is possible to reduce the processing amount of the encoding process while maintaining the encoding efficiency. 
       INDUSTRIAL APPLICABILITY 
       [0199]    The present invention may be used in an apparatus for compressing, transmitting, broadcasting and/or recoding digital video information, such as a digital video recorder, video conferencing system and television transmission system. 
       DESCRIPTION OF REFERENCE NUMERALS 
       [0000]    
       
           1  video encoding device 
           9  input image 
           10  original image 
           11  stream 
           12 ,  12 ′ reconstructed image 
           13  intra-frame prediction image 
           14  inter-frame prediction image 
           15  prediction image 
           16  difference image 
           17  restored difference image 
           110  video encoding unit 
           120  external memory 
           130  encoding controller 
           140  AFF mode determining unit 
           141  VPD determination unit 
           141   a  VPD buffer 
           142  MV determination unit 
           142   a  MV buffer 
           143  integration determination unit 
           144  changing unit 
           150  original image generating unit 
           151  original image converting unit 
           152  original image memory 
           160  reconstructed image converting unit 
           161  reconstructed image writing unit 
           162  reconstructed image reading unit 
           170  memory bus 
           210  intra-frame prediction unit 
           220  inter-frame prediction unit 
           230  mode selection unit 
           240  orthogonal transformation unit 
           250  quantization unit 
           260  inverse quantization unit 
           270  inverse orthogonal transformation unit 
           280  variable length encoding unit 
           302  keyboard 
           302   a  mouse 
           303  display interface 
           306  hard disk drive 
           307  removable media drive 
           308  network interface 
         D 1  intra-frame prediction information 
         D 2  intra-frame prediction error 
         D 3  inter-frame prediction information 
         D 4  inter-frame prediction error 
         D 6  code amount information 
         D 7  encoding mode selection information 
         D 8  quantization coefficient 
         D 9  frequency component 
         D 10  quantization value 
         D 11  restored frequency component 
         D 21  mode determination information 
         D 31  pixel information 
         D 32  MV (motion vector) information 
         D 33  MV (motion vector) critical value 
         D 81  intra-frame prediction information 
         D 82  intra-frame prediction error 
         D 83  inter-frame prediction information 
         D 84  inter-frame prediction error 
         D 86  code amount information 
         D 87  encoding mode selection information 
         D 88  quantization coefficient 
         D 89  frequency component 
         D 90  quantization value 
         D 91  restored frequency component 
         S 1  encoding setting information 
           90  original image 
           91  stream 
           92  reconstructed image 
           93  intra-frame prediction image 
           94  inter-frame prediction image 
           95  prediction image 
           96  difference image 
           97  restored difference image 
           810  video encoding unit for performing frame coding 
           820  video encoding unit for performing field coding 
           830  AFF mode selection unit 
           860  video encoding unit for performing frame coding in PAFF 
           861  video encoding unit for performing frame coding in MBAFF 
           862  video encoding unit for performing field coding in MBAFF 
           863  MBAFF mode selection unit 
           870  video encoding unit for performing field coding in PAFF 
           880  PAFF mode selection unit 
           910  intra-frame prediction image 
           910  intra-frame prediction unit 
           920  inter-frame prediction unit 
           930  mode selection unit 
           940  orthogonal transformation unit 
           950  quantization unit 
           960  inverse quantization unit 
           970  inverse orthogonal transformation unit 
           980  variable length encoding unit 
           990  encoding controller