Streaming server and method for transmitting bitstreams

The video encoding method enhances error resilience and coding efficiency by generating a bitstream with a candidate list of motion vectors independent of actual derivation, addressing mismatches caused by lost reference picture information, and enabling flexible standard switching.

JP7825168B2Active Publication Date: 2026-03-06SUN PATENT TRUST
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Conventional video encoding and decoding methods using inter prediction lack sufficient error resilience, particularly due to mismatches in motion vector predictor candidate lists between encoding and decoding devices caused by lost reference picture information.

Method used

A video encoding method that generates a bitstream by creating a candidate list of motion vector candidates for each block, selecting and coding the current block using these candidates, and encoding an index for the selected motion vector, independent of the actual number of derived candidates, allowing parallel processing and increased candidate diversity.

Benefits of technology

Improves error resilience and coding efficiency by enabling decoding without waiting for motion vector predictor candidate derivation, even in the presence of lost reference picture information, and allows switching between different encoding/decoding standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007825168000001
    Figure 0007825168000001
  • Figure 0007825168000002
    Figure 0007825168000002
  • Figure 0007825168000003
    Figure 0007825168000003
Patent Text Reader

Abstract

To provide a bit stream which is generated by a video encoding method which can improve error resistance in video decoding using inter-prediction.SOLUTION: A step for generating a candidate list having multiple candidates of motion vector includes steps of: selecting a first motion vector to be used for encoding a first block and adding the first motion vector, as a candidate of the first motion vector, to the candidate list; selecting a second motion vector to be used for encoding a second block and adding the second motion vector, as a candidate of the second motion vector, to the candidate list, the candidate of the second motion vector having a different value from that of the candidate of the first motion vector; measuring the number of times that the candidates of the first and second motion vectors were selected in a plurality of peripheral blocks; and allocating a motion vector predictor index having a smaller value to the candidate of the second motion vector when the number of times that the candidate of the second motion vector was selected is larger than the number of times that the candidate of the first motion vector was selected.SELECTED DRAWING: Figure 22
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a bitstream and a method for transmitting a bitstream. [Background technology]

[0002] In video coding, the amount of information is generally compressed by utilizing spatial and temporal redundancies of video. Generally, spatial redundancy is utilized by transforming to the frequency domain. Inter-picture prediction (hereinafter referred to as "inter prediction") coding is utilized by utilizing temporal redundancy. In inter prediction coding, when a picture is coded, a coded picture located before or after the current picture in display order is used as a reference picture. A motion vector is then derived from the current picture by motion estimation relative to the reference picture. Then, the temporal redundancy is removed by calculating the difference between predicted image data obtained by motion compensation based on the derived motion vector and the image data of the current picture (see, for example, Non-Patent Document 1). In this motion estimation, a difference between a current block in the coding picture and a block in the reference picture is calculated, and the block in the reference picture with the smallest difference value is determined as the reference block. A motion vector is then estimated using the current block and the reference block. [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] ITU-T Recommendation H.264 "Advanced video coding for generic audiovisual services", March 2010 [Non-patent document 2] JCT-VC, “WD3: Working Draft 3 of High-Efficiency Video Coding”, JCTVC-E603, March 2011. Summary of the Invention [Problem to be solved by the invention]

[0004] However, in the above-mentioned conventional techniques, it is desired to improve the error resistance of video encoding and decoding using inter prediction.

[0005] Therefore, an object of the present invention is to provide a bitstream generated by a video encoding method that can improve the error resilience of video encoding and decoding using inter prediction, and a method for transmitting the bitstream. [Means for solving the problem]

[0006] A streaming server according to one aspect of the present invention is a video encoding method. Generate the bitstream,a packet processing unit that packetizes the generated bitstream to obtain coded data, and a transmitting unit that transmits the packetized coded data, and the video coding method includes the steps of: generating, for each block of an image divided into a plurality of blocks, a candidate list having a plurality of motion vector candidates to be used in coding the current block from motion vectors used in coding the current block spatially or temporally adjacent to the current block; selecting a motion vector candidate for the current block from the candidate list; and coding the current block using the selected motion vector candidate, and the step of generating the candidate list includes the steps of: selecting a first motion vector candidate used in coding a first block of one of the plurality of peripheral blocks; a step of selecting a first motion vector candidate from the first motion vector candidate list and adding it to the candidate list as a first motion vector candidate; a step of selecting a second motion vector used in encoding a second block different from the first block and adding it to the candidate list as a second motion vector candidate; a step of measuring the number of times the first motion vector candidate and the second motion vector candidate are selected in the plurality of neighboring blocks spatially or temporally adjacent to the block to be encoded, wherein the second motion vector candidate has a different value from the first motion vector candidate; and a step of assigning a smaller predicted motion vector index to the second motion vector candidate if the number of times the second motion vector candidate is selected is greater than the number of times the first motion vector candidate is selected.

[0007] These general or specific aspects may be realized by a system, device, method, integrated circuit, computer program, or computer-readable recording medium such as a CD-ROM (Compact Disc Read Only Memory), or may be realized by any combination of a system, method, integrated circuit, computer program, and recording medium. [Effects of the Invention]

[0008] According to one aspect of the present invention, it is possible to improve the error resilience of video encoding and decoding using inter prediction. [Brief explanation of the drawings]

[0009] [Figure 1A] FIG. 1A is a diagram illustrating an example of a reference picture list in a B picture. [Figure 1B] FIG. 1B is a diagram showing an example of a reference picture list for prediction direction 0 in a B picture. [Figure 1C] FIG. 1C is a diagram showing an example of a reference picture list in prediction direction 1 for a B picture. [Figure 2] FIG. 2 is a diagram illustrating motion vectors in the temporal motion vector prediction mode. [Figure 3] FIG. 3 is a diagram showing an example of motion vectors of adjacent blocks used in the predicted motion vector designation mode. [Figure 4] FIG. 4 is a diagram illustrating an example of a candidate motion vector predictor list for prediction direction 0. In FIG. [Figure 5] FIG. 5 is a diagram illustrating an example of a candidate motion vector predictor list for prediction direction 1. In FIG. [Figure 6] FIG. 6 is a diagram showing an example of allocation of bit strings to motion vector predictor indexes. [Figure 7] FIG. 7 is a flowchart showing an example of the encoding process when the predicted motion vector designation mode is used. [Figure 8A] FIG. 8A is a diagram showing an example of calculation of a predicted motion vector. [Figure 8B] FIG. 8B is a diagram showing an example of calculation of a predicted motion vector. [Figure 9] FIG. 9 is a block diagram showing an example of the configuration of a video encoding device that encodes a video using the predicted motion vector specification mode. [Figure 10] FIG. 10 is a flowchart showing an example of a decoding process when the predicted motion vector designation mode is used. [Figure 11] FIG. 11 is a block diagram showing an example of the configuration of a video decoding device that decodes video coded using the predicted motion vector specification mode. [Figure 12] FIG. 12 is a diagram showing syntax when adding a predicted motion vector index to a bitstream. [Figure 13] FIG. 13 is a block diagram showing a configuration of a video coding device according to the first embodiment. [Figure 14] FIG. 14 is a flowchart showing the processing operations of the video encoding device according to the first embodiment. [Figure 15] FIG. 15 is a diagram showing an example of a candidate motion vector predictor list for prediction direction 0 according to the first embodiment. [Figure 16] FIG. 16 is a diagram showing an example of a candidate motion vector predictor list for prediction direction 1 according to the first embodiment. [Figure 17] FIG. 17 is a flowchart showing a calculation process of motion vector predictor candidates and a motion vector predictor candidate list size according to the first embodiment. [Figure 18] FIG. 18 is a flowchart showing the process of updating the number of predictable candidates according to the first embodiment. [Figure 19] FIG. 19 is a flowchart showing the process of adding a new candidate according to the first embodiment. [Figure 20] FIG. 20 is a flowchart showing a process related to selection of a motion vector predictor candidate according to the first embodiment. [Figure 21] FIG. 21 is a block diagram showing a configuration of a video coding device according to the second embodiment. [Figure 22] FIG. 22 is a flowchart showing the processing operations of the video encoding device according to the second embodiment. [Figure 23] FIG. 23 is a block diagram showing a configuration of a video decoding device according to the third embodiment. [Figure 24] FIG. 24 is a flowchart showing the processing operations of the video decoding apparatus according to the third embodiment. [Figure 25]FIG. 25 is a flowchart showing the process of calculating the number of predictable candidates according to the third embodiment. [Figure 26] FIG. 26 is a flowchart showing a calculation process of motion vector predictor candidates according to the third embodiment. [Figure 27] FIG. 27 is a diagram showing an example of syntax when adding a motion vector predictor index to a bitstream. [Figure 28] FIG. 28 is a diagram showing an example of syntax when the motion vector predictor candidate list size is fixed to the maximum value of the number of motion vector predictor candidates. [Figure 29] FIG. 29 is a block diagram showing a configuration of a video decoding device according to the fourth embodiment. In FIG. [Figure 30] FIG. 30 is a flowchart showing the processing operations of the video decoding apparatus according to the fourth embodiment. [Figure 31] FIG. 31 is a diagram showing the overall configuration of a content supply system that realizes a content distribution service. [Figure 32] FIG. 32 is a diagram showing the overall configuration of a digital broadcasting system. [Figure 33] FIG. 33 is a block diagram showing an example of the configuration of a television. [Figure 34] FIG. 34 is a block diagram showing an example of the configuration of an information reproducing / recording unit that reads and writes information from and to a recording medium that is an optical disc. [Figure 35] FIG. 35 is a diagram showing an example of the structure of a recording medium that is an optical disc. [Figure 36A] FIG. 36A is a diagram showing an example of a mobile phone. [Figure 36B] FIG. 36B is a block diagram showing an example of the configuration of a mobile phone. [Figure 37] FIG. 37 is a diagram showing the structure of multiplexed data. [Figure 38] FIG. 38 is a diagram showing a schematic diagram of how each stream is multiplexed in multiplexed data. [Figure 39]FIG. 39 shows in more detail how a video stream is stored in a PES packet sequence. [Figure 40] FIG. 40 shows the structure of TS packets and source packets in multiplexed data. [Figure 41] FIG. 41 shows the data structure of a PMT. [Figure 42] FIG. 42 is a diagram showing the internal structure of the multiplexed data information. [Figure 43] FIG. 43 shows the internal structure of the stream attribute information. [Figure 44] FIG. 44 shows the steps for identifying video data. [Figure 45] FIG. 45 is a block diagram showing an example of the configuration of an integrated circuit that realizes the video encoding method and video decoding method according to each embodiment. [Figure 46] FIG. 46 is a diagram showing a configuration for switching the drive frequency. [Figure 47] FIG. 47 is a diagram showing steps for identifying video data and switching the drive frequency. [Figure 48] FIG. 48 is a diagram showing an example of a lookup table in which video data standards and drive frequencies are associated with each other. [Figure 49A] FIG. 49A is a diagram showing an example of a configuration in which modules of a signal processing unit are shared. [Figure 49B] FIG. 49B is a diagram showing another example of a configuration in which modules of a signal processing unit are shared. DETAILED DESCRIPTION OF THE INVENTION

[0010] (Findings that form the basis of the present invention) The video coding method known as H.264, which has already been standardized, uses three picture types, I-picture, P-picture, and B-picture, to compress the amount of information.

[0011] I pictures are not coded using inter-prediction coding. That is, I pictures are coded using intra-picture prediction (hereinafter referred to as "intra-prediction") coding. P pictures are coded using inter-prediction coding with reference to one previously coded picture located before or after the current picture in display order. B pictures are coded using inter-prediction coding with reference to two previously coded pictures located before or after the current picture in display order.

[0012] In inter-prediction coding, a reference picture list is generated to identify reference pictures. The reference picture list is a list in which reference picture indexes are assigned to coded reference pictures to be referenced in inter-prediction. For example, a B picture can be coded by referencing two pictures, so two reference picture lists (L0, L1) are generated.

[0013] Fig. 1A is a diagram illustrating an example of a reference picture list in a B picture. Fig. 1B shows an example of reference picture list 0 (L0) for prediction direction 0 in bidirectional prediction. Here, in reference picture list 0, value 0 of reference picture index 0 is assigned to reference picture 0 in display order 2. Also, value 1 of reference picture index 0 is assigned to reference picture 1 in display order 1. Also, value 2 of reference picture index 0 is assigned to reference picture 2 in display order 0. In other words, the closer a reference picture is temporally to the current picture in display order, the smaller the reference picture index assigned to it.

[0014] 1C shows an example of reference picture list 1 (L1) for prediction direction 1 in bidirectional prediction. Here, in reference picture list 1, the value 0 of reference picture index 1 is assigned to reference picture 1 in display order 1. The value 1 of reference picture index 1 is assigned to reference picture 0 in display order 2. The value 2 of reference picture index 2 is assigned to reference picture 2 in display order 0.

[0015] In this way, it is possible to assign different reference picture index values ​​to each reference picture for each prediction direction (reference pictures 0 and 1 in FIG. 1A) or to assign the same reference picture index value (reference picture 2 in FIG. 1A).

[0016] Furthermore, in a video coding method called H.264 (Non-Patent Document 1), a motion vector estimation mode is used as the coding mode for inter-prediction of each block to be coded in a B picture. In the motion vector estimation mode, a difference value between predicted image data and image data of the block to be coded, and a motion vector used to generate the predicted image data are coded. In the motion vector estimation mode, a prediction direction can be selected between bidirectional prediction and unidirectional prediction. In bidirectional prediction, a predicted image is generated by referring to two previously coded pictures located before or after the picture to be coded. In unidirectional prediction, a predicted image is generated by referring to one previously coded picture located before or after the picture to be coded.

[0017] Furthermore, in the video coding method known as H.264, when deriving a motion vector in coding a B picture, a coding mode known as temporal motion vector prediction mode can be selected. The inter-prediction coding method in the temporal motion vector prediction mode will be explained using Figure 2.

[0018] Fig. 2 is a diagram illustrating motion vectors in the temporal motion vector prediction mode. Specifically, Fig. 2 shows a case where block a in picture B2 is coded in the temporal motion vector prediction mode.

[0019] Here, the motion vector vb used to encode block b (hereinafter referred to as the "co-located block"), which is located at the same position as block a in picture P3, a reference picture after picture B2, is used. Motion vector vb is the motion vector used when block b was encoded with reference to picture P1.

[0020] Two reference blocks for block a are obtained from picture P1, which is a forward reference picture, and picture P3, which is a backward reference picture, using a motion vector parallel to motion vector vb. Then, block a is coded by performing bidirectional prediction based on the two reference blocks obtained. That is, the motion vectors used when coding block a are motion vector va1 for picture P1 and motion vector va2 for picture P3.

[0021] Furthermore, a motion vector predictor designation mode has been studied as a method for encoding the motion vector of each block to be encoded in a B picture or a P picture (Non-Patent Document 2). In the motion vector predictor designation mode, a motion vector predictor candidate is generated from the motion vector used when encoding a block adjacent to the block to be encoded. A motion vector predictor is then selected from the motion vector predictor candidate, and the motion vector of the block to be encoded is encoded. At this time, an index or the like of the selected motion vector predictor is added to the bitstream. This makes it possible to select the same motion vector predictor as the motion vector used during encoding during decoding. A specific example will be described with reference to FIG. 3.

[0022] 3 is a diagram showing an example of motion vectors of adjacent blocks used in the predicted motion vector specification mode. In FIG. 3, adjacent block A is a coded block adjacent to the left of the block to be coded. Adjacent block B is a coded block adjacent to the above of the block to be coded. Adjacent block C is a coded block adjacent to the upper right of the block to be coded. Adjacent block D is a coded block adjacent to the lower left of the block to be coded.

[0023] 3, the current block to be coded is a block coded using bidirectional prediction, which, as a result of motion estimation or the like, has a motion vector MvL0 for prediction direction 0 as the motion vector for the reference picture indicated by reference picture index RefL0 for prediction direction 0, and a motion vector MvL1 for prediction direction 1 as the motion vector for the reference picture indicated by reference picture index RefL1 for prediction direction 1. Here, MvL0 is a motion vector that references a reference picture identified by reference picture list 0 (L0). Also, MvL1 is a motion vector that references a reference picture identified by reference picture list 1 (L1).

[0024] Furthermore, neighboring block A is a block coded using unidirectional prediction in prediction direction 0. Neighboring block A has a motion vector MvL0_A in prediction direction 0 as a motion vector for a reference picture indicated by a reference picture index RefL0_A in prediction direction 0. Neighboring block B is a block coded using unidirectional prediction in prediction direction 1. Neighboring block B has a motion vector MvL1_B in prediction direction 1 as a motion vector for a reference picture indicated by a reference picture index RefL1_B in prediction direction 1. Neighboring block C is a block coded using intra prediction. Neighboring block D is a block coded using unidirectional prediction in prediction direction 0. Neighboring block D has a motion vector MvL0_D in prediction direction 0 as a motion vector for a reference picture indicated by a reference picture index RefL0_D in prediction direction 0.

[0025] In this case, as the predicted motion vector of the block to be coded, for example, from among the motion vector predictor candidates generated from the motion vectors of adjacent blocks A, B, C, and D and the motion vectors of the temporal predicted motion vector mode obtained using the co-located block, a predicted motion vector that can most efficiently code the motion vector of the block to be coded is selected.Then, a predicted motion vector index representing the selected predicted motion vector is added to the bitstream.For example, when coding the motion vector MvL0 of the block to be coded in prediction direction 0, if the motion vector MvL0_A of the adjacent block A in prediction direction 0 is selected as the predicted motion vector, as shown in FIG. 4, only the value "0" of the predicted motion vector index indicating that the motion vector predictor candidate generated from the adjacent block A has been used is added to the bitstream.This allows the amount of information of the motion vector MvL0 of the block to be coded in prediction direction 0 to be reduced.

[0026] FIG. 4 is a diagram showing an example of a motion vector predictor candidate list for prediction direction 0. Also, as shown in FIG. 4, in the motion vector predictor designation mode, candidates for which generation of a motion vector predictor is impossible (hereinafter referred to as "unpredictable candidates") or candidates whose values ​​match those of other motion vector predictor candidates (hereinafter referred to as "duplicate candidates") are deleted from the motion vector predictor candidates. In this way, by reducing the number of motion vector predictor candidates, the amount of code allocated to the motion vector predictor index is reduced. Here, the fact that generation of a motion vector predictor is impossible indicates that the neighboring block is (1) a block coded by intra prediction, (2) a block outside the boundary of a slice or picture including the current block to be coded, or (3) a block that has not yet been coded, etc.

[0027] In the example of FIG. 4, neighboring block C is coded by intra prediction. Therefore, a prediction candidate having a motion vector predictor index value of "3" is an unpredictable candidate and is deleted from the motion vector predictor candidate list. Furthermore, since the motion vector predictor of prediction direction 0 generated from neighboring block D matches the motion vector predictor of prediction direction 0 generated from neighboring block A in value, a prediction candidate having a motion vector predictor index value of "4" is deleted from the motion vector predictor candidate list. As a result, the number of motion vector predictor candidates for prediction direction 0 finally becomes 3, and the list size of the motion vector predictor candidate list for prediction direction 0 is set to 3.

[0028] 5 is a diagram showing an example of a motion vector predictor candidate list for prediction direction 1. In the example shown in Fig. 5, by deleting unpredictable candidates and overlapping candidates, the final number of motion vector predictor candidates for prediction direction 1 becomes 2, and the list size of the motion vector predictor candidate list for prediction direction 1 is set to 2.

[0029] The motion vector predictor index is assigned a bit string according to the size of the motion vector predictor candidate list, as shown in Fig. 6, and is variable-length coded. Also, when the motion vector predictor candidate list size is 1, the motion vector predictor index is not attached to the bitstream, and is estimated to have a value of 0 on the decoding side. In this way, in the motion vector predictor designation mode, the bit string assigned to the motion vector predictor index is changed depending on the size of the motion vector predictor candidate list, thereby reducing the amount of coding.

[0030] FIG. 7 is a flowchart showing an example of the encoding process when the predicted motion vector designation mode is used.

[0031] In step S1001, a motion vector predictor candidate for prediction direction X is calculated from adjacent blocks and co-located blocks (hereinafter referred to as "prediction block candidates"). Here, X takes the value of "0" or "1", representing prediction direction 0 or prediction direction 1, respectively. The motion vector predictor candidate sMvLX for prediction direction X is calculated by the following equation using the motion vector MvLX_N and reference picture index RefLX_N of the prediction block candidate, and the reference picture index RefLX of the block to be coded.

[0032] sMvLX= MvLX_N×(POC(RefLX)-curPOC) / (POC(RefLX_N)-curPOC) …(Formula 1)

[0033] Here, POC(RefLX) indicates the display order of the reference picture indicated by the reference picture index RefLX, POC(RefLX_N) indicates the display order of the reference picture indicated by the reference picture index RefLX_N, and curPOC indicates the display order of the picture to be coded. Note that if the prediction block candidate does not have a motion vector MvLX_N of the prediction direction X, the motion vector MvL(1-X)_N of the prediction direction (1-X) and the reference picture index RefL(1-X)_N are used to calculate the predicted motion vector sMvLX according to Equation 2.

[0034] sMvLX= MvL(1-X)_N×(POC(RefLX)-curPOC) / (POC(RefL(1-X)_N)-curPOC) …(Formula 2)

[0035] 8A and 8B are diagrams showing examples of calculating a predicted motion vector using Equation 1 and Equation 2. As shown in Equation 1 and Equation 2, when the values ​​of POC(RefLX) and POC(RefLX_N) are the same, that is, when the same picture is referenced, scaling can be omitted.

[0036] In step S1002, duplicate candidates and unpredictable candidates are deleted from the motion vector predictor candidates of prediction direction X. In step S1003, the number of motion vector predictor candidates after the deletion process is set to the motion vector predictor candidate list size. In step S1004, a motion vector predictor index to be used for encoding the motion vector of prediction direction X of the current block to be encoded is determined. In step S1005, the determined motion vector predictor index is variable-length coded using a bit string determined by the motion vector predictor candidate list size.

[0037] FIG. 9 is a block diagram showing an example of the configuration of a video encoding device 1000 that encodes video using the predicted motion vector specification mode.

[0038] As shown in FIG. 9, the video encoding device 1000 includes a subtraction unit 1001, an orthogonal transformation unit 1002, a quantization unit 1003, an inverse quantization unit 1004, an inverse orthogonal transformation unit 1005, an addition unit 1006, a block memory 1007, a frame memory 1008, an intra prediction unit 1009, an inter prediction unit 1010, an inter prediction control unit 1011, a picture type determination unit 1012, a switch 1013, a motion vector candidate prediction calculation unit 1014, a colPic memory 1015, and a variable length encoding unit 1016.

[0039] 9, the motion vector predictor candidate calculation unit 1014 calculates motion vector predictor candidates. Then, the motion vector predictor candidate calculation unit 1014 transmits the calculated number of motion vector predictor candidates to the variable-length coding unit 1016. The variable-length coding unit 1016 sets the number of motion vector predictor candidates to the motion vector predictor candidate list size, which is a coding parameter. Then, the variable-length coding unit 1016 assigns a bit string according to the motion vector predictor candidate list size to the motion vector predictor index used for coding, and performs variable-length coding.

[0040] FIG. 10 is a flowchart showing an example of a decoding process when the predicted motion vector designation mode is used.

[0041] In step S2001, a motion vector predictor candidate in a prediction direction X is calculated from adjacent blocks and co-located blocks (prediction block candidates). In step S2002, duplicate candidates and unpredictable candidates are deleted from the motion vector predictor candidates. In step S2003, the number of motion vector predictor candidates after the deletion process is set to the motion vector predictor candidate list size. In step S2004, a motion vector predictor index used for decoding the current block is decoded from the bitstream using the motion vector predictor candidate list size. In step S2005, a motion vector is calculated by adding a differential motion vector to the motion vector predictor candidate indicated by the decoded motion vector predictor index, and a predicted image is generated using the calculated motion vector, and a decoding process is performed.

[0042] FIG. 11 is a block diagram showing an example of the configuration of a video decoding device that decodes video coded using the predicted motion vector specification mode.

[0043] As shown in FIG. 11, the video decoding device 2000 includes a variable length decoding unit 2001, an inverse quantization unit 2002, an inverse orthogonal transformation unit 2003, an addition unit 2004, a block memory 2005, a frame memory 2006, an intra prediction unit 2007, an inter prediction unit 2008, an inter prediction control unit 2009, a switch 2010, a predicted motion vector candidate calculation unit 2011, and a colPic memory 2012.

[0044] 11, a motion vector predictor candidate calculation unit 2011 calculates motion vector predictor candidates. Then, the motion vector predictor candidate calculation unit 2011 transmits the calculated number of motion vector predictor candidates to a variable length decoding unit 2001. The variable length decoding unit 2001 sets the number of motion vector predictor candidates to a motion vector predictor candidate list size, which is a decoding parameter. Then, the variable length decoding unit 2001 decodes a motion vector predictor index included in the bitstream using the motion vector predictor candidate list size.

[0045] 12 is a diagram showing syntax when adding a motion vector predictor index to a bitstream. In FIG. 12, inter_pred_flag represents a prediction direction flag for inter prediction. mvp_idx represents a motion vector predictor index. NumMVPCand represents a motion vector predictor candidate list size. This NumMVPCand is set to the number of motion vector predictor candidates after removing unpredictable candidates and redundant candidates from the motion vector predictor candidates.

[0046] As described above, a video is encoded or decoded using a motion vector predictor specification mode. However, in the motion vector predictor specification mode, the number of motion vector predictor candidates is set in the motion vector predictor candidate list size used when encoding or decoding a motion vector predictor index. This number of motion vector predictor candidates is obtained after removing unpredictable candidates or duplicate candidates using reference picture information including co-located blocks, etc. Therefore, when a mismatch occurs between the number of motion vector predictor candidates between a video encoding device and a video decoding device, a mismatch occurs between the bit strings assigned to the motion vector predictor index between the video encoding device and the video decoding device. As a result, the video decoding device may not be able to correctly decode the bitstream.

[0047] For example, if information about a reference picture referenced as a co-located block is lost due to packet loss or the like occurring on a transmission path, the motion vector or reference picture index of the co-located block becomes unknown. Therefore, information about a motion vector predictor candidate generated from the co-located block becomes unknown. In such a case, it becomes impossible to correctly remove unpredictable candidates or duplicate candidates from the motion vector predictor candidates during decoding. As a result, the video decoding device cannot correctly calculate the motion vector predictor candidate list size and cannot correctly decode the motion vector predictor index.

[0048] Therefore, the present invention aims to provide a video coding method that improves error resilience by calculating the predicted motion vector candidate list size used when encoding or decoding a predicted motion vector index in a manner that does not depend on reference picture information including co-located blocks, etc.

[0049] Therefore, a video encoding method according to one aspect of the present invention is a video encoding method that calculates a predicted motion vector to be used when encoding the motion vector of a block to be encoded, and generates a bitstream by encoding the block to be encoded, and includes: a determination step of determining the maximum number of predicted motion vector candidates to be candidates for the predicted motion vector; a first derivation step of deriving a first predicted motion vector candidate; a determination step of determining whether the number of the first predicted motion vector candidates is smaller than the maximum number; a second derivation step of deriving a second predicted motion vector candidate when it is determined that the number of the first predicted motion vector candidates is smaller than the maximum number; a selection step of selecting the predicted motion vector to be used for encoding the motion vector of the block to be encoded from the first predicted motion vector candidate and the second predicted motion vector candidate; and an encoding step of encoding an index for identifying the selected predicted motion vector using the determined maximum number and adding the encoded index to the bitstream.

[0050] According to this, the index for identifying the motion vector predictor candidate can be coded using the determined maximum number. That is, the index can be coded independently of the number of motion vector predictor candidate that are actually derived. Therefore, even if information necessary for deriving the motion vector predictor candidate (for example, information on co-located blocks, etc.) is lost, the decoding side can decode the index, thereby improving error resilience. Furthermore, the decoding side can decode the index independently of the number of motion vector predictor candidate that are actually derived. That is, the decoding side can perform the index decoding process without waiting for the motion vector predictor candidate derivation process. That is, it is possible to generate a bitstream that allows the motion vector predictor candidate derivation process and the index decoding process to be performed in parallel.

[0051] Furthermore, according to this, when it is determined that the number of first motion vector predictor candidates is smaller than the maximum number, it is possible to derive second motion vector predictor candidates. Therefore, it is possible to increase the number of motion vector predictor candidates within a range not exceeding the maximum number, and it is possible to improve coding efficiency.

[0052] For example, in the first derivation, a motion vector predictor candidate that does not overlap with a first motion vector predictor candidate whose motion vector has already been derived may be derived as the first motion vector predictor candidate.

[0053] This allows for the elimination of duplicate first motion vector predictor candidates. As a result, the number of second motion vector predictor candidates can be increased, and the number of selectable motion vectors can be increased. This further improves coding efficiency.

[0054] For example, in the first derivation, the first motion vector predictor candidate may be derived based on a motion vector used in encoding a block spatially or temporally adjacent to the current block to be encoded.

[0055] This makes it possible to derive the first motion vector predictor candidate based on the motion vector used in encoding the block spatially or temporally adjacent to the current block to be encoded.

[0056] For example, in the first derivation step, the motion vectors used to encode blocks spatially adjacent to the block to be encoded, excluding blocks encoded using intra prediction, blocks located outside the slice or picture boundary containing the block to be encoded, and blocks that have not yet been encoded, may be derived as the first predicted motion vector candidates.

[0057] This makes it possible to derive the first motion vector predictor candidate from an appropriate block for obtaining a motion vector predictor candidate.

[0058] For example, in the second derivation, a motion vector predictor candidate whose motion vector is different from that of the first motion vector predictor candidate may be derived as the second motion vector predictor candidate.

[0059] This allows a motion vector predictor candidate whose motion vector is different from that of the first motion vector predictor candidate to be derived as the second motion vector predictor candidate. This allows an increase in the number of motion vector predictor candidates whose motion vectors are different, thereby further improving coding efficiency.

[0060] For example, the encoding step may further include adding information indicating the determined maximum number to the bitstream.

[0061] This allows information indicating the determined maximum number to be added to the bitstream, making it possible to switch the maximum number in appropriate units and improving coding efficiency.

[0062] For example, the video encoding method may further include a switching step of switching the encoding process to a first encoding process conforming to a first standard or a second encoding process conforming to a second standard, and an adding step of adding identification information indicating the first standard or the second standard to which the switched encoding process conforms to the bitstream, and when the encoding process is switched to the first encoding process, the determination step, the first derivation step, the judgment step, the second derivation step, the selection step, and the encoding step may be performed as the first encoding process.

[0063] This makes it possible to switch between a first encoding process conforming to the first standard and a second encoding process conforming to the second standard.

[0064] In addition, a video decoding method according to one aspect of the present invention is a video decoding method that calculates a predicted motion vector to be used when decoding the motion vector of a block to be decoded included in a bitstream and decodes the block to be decoded, and includes a determination step of determining a maximum number of predicted motion vector candidates to be candidates for the predicted motion vector, a first derivation step of deriving a first predicted motion vector candidate, a determination step of determining whether the number of the first predicted motion vector candidates is smaller than the maximum number, a second derivation step of deriving a second predicted motion vector candidate when it is determined that the number of the first predicted motion vector candidates is smaller than the maximum number, a decoding step of decoding an encoded index attached to the bitstream, which is an index for identifying the predicted motion vector, using the determined maximum number, and a selection step of selecting a predicted motion vector to be used for decoding the block to be decoded from the first predicted motion vector candidate and the second predicted motion vector candidate based on the decoded index.

[0065] According to this, the index for identifying the motion vector predictor candidate can be decoded using the determined maximum number. That is, the index can be decoded without depending on the number of motion vector predictor candidate actually derived. Therefore, even if information necessary for deriving the motion vector predictor candidate (for example, information on co-located blocks, etc.) is lost, the index can be decoded, thereby improving error resilience. Furthermore, the index can be decoded without waiting for the derivation process of the motion vector predictor candidate, and the derivation process of the motion vector predictor candidate and the decoding process of the index can be performed in parallel.

[0066] Furthermore, according to this, when it is determined that the number of first motion vector predictor candidates is smaller than the maximum number, it is possible to derive second motion vector predictor candidates. Therefore, it is possible to increase the number of motion vector predictor candidates within a range not exceeding the maximum number, and it is possible to decode coded images with improved coding efficiency.

[0067] For example, in the first derivation, a motion vector predictor candidate that does not overlap with a first motion vector predictor candidate whose motion vector has already been derived may be derived as the first motion vector predictor candidate.

[0068] This allows for the elimination of duplicate first motion vector predictor candidates. As a result, the number of second motion vector predictor candidates can be increased, and the number of selectable motion vectors can be increased. Therefore, it becomes possible to decode coded images with further improved coding efficiency.

[0069] For example, in the first derivation, the first motion vector predictor candidate may be derived based on a motion vector used in decoding a block spatially or temporally adjacent to the current block to be decoded.

[0070] This makes it possible to derive the first motion vector predictor candidate based on the motion vector used in decoding the block spatially or temporally adjacent to the current block.

[0071] For example, in the first derivation step, the motion vector used to decode blocks spatially adjacent to the block to be decoded, excluding blocks decoded by intra prediction, blocks located outside the slice or picture boundary containing the block to be decoded, and blocks that have not yet been decoded, may be derived as the first predicted motion vector candidate.

[0072] This makes it possible to derive the first motion vector predictor candidate from an appropriate block for obtaining a motion vector predictor candidate.

[0073] For example, in the second derivation, a motion vector predictor candidate whose motion vector is different from that of the first motion vector predictor candidate may be derived as the second motion vector predictor candidate.

[0074] This allows a motion vector predictor candidate whose motion vector is different from that of the first motion vector predictor candidate to be derived as a second motion vector predictor candidate. Therefore, it is possible to increase the number of motion vector predictor candidates whose motion vectors are different, and to decode coded images with improved coding efficiency.

[0075] For example, in the determining step, the maximum number may be determined based on information indicating the maximum number added to the bitstream.

[0076] This allows the maximum number to be determined based on information added to the bitstream, making it possible to decode an image that has been coded by switching the maximum number in appropriate units.

[0077] For example, the video decoding method may further include a switching step of switching the decoding process to a first decoding process conforming to the first standard or a second decoding process conforming to the second standard depending on identification information indicating the first standard or the second standard added to the bitstream, and when the decoding process is switched to the first decoding process, the determination step, the first derivation step, the judgment step, the second derivation step, the decoding step, and the selection step may be performed as the first decoding process.

[0078] This makes it possible to switch between the first decoding process conforming to the first standard and the second decoding process conforming to the second standard.

[0079] These general or specific aspects may be realized as a system, a method, an integrated circuit, a computer program, or a computer-readable recording medium such as a CD-ROM, or as any combination of a system, a method, an integrated circuit, a computer program, or a recording medium.

[0080] A video encoding device and a video decoding device according to an aspect of the present invention will be specifically described below with reference to the drawings.

[0081] It should be noted that the embodiments described below each illustrate a specific example of the present invention. The numerical values, shapes, materials, components, component placement and connection configurations, steps, and step order shown in the following embodiments are merely examples and are not intended to limit the present invention. Furthermore, among the components in the following embodiments, components that are not described in the independent claims that represent the highest concept are described as optional components.

[0082] (Embodiment 1) FIG. 13 is a block diagram showing a configuration of a video coding device 100 according to the first embodiment.

[0083] As shown in FIG. 13, the video encoding device 100 includes a subtraction unit 101, an orthogonal transformation unit 102, a quantization unit 103, an inverse quantization unit 104, an inverse orthogonal transformation unit 105, an addition unit 106, a block memory 107, a frame memory 108, an intra prediction unit 109, an inter prediction unit 110, an inter prediction control unit 111, a picture type determination unit 112, a switch 113, a predicted motion vector candidate calculation unit 114, a colPic memory 115, and a variable length encoding unit 116.

[0084] The subtraction unit 101 generates prediction error data by subtracting predicted image data from input image data included in an input image sequence for each block. The orthogonal transformation unit 102 transforms the generated prediction error data from the image domain to the frequency domain. The quantization unit 103 quantizes the prediction error data transformed into the frequency domain.

[0085] The inverse quantization unit 104 performs inverse quantization processing on the prediction error data quantized by the quantization unit 103. The inverse orthogonal transformation unit 105 transforms the inverse quantized prediction error data from the frequency domain to the image domain.

[0086] The adder 106 generates reconstructed image data for each block to be coded by adding the predicted image data and the prediction error data that has been inversely quantized by the inverse orthogonal transformer 105. The block memory 107 stores the reconstructed image data in units of blocks. The frame memory 108 stores the reconstructed image data in units of frames.

[0087] The picture type determination unit 112 determines which picture type, an I picture, a B picture, or a P picture, the input image data will be coded as. The picture type determination unit 112 then generates picture type information. The intra prediction unit 109 performs intra prediction using reconstructed image data for each block stored in the block memory 107, thereby generating intra-predicted image data for the block to be coded. The inter prediction unit 110 performs inter prediction using reconstructed image data for each frame stored in the frame memory 108 and a motion vector derived by motion estimation or the like, thereby generating inter-predicted image data for the block to be coded.

[0088] When the current block to be coded is intra-predictively coded, the switch 113 outputs the intra-predicted image data generated by the intra-prediction unit 109 to the subtraction unit 101 and the addition unit 106 as predicted image data of the current block to be coded. On the other hand, when the current block to be coded is inter-predictively coded, the switch 113 outputs the inter-predicted image data generated by the inter-prediction unit 110 to the subtraction unit 101 and the addition unit 106 as predicted image data of the current block to be coded.

[0089] The motion vector predictor candidate calculation unit 114 derives motion vector predictor candidates for the motion vector predictor specification mode using colPic information such as motion vectors of blocks adjacent to the current block to be coded and motion vectors of co-located blocks stored in the colPic memory 115. The motion vector predictor candidate calculation unit 114 then calculates the number of possible predictor candidates using a method described below. The motion vector predictor candidate calculation unit 114 also assigns a motion vector predictor index value to the derived motion vector predictor candidate. The motion vector predictor candidate calculation unit 114 then sends the motion vector predictor candidate and the motion vector predictor index to the inter prediction control unit 111. The motion vector predictor candidate calculation unit 114 also transmits the calculated number of possible predictor candidates to the variable-length coding unit 116.

[0090] The inter prediction control unit 111 controls the inter prediction unit 110 to perform inter prediction coding using an inter prediction image generated using a motion vector derived by motion estimation. The inter prediction control unit 111 also selects a motion vector predictor candidate optimal for coding the motion vector used in the inter prediction coding, using a method described below. The inter prediction control unit 111 then sends a motion vector predictor index corresponding to the selected motion vector predictor candidate and prediction error information (differential motion vector) to the variable length coding unit 116. The inter prediction control unit 111 also transfers colPic information including the motion vector of the current block to be coded, etc., to the colPic memory 115.

[0091] The variable-length coding unit 116 generates a bitstream by performing variable-length coding on the quantized prediction error data, the prediction direction flag, the picture type information, and the differential motion vector. The variable-length coding unit 116 also sets the number of possible predictors to the motion vector predictor candidate list size. The variable-length coding unit 116 then performs variable-length coding by assigning a bit string according to the motion vector predictor candidate list size to the motion vector predictor index used in the motion vector coding.

[0092] FIG. 14 is a flowchart showing the processing operations of the video coding apparatus 100 according to the first embodiment.

[0093] In step S101, the inter prediction control unit 111 determines the prediction direction, reference picture index, and motion vector of the current block to be coded by motion estimation. Here, in the motion estimation, for example, a difference value between the current block to be coded in the coding picture and a block in the reference picture is calculated, and the block in the reference picture with the smallest difference value is determined as the reference block. Then, a motion vector is calculated using a method for calculating a motion vector from the position of the current block to be coded and the position of the reference block. In addition, the inter prediction control unit 111 performs motion estimation on the reference pictures of prediction direction 0 and prediction direction 1, respectively, and calculates whether to select prediction direction 0, prediction direction 1, or bidirectional prediction using, for example, the following equation of the RD optimization model:

[0094] Cost=D+λ×R…(Formula 3)

[0095] In Equation 3, D represents the coding distortion, and is calculated by, for example, the sum of absolute differences between the pixel values ​​obtained by encoding and decoding a block to be coded using a predicted image generated by a certain motion vector and the original pixel values ​​of the block to be coded. R represents the amount of generated code, and is calculated by, for example, the amount of code required to encode the motion vector used to generate the predicted image. λ is Lagrange's undetermined multiplier.

[0096] In step S102, the motion vector predictor candidate calculation unit 114 derives motion vector predictor candidates from neighboring blocks and co-located blocks of the current block to be coded. In addition, the motion vector predictor candidate calculation unit 114 calculates the motion vector predictor candidate list size by a method described later.

[0097] 3, the motion vector predictor candidate calculation unit 114 selects, as motion vector predictor candidate for the current block, the motion vectors of the neighboring blocks A, B, C, and D. Furthermore, the motion vector predictor candidate calculation unit 114 calculates, as motion vector predictor candidate, a motion vector calculated from the motion vector of the co-located block using a temporal prediction mode.

[0098] The motion vector predictor candidate calculation unit 114 assigns motion vector predictor indices to the motion vector predictor candidates of prediction direction 0 and prediction direction 1, as shown in Figures 15(a) and 16(a). Then, the motion vector predictor candidate calculation unit 114 calculates a motion vector predictor candidate list and a motion vector predictor candidate list size, as shown in Figures 15(b) and 16(b), by deleting unpredictable candidates and redundant candidates and adding new candidates, using a method described below.

[0099] The smaller the value of the motion vector predictor index, the shorter the code assigned to it. That is, when the value of the motion vector predictor index is small, the amount of information required for the motion vector predictor index is small. On the other hand, when the value of the motion vector predictor index is large, the amount of information required for the motion vector predictor index is large. Therefore, when a motion vector predictor candidate that is likely to become a motion vector predictor with higher accuracy is assigned a motion vector predictor index with a small value, the coding efficiency is improved.

[0100] Therefore, the motion vector predictor candidate calculation unit 114 may, for example, measure the number of times each motion vector predictor candidate has been selected as a motion vector predictor, and assign a smaller value of the motion vector predictor index to the motion vector predictor candidate with a larger number of times. Specifically, it is conceivable to identify the motion vector predictor selected in the neighboring block, and to assign a smaller value of the motion vector predictor index to the identified motion vector predictor candidate when encoding the current block.

[0101] In addition, if the adjacent block does not have information such as a motion vector (for example, if it is a block coded using intra-prediction, if it is a block located outside the boundary of a picture or slice, or if it is a block that has not yet been coded), it cannot be used as a candidate predicted motion vector.

[0102] In this embodiment, a candidate that cannot be used as a motion vector predictor is called an unpredictable candidate. A candidate that can be used as a motion vector predictor is called a predictable candidate. Among multiple motion vector predictor candidates, a candidate whose value matches that of any other motion vector predictor candidate is called a duplicate candidate.

[0103] In the case of Figure 3, neighboring block C is a block coded using intra prediction, and is therefore an unpredictable candidate. Also, the predicted motion vector sMvL0_D of prediction direction 0 generated from neighboring block D matches the predicted motion vector MvL0_A of prediction direction 0 generated from neighboring block A, and is therefore a duplicate candidate.

[0104] In step S103, the inter prediction control unit 111 determines the value of the predicted motion vector index used for encoding the motion vector in the prediction direction X using a method described below.

[0105] In step S104, the variable-length coding unit 116 assigns a bit string according to the predicted motion vector candidate list size as shown in Figure 6 to the predicted motion vector index of the predicted motion vector candidate used for coding the motion vector of the prediction direction X, and performs variable-length coding.

[0106] In this embodiment, as shown in Figures 15(a) and 16(a), "0" is assigned as the value of the predicted motion vector index corresponding to neighboring block A. Furthermore, "1" is assigned as the value of the predicted motion vector index corresponding to neighboring block B. Furthermore, "2" is assigned as the value of the predicted motion vector index corresponding to the co-located block. Furthermore, "3" is assigned as the value of the predicted motion vector index corresponding to neighboring block C. Furthermore, "4" is assigned as the value of the predicted motion vector index corresponding to neighboring block D.

[0107] However, the method of assigning values ​​of the motion vector predictor index is not necessarily limited to this example. For example, when a new candidate is added using a method described later, the variable length coding unit 116 may assign a small value to the original motion vector predictor candidate and a large value to the new candidate. In other words, the variable length coding unit 116 may preferentially assign a small value of the motion vector predictor index to the original motion vector predictor candidate.

[0108] Furthermore, the motion vector predictor candidate is not necessarily limited to the positions of adjacent blocks A, B, C, and D. For example, an adjacent block located above the lower left adjacent block D may be used as the motion vector predictor candidate. Furthermore, it is not necessary to use all adjacent blocks as motion vector predictor candidates. For example, only adjacent blocks A and B may be used as motion vector predictor candidates. Alternatively, if adjacent block D is an unpredictable candidate, adjacent blocks may be scanned in order, such as by using adjacent block A.

[0109] In addition, in this embodiment, in step S104 of Fig. 14, the variable length coding unit 116 adds the motion vector predictor index to the bitstream, but it is not necessary to add the motion vector predictor index to the bitstream. For example, when the motion vector predictor candidate list size is 1, the variable length coding unit 116 does not need to add the motion vector predictor index to the bitstream. This makes it possible to reduce the amount of information of the motion vector predictor index.

[0110] Fig. 17 is a flowchart showing detailed processing of step S102 in Fig. 14. Specifically, Fig. 17 shows a method for calculating motion vector predictor candidates and the motion vector predictor candidate list size. Fig. 17 will be described below.

[0111] In step S111, the motion vector predictor candidate calculation unit 114 determines whether the prediction block candidate [N] is a predictable candidate using a method described below. Then, the motion vector predictor candidate calculation unit 114 updates the number of predictable candidates according to the determination result.

[0112] Here, N is an index value for representing each prediction block candidate. In this embodiment, N takes a value from 0 to 4. Specifically, neighboring block A in FIG. 3 is allocated to prediction block candidate [0]. Neighboring block B in FIG. 3 is allocated to prediction block candidate [1]. A co-located block is allocated to prediction block candidate [2]. Neighboring block C in FIG. 3 is allocated to prediction block candidate [3]. Neighboring block D in FIG. 3 is allocated to prediction block candidate [4].

[0113] In step S112, the motion vector predictor candidate calculation unit 114 calculates a motion vector predictor candidate in the prediction direction X from the prediction block candidate [N] using the above equations 1 and 2, and adds the calculated motion vector predictor candidate to the motion vector predictor candidate list.

[0114] In step S113, the motion vector predictor candidate calculation unit 114 searches for and deletes unpredictable candidates and overlapping candidates from the motion vector predictor candidate list, as shown in FIGS.

[0115] In step S114, the motion vector predictor candidate calculation unit 114 adds a new candidate to the motion vector predictor candidate list using a method described below. When adding a new candidate, the motion vector predictor candidate calculation unit 114 may reallocate values ​​of motion vector predictor indexes so that smaller motion vector predictor indexes are preferentially assigned to existing motion vector predictor candidates. In other words, the motion vector predictor candidate calculation unit 114 may reallocate values ​​of motion vector predictor indexes so that larger motion vector predictor indexes are assigned to new candidates. This reduces the amount of coding for the motion vector predictor indexes.

[0116] In step S115, the motion vector predictor candidate calculation unit 114 sets the number of possible predictor candidates calculated in step S111 as the motion vector predictor candidate list size. In the examples of Figures 15 and 16, the number of possible predictor candidates for prediction direction 0 is calculated to be "4" by a method described later, and the motion vector predictor candidate list size for prediction direction 0 is set to "4". Furthermore, the number of possible predictor candidates for prediction direction 1 is calculated to be "4", and the motion vector predictor candidate list size for prediction direction 1 is set to "4".

[0117] Note that the new candidate in step S114 is a candidate that is newly added to the motion vector predictor candidate when the number of motion vector predictor candidates does not reach the number of possible predictor candidates, using a method described below. For example, the new candidate may be a motion vector predictor generated from an adjacent block located above the lower left adjacent block D in FIG. 3. Also, the new candidate may be a motion vector predictor generated from a block corresponding to adjacent blocks A, B, C, and D of the co-located block. Also, the new candidate may be a motion vector predictor calculated from statistics of motion vectors of the entire screen or a certain area of ​​the reference picture. In this way, when the number of motion vector predictor candidates does not reach the number of possible predictor candidates, the motion vector predictor candidate calculation unit 114 can improve coding efficiency by adding a new motion vector predictor as a new candidate.

[0118] Fig. 18 is a flowchart showing the detailed processing of step S111 in Fig. 17. Specifically, Fig. 18 shows a method for determining whether a prediction block candidate [N] is a predictable candidate and updating the number of predictable candidates. Fig. 18 will be described below.

[0119] In step S121, the predicted motion vector candidate calculation unit 114 determines whether the predicted block candidate [N] is (1) a block coded using intra prediction, or (2) a block located outside the slice or picture boundary containing the block to be coded, or (3) a block that has not yet been coded.

[0120] If the determination result of step S121 is true (Yes in S121), the motion vector predictor candidate calculation unit 114 sets the prediction block candidate [N] as an unpredictable candidate in step S122. On the other hand, if the determination result of step S121 is false (No in S121), the motion vector predictor candidate calculation unit 114 sets the prediction block candidate [N] as a predictable candidate in step S123.

[0121] In step S124, the motion vector predictor candidate calculation unit 114 determines whether the prediction block candidate [N] is a predictable candidate or a co-located block candidate. If the determination result in step S124 is true (Yes in S124), in step S5, the motion vector predictor candidate calculation unit 114 adds 1 to the number of predictable candidates to update the number of motion vector predictor candidates. On the other hand, if the determination result in step S124 is false (No in S124), the motion vector predictor candidate calculation unit 114 does not update the number of predictable candidates.

[0122] In this way, when the prediction block candidate is a co-located block, the motion vector predictor candidate calculation unit 114 adds 1 to the number of predictable candidates regardless of whether the co-located block is a predictable candidate or an unpredictable candidate. This prevents a discrepancy in the number of predictable candidates between the video encoding device and the video decoding device even if information about the co-located block is lost due to packet loss or the like.

[0123] This number of possible predictors is set as the motion vector predictor candidate list size in step S115 of Fig. 17. Furthermore, in S104 of Fig. 14, the motion vector predictor candidate list size is used for variable-length coding of the motion vector predictor index. This allows the video encoding device 100 to generate a bitstream that can successfully decode the motion vector predictor index even when reference picture information including co-located blocks, etc. is lost.

[0124] Fig. 19 is a flowchart showing the detailed process of step S114 in Fig. 17. Specifically, Fig. 19 shows a method for adding a new candidate. Fig. 19 will be described below.

[0125] In step S131, the motion vector predictor candidate calculation unit 114 determines whether or not the number of motion vector predictor candidates is smaller than the number of possible predictor candidates. That is, the motion vector predictor candidate calculation unit 114 determines whether or not the number of motion vector predictor candidates has reached the number of possible predictor candidates.

[0126] If the determination result in step S131 is true (Yes in S131), then in step S132, the motion vector predictor candidate calculation unit 114 determines whether or not a new candidate that can be added to the motion vector predictor candidate list as a motion vector predictor candidate is present. If the determination result in step S132 is true (Yes in S132), then in step S133, the motion vector predictor candidate calculation unit 114 assigns the value of the motion vector predictor index to the new candidate and adds the new candidate to the motion vector predictor candidate list. Furthermore, in step S134, the motion vector predictor candidate calculation unit 114 adds 1 to the number of motion vector predictor candidates.

[0127] On the other hand, if the determination result in step S131 or step S132 is false (No in S131 or S132), the new candidate addition process ends. That is, if the number of motion vector predictor candidates has reached the number of possible predictor candidates or if there is no new candidate, the new candidate addition process ends.

[0128] Fig. 20 is a flowchart showing detailed processing of step S103 in Fig. 14. Specifically, Fig. 20 shows processing related to selection of motion vector predictor candidates. Fig. 20 will be described below.

[0129] In step S141, the inter prediction control unit 111 initializes the motion vector predictor candidate index mvp_idx by setting it to 0, and sets the minimum motion vector difference to the maximum value.

[0130] In step S142, the inter prediction control unit 111 determines whether or not the value of the motion vector predictor candidate index mvp_idx is smaller than the number of motion vector predictor candidates. That is, the inter prediction control unit 111 determines whether or not differential motion vectors have been calculated for all motion vector predictor candidates.

[0131] Here, if there are still motion vector predictor candidates remaining (Yes in S142), in step S143, the inter prediction control unit 111 calculates a differential motion vector by subtracting the motion vector predictor candidate from the motion vector obtained by motion estimation (motion estimation result vector).

[0132] In step S144, the inter prediction control unit 111 determines whether the differential motion vector calculated in step S143 is smaller in value than the minimum differential motion vector.

[0133] If the determination result of step S144 is true (Yes in S144), the inter prediction control unit 111 updates the values ​​of the minimum motion vector difference and the motion vector predictor index in step S145. On the other hand, if the determination result of step S144 is false (No in S144), the inter prediction control unit 111 does not update the values ​​of the minimum motion vector difference and the motion vector predictor index.

[0134] In step S146, the inter prediction control unit 111 updates the motion vector predictor candidate index by +1, and returns to step S142 to determine whether or not a next motion vector predictor candidate exists.

[0135] On the other hand, if it is determined in step S2 that differential motion vectors have been calculated for all candidate predicted motion vectors (No in S142), in step S147, the inter prediction control unit 111 finalizes the minimum differential motion vector and predicted motion vector index that have been finally set.

[0136] As described above, the video encoding device 100 according to the present embodiment can calculate the motion vector predictor candidate list size used when encoding or decoding a motion vector predictor index by a method that does not depend on reference picture information including co-located blocks, etc. This enables the video encoding device 100 to improve error resilience.

[0137] More specifically, the video encoding device 100 according to this embodiment always adds 1 to the number of possible predictor candidates if the prediction block candidate is a co-located block, regardless of whether the co-located block is a possible predictor candidate.The video encoding device 100 then uses the number of possible predictor candidates calculated in this manner to determine a bit string to be assigned to the motion vector predictor index.This makes it possible for the video encoding device 100 to generate a bitstream that allows the motion vector predictor index to be correctly decoded even if reference picture information including a co-located block is lost.

[0138] In addition, the video encoding device 100 according to this embodiment can improve encoding efficiency by adding a new candidate having a new predicted motion vector as a predicted motion vector candidate when the number of predicted motion vector candidates does not reach the number of possible predictive candidates.

[0139] In this embodiment, the video encoding device 100 adds a new candidate having a new motion vector predictor as a motion vector predictor candidate when the number of motion vector predictor candidates has not reached the number of possible predictor candidates. However, this is not limited to this. For example, when creating a motion vector predictor candidate list, the video encoding device 100 may set a new candidate having a new motion vector predictor as the initial value of all motion vector predictor candidates on the motion vector predictor candidate list. In this case, the video encoding device 100 overwrites the initial new candidate when calculating a motion vector predictor candidate and adding it to the motion vector predictor candidate list. Then, before adding the calculated motion vector predictor candidate to the motion vector predictor candidate list, the video encoding device 100 determines whether the calculated motion vector predictor candidate is an unpredictable candidate or a duplicate candidate. As a result, if an unpredictable candidate or a duplicate candidate is found, the initial new candidate remains in the motion vector predictor candidate list. Using this method, a new candidate can also be added as a motion vector predictor candidate.

[0140] In addition, in this embodiment, an example is shown in which a predicted motion vector candidate is generated from the adjacent block of the block to be coded, and the motion vector of the block to be coded is coded using a predicted motion vector designation mode, but this is not necessarily limited to this.For example, a direct mode or a skip mode can be used.In the direct mode or the skip merge mode, a predicted motion vector is selected from the predicted motion vector candidate created as shown in Figure 15 (b) and Figure 16 (b), and the selected predicted motion vector is used as a motion vector to directly generate a predicted image, so that a motion vector difference does not need to be added to a bitstream.

[0141] (Embodiment 2) In the first embodiment, the video encoding device determines a bit sequence to be assigned to a motion vector predictor index using the number of predictable candidates calculated by always adding 1 if the prediction block candidate is a co-located block, regardless of whether the co-located block is a predictable candidate. However, this is not limited to this. For example, in step S124 of FIG. 18, the video encoding device may determine a bit sequence to be assigned to a motion vector predictor index using the number of predictable candidates calculated by always adding 1 to prediction block candidates other than co-located blocks. That is, the video encoding device may assign a bit sequence to a motion vector predictor index using a motion vector predictor candidate list size fixed to the maximum value N of the number of motion vector predictor candidates. That is, the video encoding device may regard all prediction block candidates as predictable candidates, fix the motion vector predictor candidate list size to the maximum value N of the number of motion vector predictor candidates, and encode the motion vector predictor index.

[0142] For example, in the first embodiment, since the maximum value N of the number of motion vector predictor candidates is 5 (adjacent block A, adjacent block B, co-located block, adjacent block C, adjacent block D), the video encoding device may always set the motion vector predictor candidate list size to 5 and encode the motion vector predictor index. Also, for example, if the maximum value N of the number of motion vector predictor candidates is 4 (adjacent block A, adjacent block B, adjacent block C, adjacent block D), the video encoding device may always set the motion vector predictor candidate list size to 4 and encode the motion vector predictor index.

[0143] In this way, the video encoding device may determine the motion vector predictor candidate list size according to the maximum number of motion vector predictor candidates, which enables the variable length decoding unit of the video decoding device to generate a bitstream that can decode the motion vector predictor index in the bitstream without referring to information on adjacent blocks or co-located blocks, thereby reducing the processing load of the variable length decoding unit.

[0144] The following will specifically explain the characteristic configuration of such a video coding device as a video coding device according to the second embodiment.

[0145] 21 is a block diagram showing the configuration of a video encoding device 200 according to Embodiment 2. The video encoding device 200 generates a bitstream by encoding an image for each block. The video encoding device 200 includes a motion vector predictor candidate derivation unit 210, a prediction control unit 220, and an encoding unit 230.

[0146] The motion vector predictor candidate derivation unit 210 corresponds to the motion vector predictor candidate calculation unit 114 in above-mentioned Embodiment 1. The motion vector predictor candidate derivation unit 210 derives motion vector predictor candidates. Then, the motion vector predictor candidate derivation unit 210 generates a motion vector predictor candidate list in which, for example, each derived motion vector predictor candidate is associated with an index for identifying the motion vector predictor candidate (hereinafter referred to as a "motion vector predictor index").

[0147] A motion vector predictor candidate is a motion vector that is a candidate for a motion vector predictor used in encoding a current block.

[0148] As shown in FIG. 21, the motion vector predictor candidate derivation unit 210 includes a determination unit 211, a first derivation unit 212, an identification unit 213, a determination unit 214, and a second derivation unit 215.

[0149] The determining unit 211 determines the maximum number of motion vector predictor candidates. That is, the determining unit 211 determines the maximum value N of the number of prediction block candidates.

[0150] For example, the determination unit 211 determines the maximum number of motion vector predictor candidates based on the characteristics of the input image sequence (such as a sequence, a picture, a slice, or a block). Alternatively, for example, the determination unit 211 may determine a predetermined number as the maximum number of motion vector predictor candidates.

[0151] The first derivation unit 212 derives first motion vector predictor candidates. Specifically, the first derivation unit 212 derives first motion vector predictor candidates so that the number of first motion vector predictor candidates does not exceed a maximum number. More specifically, the first derivation unit 212 derives the first motion vector predictor candidate based on, for example, a motion vector used in encoding a block spatially or temporally adjacent to the current block. Then, the first derivation unit 212 registers the first motion vector predictor candidate derived in this way in a motion vector predictor candidate list, for example, in association with a motion vector predictor index.

[0152] The spatially adjacent blocks are blocks in a picture that includes the current block and are adjacent to the current block. Specifically, the spatially adjacent blocks are, for example, adjacent blocks A to D shown in FIG. 3.

[0153] A temporally adjacent block is a block included in a picture different from the picture including the current block to be coded, and corresponds to the current block to be coded. Specifically, a temporally adjacent block is, for example, a co-located block.

[0154] Note that the temporally adjacent block does not necessarily have to be a block at the same position as the current block (co-located block). For example, the temporally adjacent block may be a block adjacent to the co-located block.

[0155] The first derivation unit 212 may derive, as the first motion vector predictor candidate, a motion vector used in encoding blocks spatially adjacent to the current block, excluding blocks that are unpredictable candidates. Unpredictable candidate blocks are blocks encoded using intra prediction, blocks located outside the slice or picture boundary that includes the current block, or blocks that have not yet been encoded. This allows the first motion vector predictor candidate to be derived from an appropriate block to obtain the motion vector predictor candidate.

[0156] When a plurality of first motion vector predictor candidates are derived, the identifying unit 213 identifies a first motion vector predictor candidate whose motion vector overlaps with another first motion vector predictor candidate (overlapping candidate), and then deletes the identified overlapping candidate from the motion vector predictor candidate list.

[0157] The determination unit 214 determines whether the number of first motion vector predictor candidates is smaller than the determined maximum number. Here, the determination unit 214 determines whether the number of first motion vector predictor candidates excluding the identified overlapping first motion vector predictor candidates is smaller than the determined maximum number.

[0158] The second derivation unit 215 derives a second motion vector predictor candidate when it is determined that the number of first motion vector predictor candidates is smaller than the determined maximum number. Specifically, the second derivation unit 215 derives a second motion vector predictor candidate such that the sum of the number of first motion vector predictor candidates and the number of second motion vector predictor candidates does not exceed the maximum number. Here, the second derivation unit 215 derives a second motion vector predictor candidate such that the sum of the number of first motion vector predictor candidates and the number of second motion vector predictor candidates excluding overlapping candidates does not exceed the maximum number.

[0159] This second motion vector predictor candidate corresponds to the new candidate in Embodiment 1. Therefore, the second derivation unit 215 may derive the second motion vector predictor candidate based on a motion vector used in encoding a neighboring block different from the first motion vector predictor candidate, for example.

[0160] Furthermore, for example, the second derivation unit 215 may derive a motion vector predictor candidate whose motion vector is different from that of the first motion vector predictor candidate as the second motion vector predictor candidate. This makes it possible to increase the number of motion vector predictor candidates whose motion vectors are different, and further improve coding efficiency.

[0161] Note that the second derivation unit 215 does not necessarily need to derive a motion vector predictor candidate that does not overlap with the first motion vector predictor candidate as the second motion vector predictor candidate. In other words, the second derivation unit 215 may end up deriving a motion vector predictor candidate that overlaps with the first motion vector predictor candidate as the second motion vector predictor candidate.

[0162] Then, the second derivation unit 215, for example, registers the second motion vector predictor candidate derived in this way in a motion vector predictor candidate list in association with the motion vector predictor index. At this time, as in Embodiment 1, the second derivation unit 215 may register the second motion vector predictor candidate in the motion vector predictor candidate list so that the first motion vector predictor candidate is assigned a motion vector predictor index with a smaller value than the second motion vector predictor candidate. This allows the video encoding device 200 to reduce the amount of code and improve encoding efficiency when the first motion vector predictor candidate is more likely to be selected as the motion vector predictor candidate to be used for encoding than the second motion vector predictor candidate.

[0163] Note that the second derivation unit 215 does not necessarily need to derive the second motion vector predictor candidates so that the sum of the number of the first motion vector predictor candidates and the number of the second motion vector predictor candidates matches the determined maximum number. If the sum of the number of the first motion vector predictor candidates and the number of the second motion vector predictor candidates is smaller than the determined maximum number, for example, there may be a value of the motion vector predictor index to which no motion vector predictor candidate is associated.

[0164] The prediction control unit 220 selects a motion vector predictor to be used for encoding the current block from the first motion vector predictor candidate and the second motion vector predictor candidate. That is, the prediction control unit 220 selects a motion vector predictor to be used for encoding the current block from the motion vector predictor candidate list.

[0165] The encoding unit 230 encodes an index (motion vector predictor index) for identifying the selected motion vector predictor candidate using the determined maximum number. Specifically, as shown in Fig. 6, the encoding unit 230 performs variable-length encoding on a bit string assigned to the index value of the selected motion vector predictor candidate. Furthermore, the encoding unit 230 adds the encoded index to a bitstream.

[0166] Here, the encoding unit 230 may further add information indicating the maximum number determined by the determination unit 211 to the bitstream. Specifically, the encoding unit 230 may write the information indicating the maximum number to, for example, a slice header. This makes it possible to switch the maximum number in appropriate units, thereby improving encoding efficiency.

[0167] Note that the encoding unit 230 does not necessarily need to add information indicating the maximum number to the bitstream. For example, if the maximum number is predetermined by a standard or if the maximum number is the same as a default value, the encoding unit 230 does not need to add information indicating the maximum number to the bitstream.

[0168] Next, various operations of the video encoding device 200 configured as above will be described.

[0169] FIG. 22 is a flowchart showing the processing operations of the video coding apparatus 200 according to the second embodiment.

[0170] First, the determination unit 211 determines the maximum number of motion vector predictor candidates (S201). The first derivation unit 212 derives first motion vector predictor candidates (S202). When multiple first motion vector predictor candidates have been derived, the identification unit 213 identifies a first motion vector predictor candidate whose motion vector overlaps with another first motion vector predictor candidate (S203).

[0171] The determination unit 214 determines whether the number of first motion vector predictor candidates excluding duplicate candidates is smaller than the determined maximum number (S204). Here, if it is determined that the number of first motion vector predictor candidates excluding duplicate candidates is smaller than the determined maximum number (Yes in S204), the second derivation unit 215 derives a second motion vector predictor candidate (S205). On the other hand, if it is not determined that the number of first motion vector predictor candidates excluding duplicate candidates is smaller than the determined maximum number (No in S204), the second derivation unit 215 does not derive a second motion vector predictor candidate. These steps S204 and S205 correspond to step S114 in the first embodiment.

[0172] The prediction control unit 220 selects a motion vector predictor to be used for encoding the current block from the first motion vector predictor candidate and the second motion vector predictor candidate (S206). For example, as in the first embodiment, the prediction control unit 220 selects a motion vector predictor from the motion vector predictor candidate list that minimizes the motion vector difference.

[0173] The encoding unit 230 encodes an index for identifying the selected motion vector predictor candidate using the determined maximum number (S207). Furthermore, the encoding unit 230 adds the encoded index to a bitstream.

[0174] As described above, according to the video encoding device 200 according to this embodiment, the indexes for identifying motion vector predictor candidates can be encoded using the determined maximum number. That is, the indexes can be encoded independently of the number of motion vector predictor candidates actually derived. Therefore, even if information necessary for deriving a motion vector predictor candidate (e.g., information about co-located blocks, etc.) is lost, the decoding side can decode the indexes, thereby improving error resilience. Furthermore, the decoding side can decode the indexes independently of the number of motion vector predictor candidates actually derived. That is, the decoding side can perform the index decoding process without waiting for the motion vector predictor candidate derivation process. That is, it is possible to generate a bitstream in which the motion vector predictor candidate derivation process and the index decoding process can be performed in parallel.

[0175] Furthermore, according to the video encoding device 200 according to this embodiment, when it is determined that the number of first motion vector predictor candidates is smaller than the maximum number, it is possible to derive second motion vector predictor candidates. Therefore, it is possible to increase the number of motion vector predictor candidates within a range not exceeding the maximum number, thereby improving encoding efficiency.

[0176] Furthermore, according to the video encoding device 200 according to this embodiment, it is possible to derive second motion vector predictor candidates according to the number of first motion vector predictor candidates excluding overlapping first motion vector predictor candidates. As a result, it is possible to increase the number of second motion vector predictor candidates and increase the number of selectable motion vectors. Therefore, it is possible to further improve encoding efficiency.

[0177] In this embodiment, the video encoding device 200 includes the identification unit 213, but does not necessarily have to include the identification unit 213. That is, the flowchart shown in Fig. 22 does not necessarily have to include step S203. Even in such a case, the video encoding device 200 can encode the index for identifying a motion vector predictor candidate using the determined maximum number, thereby making it possible to improve error resistance.

[0178] In addition, in the present embodiment, as shown in FIG. 22 , after the first derivation unit 212 derives the first motion vector predictor candidate, the identification unit 213 identifies overlapping candidates. However, the processes do not necessarily have to be performed in this order. For example, the first derivation unit 212 may identify overlapping candidates in the process of deriving the first motion vector predictor candidate, and derive the first motion vector predictor candidate so that the identified overlapping candidates are not included in the first motion vector predictor candidate. That is, the first derivation unit 212 may derive, as the first motion vector predictor candidate, a motion vector predictor candidate whose motion vector does not overlap with a first motion vector predictor candidate whose motion vector has already been derived. More specifically, for example, when a motion vector predictor candidate based on a left adjacent block has already been derived as the first motion vector predictor candidate, if the motion vector predictor candidate based on the above adjacent block does not overlap with the motion vector predictor candidate based on the left adjacent block, the first derivation unit 212 may derive the motion vector predictor candidate based on the above adjacent block as the first motion vector predictor candidate.

[0179] (Embodiment 3) FIG. 23 is a block diagram showing a configuration of a video decoding device 300 according to the third embodiment.

[0180] As shown in FIG. 23, the video decoding device 300 includes a variable length decoding unit 301, an inverse quantization unit 302, an inverse orthogonal transformation unit 303, an addition unit 304, a block memory 305, a frame memory 306, an intra prediction unit 307, an inter prediction unit 308, an inter prediction control unit 309, a switch 310, a predicted motion vector candidate calculation unit 311, and a colPic memory 312.

[0181] The variable-length decoding unit 301 performs variable-length decoding on the input bitstream to generate picture type information, a prediction direction flag, a quantization coefficient, and a differential motion vector. The variable-length decoding unit 301 also performs variable-length decoding on a motion vector predictor index using the number of possible predictor candidates (described later).

[0182] The inverse quantization unit 302 performs inverse quantization on the quantized coefficients obtained by the variable length decoding process. The inverse orthogonal transformation unit 303 generates prediction error data by transforming the orthogonal transform coefficients obtained by the inverse quantization process from the frequency domain to the image domain. The block memory 305 stores decoded image data generated by adding the prediction error data and predicted image data in units of blocks. The frame memory 306 stores the decoded image data in units of frames.

[0183] The intra prediction unit 307 generates predicted image data of the block to be decoded by performing intra prediction using the decoded image data in block units stored in the block memory 305. The inter prediction unit 308 generates predicted image data of the block to be decoded by performing inter prediction using the decoded image data in frame units stored in the frame memory 306.

[0184] When the current block is decoded using intra-prediction decoding, the switch 310 outputs the intra-predicted image data generated by the intra-prediction unit 307 as predicted image data of the current block to the adder 304. On the other hand, when the current block is decoded using inter-prediction decoding, the switch 310 outputs the inter-predicted image data generated by the inter-prediction unit 308 as predicted image data of the current block to the adder 304.

[0185] The motion vector predictor candidate calculation unit 311 derives motion vector predictor candidates for the motion vector predictor designation mode using colPic information such as motion vectors of blocks adjacent to the current block to be decoded and motion vectors of co-located blocks stored in the colPic memory 312, using a method described below. The motion vector predictor candidate calculation unit 311 also assigns a motion vector predictor index value to each derived motion vector predictor candidate. The motion vector predictor candidate calculation unit 311 then sends the motion vector predictor candidates and the motion vector predictor index to the inter prediction control unit 309.

[0186] The inter prediction control unit 309 selects a motion vector predictor to be used for inter prediction from the motion vector predictor candidates based on the decoded motion vector predictor index. The inter prediction control unit 309 then calculates a motion vector for the block to be decoded from the motion vector predictor and the differential motion vector. The inter prediction control unit 309 then causes the inter prediction unit 308 to generate an inter predicted image using the calculated motion vector. The inter prediction control unit 309 also transfers colPic information including the motion vector of the block to be decoded to the colPic memory 312.

[0187] Finally, the adder 304 generates decoded image data by adding the predicted image data and the prediction error data.

[0188] FIG. 24 is a flowchart showing the processing operations of the video decoding device 300 according to the third embodiment.

[0189] In step S301, the variable length decoding unit 301 decodes the prediction direction flag and the reference picture index. Then, the value of the prediction direction X is determined according to the decoded prediction direction flag, and the following steps S302 to S305 are performed.

[0190] In step S302, the motion vector predictor candidate calculation unit 311 calculates the number of available predictor candidates by a method described later. Then, the motion vector predictor candidate calculation unit 311 sets the calculated number of available predictor candidates as the motion vector predictor candidate list size.

[0191] In step S303, the variable length decoding unit 301 variable-length decodes the motion vector predictor index in the bitstream using the calculated motion vector predictor candidate list size. In step S304, the motion vector predictor candidate calculation unit 311 generates motion vector predictor candidates from neighboring blocks and co-located blocks of the block to be decoded using a method described below. In step S305, the inter prediction control unit 309 calculates a motion vector by adding the decoded motion vector difference to the motion vector predictor candidate indicated by the decoded motion vector predictor index. Then, the inter prediction control unit 309 causes the inter prediction unit 308 to generate an inter predicted image using the calculated motion vector.

[0192] If the motion vector predictor candidate list size calculated in step S302 is "1", the motion vector predictor index may be estimated to be 0 without being decoded.

[0193] Fig. 25 is a flowchart showing the detailed processing of step S302 in Fig. 24. Specifically, Fig. 25 shows a method for determining whether a prediction block candidate [N] is a predictable candidate and calculating the number of predictable candidates. Fig. 25 will be described below.

[0194] In step S311, the predicted motion vector candidate calculation unit 311 determines whether the predicted block candidate [N] is (1) a block decoded by intra prediction, or (2) a block located outside the slice or picture boundary containing the block to be decoded, or (3) a block that has not yet been decoded.

[0195] If the determination result of step S311 is true (Yes in S311), the motion vector predictor candidate calculation unit 311 sets the prediction block candidate [N] as an unpredictable candidate in step S312. On the other hand, if the determination result of step S311 is false (No in S311), the motion vector predictor candidate calculation unit 311 sets the prediction block candidate [N] as a predictable candidate in step S313.

[0196] In step S314, the motion vector predictor candidate calculation unit 311 determines whether the prediction block candidate [N] is a predictable candidate or a co-located block candidate. If the determination result in step S314 is true (Yes in S314), in step S5, the motion vector predictor candidate calculation unit 311 adds 1 to the number of predictable candidates to update the value. On the other hand, if the determination result in step S314 is false (No in S314), the motion vector predictor candidate calculation unit 311 does not update the number of predictable candidates.

[0197] In this way, when the prediction block candidate is a co-located block, the motion vector predictor candidate calculation unit 311 adds 1 to the number of predictable candidates regardless of whether the co-located block is a predictable candidate or an unpredictable candidate. This prevents a discrepancy in the number of predictable candidates between the video encoding device and the video decoding device even if information about the co-located block is lost due to packet loss or the like.

[0198] This number of possible predictors is set as the motion vector predictor candidate list size in step S302 of Fig. 24. Furthermore, in S303 of Fig. 24, the motion vector predictor candidate list size is used for variable-length decoding of the motion vector predictor index. This allows the video decoding device 300 to successfully decode the motion vector predictor index even if reference picture information including co-located blocks, etc. is lost.

[0199] Fig. 26 is a flowchart showing detailed processing of step S304 in Fig. 24. Specifically, Fig. 26 shows a method for calculating motion vector predictor candidates. Fig. 26 will be described below.

[0200] In step S321, the motion vector predictor candidate calculation unit 311 calculates a motion vector predictor candidate in a prediction direction X from the prediction block candidate [N] using the above equations 1 and 2, and adds the calculated motion vector predictor candidate to a motion vector predictor candidate list.

[0201] In step S322, the motion vector predictor candidate calculation unit 311 searches for and deletes unpredictable candidates and overlapping candidates from the motion vector predictor candidate list, as shown in FIGS.

[0202] In step S323, the motion vector predictor candidate calculation unit 311 adds a new candidate to the motion vector predictor candidate list in the same manner as in FIG.

[0203] Figure 27 is a diagram showing an example of syntax when adding a motion vector predictor index to a bitstream. In Figure 27, inter_pred_flag represents a prediction direction flag, and mvp_idx represents a motion vector predictor index. NumMVPCand represents the motion vector predictor candidate list size, and in this embodiment, the number of predictable candidates calculated in the processing flow of Figure 25 is set.

[0204] As described above, the video decoding device 300 according to this embodiment can calculate the motion vector predictor candidate list size used when encoding or decoding a motion vector predictor index by a method that does not depend on reference picture information including co-located blocks, etc. This enables the video decoding device 300 to appropriately decode a bitstream with improved error resilience.

[0205] More specifically, the video decoding device 300 according to this embodiment always adds 1 to the number of possible predictor candidates when the prediction block candidate is a co-located block, regardless of whether the co-located block is a possible predictor candidate.The video decoding device 300 then uses the number of possible predictor candidates calculated in this manner to determine a bit string to be assigned to a motion vector predictor index.This enables the video decoding device 300 to successfully decode a motion vector predictor index even when reference picture information including a co-located block is lost.

[0206] Furthermore, when the number of motion vector predictor candidates does not reach the number of possible predictors, the video decoding device 300 according to this embodiment adds a new candidate having a new motion vector predictor as a motion vector predictor candidate, thereby enabling proper decoding of a bitstream with improved coding efficiency.

[0207] In this embodiment, the video decoding device 300 adds a new candidate having a new motion vector predictor as a motion vector predictor candidate when the number of motion vector predictor candidates has not reached the number of possible predictor candidates, but this is not limiting. For example, as in the above-mentioned first embodiment, when creating a motion vector predictor candidate list, the video decoding device 300 may set a new candidate having a new motion vector predictor as the initial value of all motion vector predictor candidates on the motion vector predictor candidate list.

[0208] (Fourth embodiment) In the third embodiment, the video decoding device determines a bit sequence to be assigned to a motion vector predictor index using the number of predictable candidates calculated by always adding 1 if the prediction block candidate is a co-located block, regardless of whether the co-located block is a predictable candidate. However, this is not limited to this. For example, in step S314 of FIG. 25, the video decoding device may determine a bit sequence to be assigned to a motion vector predictor index using the number of predictable candidates calculated by always adding 1 to prediction block candidates other than co-located blocks. That is, the video decoding device may assign a bit sequence to a motion vector predictor index using a motion vector predictor candidate list size fixed to the maximum value N of the number of motion vector predictor candidates. That is, the video decoding device may regard all prediction block candidates as predictable candidates, fix the motion vector predictor candidate list size to the maximum value N of the number of motion vector predictor candidates, and decode a motion vector predictor index.

[0209] For example, in the third embodiment, since the maximum value N of the number of motion vector predictor candidates is 5 (neighboring block A, neighboring block B, co-located block, neighboring block C, neighboring block D), the video decoding device may always set the motion vector predictor candidate list size to 5 and decode the motion vector predictor index. This allows the variable length decoding unit of the video decoding device to decode the motion vector predictor index in the bitstream without referring to information about the neighboring blocks or co-located blocks. As a result, for example, it is possible to omit the processes of steps S314 and S315 in FIG. 25, thereby reducing the processing load of the variable length decoding unit.

[0210] 28 is a diagram showing an example of syntax when the motion vector predictor candidate list size is fixed to the maximum value of the number of motion vector predictor candidates. When the motion vector predictor candidate list size is fixed to the maximum value of the number of motion vector predictor candidates as in FIG. 28, NumMVPCand can be deleted from the syntax.

[0211] The following will specifically explain the characteristic configuration of such a video decoding device as a video decoding device according to the fourth embodiment.

[0212] 29 is a block diagram showing the configuration of a video decoding device 400 according to Embodiment 4. The video decoding device 400 decodes coded images included in a bitstream for each block. Specifically, the video decoding device 400 decodes coded images included in a bitstream generated by the video coding device 200 according to Embodiment 2 for each block. The video decoding device 400 includes a motion vector predictor candidate derivation unit 410, a decoding unit 420, and a prediction control unit 430.

[0213] The motion vector predictor candidate derivation unit 410 corresponds to the motion vector predictor candidate calculation unit 311 in above-mentioned Embodiment 3. The motion vector predictor candidate derivation unit 410 derives motion vector predictor candidates. Then, the motion vector predictor candidate derivation unit 410 generates a motion vector predictor candidate list in which, for example, each derived motion vector predictor candidate is associated with an index (motion vector predictor index) for identifying the motion vector predictor candidate.

[0214] As shown in FIG. 29, the motion vector predictor candidate derivation unit 410 includes a determination unit 411, a first derivation unit 412, an identification unit 413, a determination unit 414, and a second derivation unit 415.

[0215] The determining unit 411 determines the maximum number of motion vector predictor candidates. That is, the determining unit 211 determines the maximum value N of the number of prediction block candidates.

[0216] For example, the determining unit 411 determines the maximum number of motion vector predictor candidates in the same manner as the determining unit 211 in Embodiment 2. Furthermore, for example, the determining unit 411 may determine the maximum number based on information indicating the maximum number added to the bitstream.

[0217] Note that although the determining unit 411 is provided in the motion vector predictor candidate deriving unit 410 here, it may also be provided in the decoding unit 420.

[0218] The first derivation unit 412 derives a first motion vector predictor candidate. Specifically, the first derivation unit 412 derives a first motion vector predictor candidate in the same manner as the first derivation unit 212 in Embodiment 2. For example, the first derivation unit 412 derives the first motion vector predictor candidate so that the number of first motion vector predictor candidates does not exceed a maximum number. More specifically, the first derivation unit 412 derives the first motion vector predictor candidate based on, for example, a motion vector used in decoding a block spatially or temporally adjacent to the current block to be decoded. Then, the first derivation unit 412 registers the first motion vector predictor candidate derived in this manner in a motion vector predictor candidate list, for example, in association with a motion vector predictor index.

[0219] The first derivation unit 412 may derive, as the first motion vector predictor candidate, a motion vector used in decoding a block spatially adjacent to the current block, excluding a block that is an unpredictable candidate. This makes it possible to derive the first motion vector predictor candidate from an appropriate block to obtain the motion vector predictor candidate.

[0220] When a plurality of first motion vector predictor candidates are derived, the identifying unit 413 identifies a first motion vector predictor candidate whose motion vector overlaps with another first motion vector predictor candidate (overlapping candidate), and then deletes the identified overlapping candidate from the motion vector predictor candidate list.

[0221] The determination unit 414 determines whether the number of first motion vector predictor candidates is smaller than the determined maximum number. Here, the determination unit 414 determines whether the number of first motion vector predictor candidates excluding the identified overlapping first motion vector predictor candidates is smaller than the determined maximum number.

[0222] The second derivation unit 415 derives second motion vector predictor candidates when it is determined that the number of first motion vector predictor candidates is smaller than the determined maximum number. Specifically, the second derivation unit 415 derives second motion vector predictor candidates in the same way as the second derivation unit 215 in the second embodiment.

[0223] For example, the second derivation unit 415 may derive a motion vector predictor candidate whose motion vector is different from that of the first motion vector predictor candidate as the second motion vector predictor candidate. This makes it possible to increase the number of motion vector predictor candidates whose motion vectors are different, and to decode coded images with improved coding efficiency.

[0224] Then, for example, similarly to the second derivation unit 215 in the second embodiment, the second derivation unit 415 registers the second motion vector predictor candidate derived in this manner in a motion vector predictor candidate list in association with the motion vector predictor index.

[0225] The decoding unit 420 decodes the coded indexes added to the bitstream for identifying motion vector predictor candidates, using the determined maximum number.

[0226] The prediction control unit 430 selects a motion vector predictor to be used for decoding the current block from the first motion vector predictor candidate and the second motion vector predictor candidate based on the decoded index. That is, the prediction control unit 430 selects a motion vector predictor to be used for decoding the current block from the motion vector predictor candidate list.

[0227] Next, various operations of the video decoding device 400 configured as above will be explained.

[0228] FIG. 30 is a flowchart showing the processing operations of the video decoding device 400 according to the fourth embodiment.

[0229] First, the determination unit 411 determines the maximum number of motion vector predictor candidates (S401). The first derivation unit 412 derives first motion vector predictor candidates (S402). When multiple first motion vector predictor candidates have been derived, the identification unit 413 identifies first motion vector predictor candidates whose motion vectors overlap with other first motion vector predictor candidates (S403).

[0230] The determination unit 414 determines whether the number of first motion vector predictor candidates excluding duplicate candidates is smaller than the determined maximum number (S404). If it is determined that the number of first motion vector predictor candidates excluding duplicate candidates is smaller than the determined maximum number (Yes in S404), the second derivation unit 415 derives a second motion vector predictor candidate (S405). On the other hand, if it is not determined that the number of first motion vector predictor candidates excluding duplicate candidates is smaller than the determined maximum number (No in S404), the second derivation unit 415 does not derive a second motion vector predictor candidate.

[0231] The decoding unit 420 decodes the coded indexes added to the bitstream for identifying motion vector predictor candidates, using the determined maximum number (S406).

[0232] The prediction control unit 430 selects a motion vector predictor to be used for decoding the current block from among the first motion vector predictor candidate and the second motion vector predictor candidate based on the decoded index (S407).

[0233] Note that, here, the index decoding process (S406) is performed after the motion vector predictor candidate is derived, but the processes do not necessarily have to be performed in this order. For example, the motion vector predictor candidate derivation process (S402 to S405) may be performed after the index decoding process (S406). Furthermore, the index decoding process (S406) and the motion vector predictor candidate derivation process (S402 to S405) may be performed in parallel. This can improve the decoding processing speed.

[0234] As described above, the video decoding device 400 according to this embodiment can decode indexes for identifying motion vector predictor candidates using the determined maximum number. That is, the indexes can be decoded independently of the number of motion vector predictor candidates actually derived. Therefore, even if information necessary for deriving a motion vector predictor candidate (e.g., information about co-located blocks, etc.) is lost, the indexes can be decoded, thereby improving error resilience. Furthermore, the index decoding process can be performed without waiting for the motion vector predictor candidate derivation process, and the motion vector predictor candidate derivation process and the index decoding process can be performed in parallel.

[0235] Furthermore, according to the video decoding device 400 according to this embodiment, when it is determined that the number of first motion vector predictor candidates is smaller than the maximum number, it is possible to derive second motion vector predictor candidates. Therefore, it is possible to increase the number of motion vector predictor candidates within a range not exceeding the maximum number, and it is possible to decode coded images with improved coding efficiency.

[0236] Furthermore, according to the video decoding device 400 according to this embodiment, it is possible to derive second motion vector predictor candidates according to the number of first motion vector predictor candidates excluding overlapping first motion vector predictor candidates. As a result, it is possible to increase the number of second motion vector predictor candidates, and to increase the number of selectable combinations of prediction directions, motion vectors, and reference picture indexes. Therefore, it is possible to decode coded images with further improved coding efficiency.

[0237] In this embodiment, the video decoding device 400 includes the identification unit 413, but similar to the second embodiment, the video decoding device 400 does not necessarily have to include the identification unit 413. That is, the flowchart shown in Fig. 30 does not necessarily have to include step S403. Even in such a case, the video decoding device 400 can decode the index for identifying a motion vector predictor candidate using the determined maximum number, thereby improving error resilience.

[0238] In the present embodiment, as shown in Fig. 30, the first derivation unit 412 derives the first motion vector predictor candidate, and then the identification unit 413 identifies the overlapping candidate, but the processes do not necessarily have to be performed in this order. For example, the first derivation unit 412 may derive, as the first motion vector predictor candidate, a motion vector that does not overlap with a first motion vector predictor candidate whose motion vector has already been derived.

[0239] While the video encoding device and video decoding device according to one or more aspects of the present invention have been described above based on the embodiments, the present invention is not limited to these embodiments. As long as they do not deviate from the spirit of the present invention, various modifications conceivable by those skilled in the art to the present embodiments, or configurations constructed by combining components of different embodiments, may also be included within the scope of one or more aspects of the present invention.

[0240] In each of the above embodiments, each component may be configured with dedicated hardware, or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or processor reading and executing a software program recorded on a recording medium such as a hard disk or semiconductor memory. Here, the software that realizes the video encoding device or video decoding device of each of the above embodiments is the following program.

[0241] In other words, this program causes a computer to execute a video encoding method for calculating a predicted motion vector to be used when encoding the motion vector of a block to be encoded, and generating a bitstream by encoding the block to be encoded, the video encoding method including: a determination step for determining a maximum number of predicted motion vector candidates to be candidates for the predicted motion vector; a first derivation step for deriving a first predicted motion vector candidate; a determination step for determining whether the number of the first predicted motion vector candidates is smaller than the maximum number; a second derivation step for deriving a second predicted motion vector candidate when it is determined that the number of the first predicted motion vector candidates is smaller than the maximum number; a selection step for selecting the predicted motion vector to be used for encoding the motion vector of the block to be encoded from the first predicted motion vector candidate and the second predicted motion vector candidate; and an encoding step for encoding an index for identifying the selected predicted motion vector using the determined maximum number and adding the encoded index to the bitstream.

[0242] Alternatively, this program causes a computer to execute a video decoding method for calculating a predicted motion vector to be used when decoding a motion vector of a block to be decoded included in a bitstream and decoding the block to be decoded, the video decoding method including: a determination step for determining a maximum number of predicted motion vector candidates to be candidates for the predicted motion vector; a first derivation step for deriving a first predicted motion vector candidate; a determination step for determining whether the number of the first predicted motion vector candidates is smaller than the maximum number; a second derivation step for deriving a second predicted motion vector candidate when it is determined that the number of the first predicted motion vector candidates is smaller than the maximum number; a decoding step for decoding an encoded index added to the bitstream, which is for identifying the predicted motion vector, using the determined maximum number; and a selection step for selecting a predicted motion vector to be used for decoding the block to be decoded from the first predicted motion vector candidate and the second predicted motion vector candidate based on the decoded index.

[0243] (Embodiment 5) By recording a program for implementing the video coding method (image coding method) or video decoding method (image decoding method) shown in each of the above embodiments on a storage medium, it becomes possible to easily perform the processes shown in each of the above embodiments on an independent computer system. The storage medium may be a magnetic disk, optical disk, magneto-optical disk, IC card, semiconductor memory, or any other medium capable of recording a program.

[0244] Furthermore, here, we will explain application examples of the video coding method (image coding method) and video decoding method (image decoding method) shown in each of the above embodiments, and a system using the same. The system is characterized by having an image coding / decoding device consisting of an image coding device using the image coding method and an image decoding device using the image decoding method. Other components of the system can be appropriately changed depending on the situation.

[0245] 31 is a diagram showing the overall configuration of a content supply system ex100 that provides a content distribution service. The area where communication services are provided is divided into cells of a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.

[0246] This content supply system ex100 is connected to the Internet ex101 via an Internet service provider ex102, a telephone network ex104, and base stations ex106 to ex110, and devices such as a computer ex111, a PDA (Personal Digital Assistant) ex112, a camera ex113, a mobile phone ex114, and a game console ex115.

[0247] However, the content supply system ex100 is not limited to the configuration shown in Fig. 31, and any combination of elements may be connected. Also, each device may be directly connected to the telephone network ex104 without going through base stations ex106 to ex110, which are fixed wireless stations. Also, each device may be directly connected to each other via short-range wireless or the like.

[0248] The camera ex113 is a device capable of shooting moving images, such as a digital video camera, and the camera ex116 is a device capable of shooting still images and moving images, such as a digital camera. The mobile phone ex114 may be any of a GSM (registered trademark) (Global System for Mobile Communications) system, a CDMA (Code Division Multiple Access) system, a W-CDMA (Wideband-Code Division Multiple Access) system, an LTE (Long Term Evolution) system, an HSPA (High Speed ​​Packet Access) mobile phone, or a PHS (Personal Handyphone System) system.

[0249] In the content supply system ex100, a camera ex113 and the like are connected to a streaming server ex103 via a base station ex109 and a telephone network ex104, thereby enabling live streaming and the like. In live streaming, a user shoots content (e.g., video of a live music concert) using the camera ex113, and encodes the content as described in the above embodiments (i.e., functions as an image encoding device according to an aspect of the present invention) and transmits the content to the streaming server ex103. Meanwhile, the streaming server ex103 streams the transmitted content data to a requesting client. Examples of clients include a computer ex111, a PDA ex112, a camera ex113, a mobile phone ex114, a game console ex115, and the like that are capable of decoding the encoded data. Each device that receives the distributed data decodes and plays back the received data (i.e., functions as an image decoding device according to an aspect of the present invention).

[0250] The encoding process of the captured data may be performed by the camera ex113, by the streaming server ex103 that processes the data transmission, or by a mutually shared responsibility. Similarly, the decoding process of the distributed data may be performed by the client, by the streaming server ex103, or by a mutually shared responsibility. Furthermore, still images and / or video data captured by camera ex116, not limited to camera ex113, may be transmitted to the streaming server ex103 via computer ex111. In this case, the encoding process may be performed by the camera ex116, the computer ex111, or the streaming server ex103, or by a mutually shared responsibility.

[0251] Furthermore, these encoding and decoding processes are generally performed by the computer ex111 or an LSIex500 possessed by each device. The LSIex500 may be a single chip or may be configured with multiple chips. It is also possible to embed video encoding and decoding software on some kind of recording medium (CD-ROM, flexible disk, hard disk, etc.) that can be read by the computer ex111, etc., and perform the encoding and decoding processes using that software. Furthermore, if the mobile phone ex114 is equipped with a camera, video data captured by the camera may be transmitted. This video data is data that has been encoded and processed by the LSIex500 possessed by the mobile phone ex114.

[0252] The streaming server ex103 may also be a plurality of servers or computers that process, record, and distribute data in a distributed manner.

[0253] In this way, the content delivery system ex100 allows a client to receive and play back encoded data. In this way, the content delivery system ex100 allows a client to receive, decode, and play back information sent by a user in real time, enabling even users without special rights or equipment to realize personal broadcasting.

[0254] In addition to the example of the content supply system ex100, as shown in FIG. 32, at least one of the video encoding device (image encoding device) or video decoding device (image decoding device) according to each of the above embodiments can also be incorporated into a digital broadcasting system ex200. Specifically, a broadcasting station ex201 communicates via radio waves multiplexed data in which music data and the like are multiplexed onto video data, or transmits the multiplexed data to a satellite ex202. This video data is data encoded using the video encoding method described in each of the above embodiments (i.e., data encoded by an image encoding device according to one aspect of the present invention). Receiving this, the broadcasting satellite ex202 transmits broadcasting radio waves, which are received by a home antenna ex204 capable of receiving satellite broadcasts. The received multiplexed data is decoded and played back by a device such as a television (receiver) ex300 or a set-top box (STB) ex217 (i.e., functions as an image decoding device according to one aspect of the present invention).

[0255] The video decoding device or video encoding device described in each of the above embodiments can also be implemented in a reader / recorder ex218 that reads and decodes multiplexed data recorded on a recording medium ex215 such as a DVD or Blu-ray, or encodes a video signal onto the recording medium ex215 and, in some cases, multiplexes it with an audio signal before writing it. In this case, the reproduced video signal is displayed on a monitor ex219, and the video signal can be reproduced in another device or system using the recording medium ex215 on which the multiplexed data is recorded. Alternatively, a video decoding device may be implemented in a set-top box ex217 connected to a cable television cable ex203 or a satellite / terrestrial broadcast antenna ex204, and the video may be displayed on the television monitor ex219. In this case, the video decoding device may be incorporated into the television rather than the set-top box.

[0256] 33 is a diagram showing a television (receiver) ex300 that uses the video decoding method and video encoding method described in each of the above embodiments. The television ex300 includes a tuner ex301 that acquires or outputs multiplexed data in which audio data is multiplexed onto video data via an antenna ex204 that receives the broadcasts or a cable ex203, a modulation / demodulation unit ex302 that demodulates the received multiplexed data or modulates it into multiplexed data to be transmitted externally, and a multiplexing / demultiplexing unit ex303 that separates the demodulated multiplexed data into video data and audio data or multiplexes the video data and audio data encoded by a signal processing unit ex306.

[0257] The television ex300 also has a signal processing unit ex306 having an audio signal processing unit ex304 and a video signal processing unit ex305 (which function as an image encoding device or an image decoding device according to an embodiment of the present invention) that decode the audio data and the video data, respectively, or encode the respective information, and an output unit ex309 having a speaker ex307 that outputs the decoded audio signal and a display unit ex308 such as a display that displays the decoded video signal.The television ex300 also has an interface unit ex317 that has an operation input unit ex312 that accepts user operation input, etc.The television ex300 also has a control unit ex310 that controls each unit overall, and a power supply circuit unit ex311 that supplies power to each unit. In addition to the operation input unit ex312, the interface unit ex317 may have a bridge ex313 connected to an external device such as a reader / recorder ex218, a slot unit ex314 for allowing a recording medium ex216 such as an SD card to be attached, a driver ex315 for connecting to an external recording medium such as a hard disk, a modem ex316 for connecting to a telephone network, etc. The recording medium ex216 is a non-volatile / volatile semiconductor memory element that stores information and allows it to be electrically recorded. The various units of the television ex300 are connected to each other via a synchronous bus.

[0258] First, a configuration in which the television ex300 decodes and plays back multiplexed data acquired from an external source via an antenna ex204 or the like will be described. The television ex300 receives user operation via a remote controller ex220 or the like, and, under the control of a control unit ex310 having a CPU or the like, separates the multiplexed data demodulated by a modulation / demodulation unit ex302 in a multiplexing / separation unit ex303. The television ex300 then decodes the separated audio data in an audio signal processing unit ex304 and decodes the separated video data in a video signal processing unit ex305 using the decoding method described in each of the above embodiments. The decoded audio and video signals are output to the outside from an output unit ex309. When outputting, it is preferable to temporarily store these signals in buffers ex318, ex319, or the like so that the audio and video signals are played back in sync. The television ex300 may also read the multiplexed data from recording media ex215, ex216, such as magnetic / optical discs or SD cards, rather than from broadcasts or the like. Next, a configuration in which the television ex300 encodes audio and video signals and transmits them externally or writes them to a recording medium or the like will be described. The television ex300 receives user operation from a remote controller ex220 or the like, and, under the control of the control unit ex310, encodes the audio signal in the audio signal processing unit ex304 and encodes the video signal in the video signal processing unit ex305 using the encoding method described in each of the above embodiments. The encoded audio and video signals are multiplexed by the multiplexing / demultiplexing unit ex303 and output externally. When multiplexing, these signals may be temporarily stored in buffers ex320, ex321, etc., so that the audio and video signals are synchronized. Note that multiple buffers ex318, ex319, ex320, and ex321 may be provided as shown, or one or more buffers may be shared. Furthermore, data may be stored in buffers other than those shown in the figure, for example, between the modulation / demodulation unit ex302 and the multiplexing / demultiplexing unit ex303, as a buffer to prevent system overflow and underflow.

[0259] Furthermore, in addition to acquiring audio data and video data from broadcasts, recording media, etc., the television ex300 may also be configured to accept AV input from a microphone or camera and perform encoding processing on the data acquired from them. Note that while the television ex300 has been described here as being configured to be capable of the above encoding processing, multiplexing, and external output, it may also be configured not to be able to perform these processes and only be capable of the above reception, decoding processing, and external output.

[0260] Furthermore, when multiplexed data is read from or written to a recording medium using the reader / recorder ex218, the above-mentioned decoding or encoding process may be performed by either the television ex300 or the reader / recorder ex218, or the television ex300 and the reader / recorder ex218 may share the process.

[0261] As an example, Figure 34 shows the configuration of the information reproducing / recording unit ex400 when reading or writing data from an optical disc. The information reproducing / recording unit ex400 includes the following elements: ex401, ex402, ex403, ex404, ex405, ex406, and ex407. The optical head ex401 writes information by irradiating a laser spot onto the recording surface of the recording medium ex215, which is an optical disc, and reads the information by detecting the light reflected from the recording surface of the recording medium ex215. The modulation / recording unit ex402 electrically drives the semiconductor laser built into the optical head ex401 and modulates the laser light according to the recorded data. The reproduction / demodulation unit ex403 amplifies the reproduction signal obtained by electrically detecting the light reflected from the recording surface using a photodetector built into the optical head ex401, and separates and demodulates the signal components recorded on the recording medium ex215 to reproduce the required information. The buffer ex404 temporarily stores information to be recorded on the recording medium ex215 and information reproduced from the recording medium ex215. The disk motor ex405 rotates the recording medium ex215. The servo control unit ex406 controls the rotation of the disk motor ex405, moves the optical head ex401 to a specified information track, and performs laser spot tracking. The system control unit ex407 controls the entire information reproduction / recording unit ex400. The system control unit ex407 performs the above read and write processes by using various information stored in the buffer ex404, generating and adding new information as needed, and recording and reproducing information through the optical head ex401 while coordinating the modulation recording unit ex402, reproduction demodulation unit ex403, and servo control unit ex406. The system control unit ex407 is composed of, for example, a microprocessor and performs these processes by executing read and write programs.

[0262] In the above description, the optical head ex401 is described as irradiating a laser spot, but it may be configured to perform higher density recording using near-field light.

[0263] FIG. 35 shows a schematic diagram of recording medium ex215, an optical disc. A spiral guide groove is formed on the recording surface of recording medium ex215, and address information indicating absolute positions on the disc is recorded in advance on information track ex230 by varying the shape of the groove. This address information includes information for identifying the position of recording block ex231, which is the unit of data recording. A recording or playback device can identify a recording block by reproducing information track ex230 and reading the address information. Recording medium ex215 also includes a data recording area ex233, an inner peripheral area ex232, and an outer peripheral area ex234. The data recording area ex233 is the area used for recording user data, while the inner peripheral area ex232 and outer peripheral area ex234, which are located either inner or outer than data recording area ex233, are used for specific purposes other than recording user data. The information reproducing / recording unit ex400 reads and writes encoded audio data, video data, or multiplexed data obtained by multiplexing these data, from the data recording area ex233 of such recording medium ex215.

[0264] The above explanation has been given using examples of optical discs such as single-layer DVDs and BDs, but the present invention is not limited to these and may be an optical disc with a multi-layer structure that allows recording on areas other than the surface. It may also be an optical disc with a structure that allows multidimensional recording / playback, such as recording information using light of various different wavelengths in the same location on the disc or recording different layers of information from various angles.

[0265] In addition, in the digital broadcasting system ex200, a car ex210 equipped with an antenna ex205 can receive data from a satellite ex202 or the like, and the video can be played on a display device such as a car navigation system ex211 installed in the car ex210. The car navigation system ex211 can be configured, for example, by adding a GPS receiving unit to the configuration shown in Fig. 33, and similar configurations can be considered for a computer ex111, a mobile phone ex114, and the like.

[0266] 36A is a diagram showing a mobile phone ex114 that uses the video decoding method and video encoding method described in the above embodiment. The mobile phone ex114 includes an antenna ex350 for transmitting and receiving radio waves to and from base station ex110, a camera unit ex365 capable of capturing video and still images, and a display unit ex358 such as an LCD display that displays decoded data of video captured by the camera unit ex365 and video received by the antenna ex350. The mobile phone ex114 also includes a main body unit having an operation key unit ex366, an audio output unit ex357 such as a speaker for outputting audio, an audio input unit ex356 such as a microphone for inputting audio, a memory unit ex367 for storing captured video, still images, recorded audio, or encoded or decoded data of received video, still images, email, etc., or a slot unit ex364 that serves as an interface with a recording medium for similarly storing data.

[0267] Furthermore, a configuration example of mobile phone ex114 will be described with reference to Fig. 36B. Mobile phone ex114 has a main control unit ex360 that comprehensively controls each unit of a main body unit including a display unit ex358 and an operation key unit ex366, and a power supply circuit unit ex361, an operation input control unit ex362, a video signal processing unit ex355, a camera interface unit ex363, an LCD (Liquid Crystal Display) control unit ex359, a modulation / demodulation unit ex352, a multiplexing / demultiplexing unit ex353, an audio signal processing unit ex354, a slot unit ex364, and a memory unit ex367, which are all connected to each other via a bus ex370.

[0268] When the end call and power key is turned on by the user, the power supply circuit unit ex361 starts up the mobile phone ex114 into an operable state by supplying power to each unit from the battery pack.

[0269] Based on the control of a main control unit ex360 having a CPU, ROM, RAM, etc., the mobile phone ex114 converts an audio signal collected by an audio input unit ex356 into a digital audio signal by an audio signal processing unit ex354 in a voice call mode, which undergoes spectrum spread processing by a modulation / demodulation unit ex352, digital-to-analog conversion processing and frequency conversion processing by a transmission / reception unit ex351, and then transmits the digital audio signal via an antenna ex350. Furthermore, the mobile phone ex114 amplifies received data received via the antenna ex350 in a voice call mode, performs frequency conversion processing and analog-to-digital conversion processing, performs spectrum despread processing by the modulation / demodulation unit ex352, converts the data into an analog audio signal by the audio signal processing unit ex354, and then outputs the data from an audio output unit ex357.

[0270] Furthermore, when sending an e-mail in data communication mode, the text data of the e-mail entered by operating the operation key unit ex366 or the like of the main unit is sent to the main control unit ex360 via the operation input control unit ex362. The main control unit ex360 performs spectrum spread processing on the text data in the modulation / demodulation unit ex352, performs digital-to-analog conversion processing and frequency conversion processing in the transmission / reception unit ex351, and then transmits the data to the base station ex110 via the antenna ex350. When receiving an e-mail, the received data is subjected to roughly the reverse processing and output to the display unit ex358.

[0271] When transmitting video, still images, or video and audio in the data communication mode, the video signal processing unit ex355 compresses and encodes the video signal supplied from the camera unit ex365 using the video encoding method described in each of the above embodiments (i.e., functions as an image encoding device according to one aspect of the present invention), and sends the encoded video data to the multiplexing / separating unit ex353. In addition, the audio signal processing unit ex354 encodes the audio signal collected by the audio input unit ex356 while the camera unit ex365 is capturing video, still images, etc., and sends the encoded audio data to the multiplexing / separating unit ex353.

[0272] The multiplexing / separation unit ex353 multiplexes the encoded video data supplied from the video signal processing unit ex355 and the encoded audio data supplied from the audio signal processing unit ex354 using a predetermined method, and the resulting multiplexed data is subjected to spectrum spreading processing in the modulation / demodulation unit (modulation / demodulation circuit unit) ex352, digital-to-analog conversion processing and frequency conversion processing in the transmission / reception unit ex351, and then transmitted via the antenna ex350.

[0273] When receiving video file data linked to a website or the like in data communication mode, or when receiving an email with video and / or audio attachments, the multiplexer / demultiplexer ex353 decodes the multiplexed data received via the antenna ex350 into a video data bitstream and an audio data bitstream. The multiplexer / demultiplexer ex353 then decodes the multiplexed data into a video data bitstream and an audio data bitstream via a synchronization bus ex370. The video signal processor ex355 decodes the video signal using a video decoding method corresponding to the video encoding method described in each of the above embodiments (i.e., functions as an image decoding device according to one aspect of the present invention). The display unit ex358 displays, via an LCD controller ex359, video and still images included in the video file linked to a website, for example. The audio signal processor ex354 decodes the audio signal, and audio is output from an audio output unit ex357.

[0274] Furthermore, like the television ex300, terminals such as the mobile phone ex114 can be implemented in three ways: a transmitting / receiving terminal with both an encoder and a decoder, a transmitting terminal with only an encoder, and a receiving terminal with only a decoder. Furthermore, in the digital broadcasting system ex200, it has been explained that multiplexed data in which music data and the like are multiplexed onto video data is received and transmitted, but the data may also be multiplexed with text data related to the video in addition to audio data, or it may be video data itself rather than multiplexed data.

[0275] In this way, it is possible to use the video encoding method or video decoding method shown in each of the above embodiments in any of the above-mentioned devices and systems, and by doing so, it is possible to obtain the effects described in each of the above embodiments.

[0276] Furthermore, the present invention is not limited to the above-described embodiment, and various modifications and alterations are possible without departing from the scope of the present invention.

[0277] (Embodiment 6) It is also possible to generate video data by switching between the video encoding method or device shown in each of the above embodiments and a video encoding method or device conforming to a different standard, such as MPEG-2, MPEG4-AVC, or VC-1, as needed.

[0278] When multiple pieces of video data conforming to different standards are generated, it is necessary to select a decoding method corresponding to each standard when decoding. However, since it is not possible to identify which standard the video data to be decoded conforms to, a problem arises in that it is not possible to select an appropriate decoding method.

[0279] To solve this problem, multiplexed data, which is video data multiplexed with audio data, etc., is configured to include identification information that indicates which standard the video data conforms to. A specific configuration of multiplexed data including video data generated by the video encoding methods or devices described in the above embodiments is described below. The multiplexed data is a digital stream in MPEG-2 transport stream format.

[0280] FIG. 37 shows the structure of multiplexed data. As shown in FIG. 37, the multiplexed data is obtained by multiplexing one or more of a video stream, an audio stream, a presentation graphics stream (PG), and an interactive graphics stream. The video stream represents the main video and secondary video of a movie, the audio stream (IG) represents the main audio portion of the movie and the secondary audio mixed with the main audio, and the presentation graphics stream represents the subtitles of the movie. Here, the main video refers to the normal video displayed on the screen, and the secondary video refers to the video displayed on a small screen within the main video. The interactive graphics stream represents an interactive screen created by arranging GUI components on the screen. The video stream is encoded using the video encoding method or device described in each of the above embodiments or a video encoding method or device conforming to conventional standards such as MPEG-2, MPEG4-AVC, or VC-1. The audio stream is encoded using a format such as Dolby AC-3, Dolby Digital Plus, MLP, DTS, DTS-HD, or Linear PCM.

[0281] Each stream included in the multiplexed data is identified by a PID. For example, 0x1011 is assigned to the video stream used for movie images, 0x1100 to 0x111F to the audio stream, 0x1200 to 0x121F to the presentation graphics, 0x1400 to 0x141F to the interactive graphics stream, 0x1B00 to 0x1B1F to the video stream used for movie secondary video, and 0x1A00 to 0x1A1F to the audio stream used for secondary audio to be mixed with the main audio.

[0282] 38 is a diagram showing how multiplexed data is multiplexed. First, a video stream ex235 consisting of multiple video frames and an audio stream ex238 consisting of multiple audio frames are converted into PES packet sequences ex236 and ex239, respectively, and then converted into TS packets ex237 and ex240. Similarly, presentation graphics stream ex241 and interactive graphics data ex244 are converted into PES packet sequences ex242 and ex245, respectively, and then converted into TS packets ex243 and ex246. Multiplexed data ex247 is constructed by multiplexing these TS packets into a single stream.

[0283] Figure 39 shows in more detail how a video stream is stored in a PES packet sequence. The first row in Figure 39 shows a video frame sequence of the video stream. The second row shows a PES packet sequence. As indicated by arrows yy1, yy2, yy3, and yy4 in Figure 39, I-pictures, B-pictures, and P-pictures, which are multiple Video Presentation Units in the video stream, are divided into individual pictures and stored in the payload of a PES packet. Each PES packet has a PES header, which stores a Presentation Time-Stamp (PTS), which is the display time of the picture, and a Decoding Time-Stamp (DTS), which is the decoding time of the picture.

[0284] Figure 40 shows the format of the TS packet that is ultimately written to the multiplexed data. TS packets are 188-byte fixed-length packets consisting of a 4-byte TS header containing information such as a PID that identifies the stream, and a 184-byte TS payload that stores the data. The PES packets are divided and stored in the TS payload. In the case of BD-ROM, a 4-byte TP_Extra_Header is added to the TS packet, forming a 192-byte source packet that is written to the multiplexed data. The TP_Extra_Header contains information such as an ATS (Arrival Time Stamp). The ATS indicates the start time of the TS packet's transfer to the PID filter of the decoder. As shown in the lower part of Figure 40, source packets are lined up in the multiplexed data, and the number that increments from the beginning of the multiplexed data is called the SPN (Source Packet Number).

[0285] In addition to the individual streams (video, audio, subtitles, etc.), the TS packets contained in the multiplexed data also contain a Program Association Table (PAT), Program Map Table (PMT), and Program Clock Reference (PCR). The PAT indicates the PID of the PMT used in the multiplexed data, and the PAT's own PID is registered as 0. The PMT contains the PIDs of each stream (video, audio, subtitles, etc.) contained in the multiplexed data, as well as attribute information for the streams corresponding to each PID. It also contains various descriptors related to the multiplexed data. The descriptors include copy control information that indicates whether copying of the multiplexed data is permitted or prohibited. The PCR contains information about the Arrival Time Clock (ATC), which is the time axis of the ATS, and the System Time Clock (STC), which is the time axis of the PTS and DTS, and contains information about the STC time corresponding to the ATS at which the PCR packet is transferred to the decoder.

[0286] Figure 41 is a diagram explaining the data structure of a PMT in detail. At the beginning of a PMT is a PMT header that describes the length of the data contained in the PMT, among other things. This is followed by multiple descriptors related to the multiplexed data. The above-mentioned copy control information and other information are written as descriptors. After the descriptors are multiple stream information items related to each stream included in the multiplexed data. The stream information consists of stream descriptors that describe the stream type to identify the stream compression codec, the stream PID, and stream attribute information (frame rate, aspect ratio, etc.). There are as many stream descriptors as there are streams in the multiplexed data.

[0287] When recording on a recording medium, the multiplexed data is recorded together with a multiplexed data information file.

[0288] As shown in FIG. 42, the multiplexed data information file is management information for multiplexed data, has one-to-one correspondence with the multiplexed data, and is composed of multiplexed data information, stream attribute information, and an entry map.

[0289] As shown in Figure 42, the multiplexed data information consists of a system rate, a playback start time, and a playback end time. The system rate indicates the maximum transfer rate of the multiplexed data to the PID filter of the system target decoder, which will be described later. The interval between ATSs contained in the multiplexed data is set to be equal to or less than the system rate. The playback start time is set to the PTS of the first video frame of the multiplexed data, and the playback end time is set to the PTS of the last video frame of the multiplexed data plus the playback interval of one frame.

[0290] As shown in Figure 43, the stream attribute information for each stream included in the multiplexed data is registered for each PID. The attribute information has different information for each video stream, audio stream, presentation graphics stream, and interactive graphics stream. The video stream attribute information includes information such as the compression codec used to compress the video stream, the resolution of the individual picture data that make up the video stream, the aspect ratio, and the frame rate. The audio stream attribute information includes information such as the compression codec used to compress the audio stream, the number of channels included in the audio stream, the language it supports, and the sampling frequency. This information is used to initialize the decoder before playback on the player.

[0291] In this embodiment, the stream type included in the PMT of the multiplexed data is used. Furthermore, if multiplexed data is recorded on a recording medium, the video stream attribute information included in the multiplexed data information is used. Specifically, the video coding method or device shown in each of the above embodiments includes a step or means for setting, in the stream type included in the PMT or the video stream attribute information, unique information indicating that the video data is generated by the video coding method or device shown in each of the above embodiments. This configuration makes it possible to distinguish between video data generated by the video coding method or device shown in each of the above embodiments and video data that conforms to other standards.

[0292] FIG. 44 shows the steps of the video decoding method according to this embodiment. In step exS100, the stream type included in the PMT or the video stream attribute information included in the multiplexed data information is obtained from the multiplexed data. Next, in step exS101, it is determined whether the stream type or the video stream attribute information indicates that the multiplexed data was generated by the video coding method or device described in the above embodiments. If it is determined that the stream type or the video stream attribute information was generated by the video coding method or device described in the above embodiments, in step exS102, decoding is performed using the video decoding method described in the above embodiments. If the stream type or the video stream attribute information indicates that the data complies with a conventional standard such as MPEG-2, MPEG4-AVC, or VC-1, decoding is performed using the video decoding method according to the conventional standard in step exS103.

[0293] In this way, by setting a new unique value in the stream type or video stream attribute information, it is possible to determine whether the video decoding method or device shown in each of the above embodiments can decode the data when decoding. Therefore, even when multiplexed data conforming to a different standard is input, an appropriate decoding method or device can be selected, enabling decoding without errors. Furthermore, the video encoding method or device or video decoding method or device shown in this embodiment can be used in any of the above-mentioned devices and systems.

[0294] (Embodiment 7) The video encoding method and device, and video decoding method and device shown in each of the above embodiments are typically realized by an LSI, which is an integrated circuit. As an example, FIG. 45 shows the configuration of a single-chip LSI ex500. LSI ex500 includes elements ex501, ex502, ex503, ex504, ex505, ex506, ex507, ex508, and ex509, which are described below, and each element is connected via a bus ex510. When the power supply is on, a power supply circuit unit ex505 supplies power to each unit, thereby activating them into an operable state.

[0295] For example, when performing encoding processing, the LSI ex500 inputs AV signals from the microphone ex117, camera ex113, etc. via the AV I / O ex509 under the control of a control unit ex501 including a CPU ex502, a memory controller ex503, a stream controller ex504, a drive frequency control unit ex512, etc. The input AV signals are temporarily stored in an external memory ex511 such as an SDRAM. Under the control of the control unit ex501, the stored data is divided into multiple batches as appropriate depending on the processing volume and processing speed and sent to the signal processing unit ex507, where the audio signal and / or video signal is encoded. Here, the video signal encoding processing is the encoding processing described in each of the above embodiments. The signal processing unit ex507 may further perform processing such as multiplexing the encoded audio data and the encoded video data, and output the resulting data to the outside from the stream I / O ex506. This output multiplexed data is transmitted to the base station ex107 or written to a recording medium ex215. When multiplexing, it is advisable to temporarily store the data in a buffer ex508 to ensure synchronization.

[0296] Although the memory ex511 has been described above as being external to the LSIex500, it may be included within the LSIex500. The buffer ex508 is not limited to one, and multiple buffers may be provided. Furthermore, the LSIex500 may be formed as a single chip or multiple chips.

[0297] Furthermore, in the above description, the control unit ex501 is described as having a CPU ex502, a memory controller ex503, a stream controller ex504, a drive frequency control unit ex512, etc., but the configuration of the control unit ex501 is not limited to this configuration. For example, the signal processing unit ex507 may further include a CPU. By providing a CPU inside the signal processing unit ex507, it is possible to further improve processing speed. As another example, the CPU ex502 may include the signal processing unit ex507, or a part of the signal processing unit ex507, such as an audio signal processing unit. In such a case, the control unit ex501 is configured to include a CPU ex502 that includes the signal processing unit ex507, or a part of it.

[0298] Although we have referred to it as an LSI here, it may also be called an IC, system LSI, super LSI, or ultra LSI depending on the level of integration.

[0299] Furthermore, the method of integration is not limited to LSI, but may be realized by dedicated circuits or general-purpose processors. It is also possible to use FPGAs (Field Programmable Gate Arrays), which can be programmed after LSI manufacturing, or reconfigurable processors, which allow the connections and settings of circuit cells within LSIs to be reconfigured.

[0300] Furthermore, if an integrated circuit technology that can replace LSI emerges due to advances in semiconductor technology or other derivative technologies, it is natural that such technology could be used to integrate functional blocks. The application of biotechnology is also a possibility.

[0301] (Embodiment 8) When decoding video data generated by the video encoding method or device described in each of the above embodiments, the amount of processing is likely to increase compared to when decoding video data conforming to conventional standards such as MPEG-2, MPEG4-AVC, or VC-1. Therefore, it is necessary to set the drive frequency of the LSIex500 to a higher frequency than the drive frequency of the CPUex502 when decoding video data conforming to conventional standards. However, increasing the drive frequency raises the problem of increased power consumption.

[0302] To solve this problem, video decoding devices such as televisions ex300 and LSIs ex500 are configured to identify the standard to which video data conforms and switch the drive frequency according to the standard. FIG. 46 shows a configuration ex800 in this embodiment. If the video data was generated using the video encoding method or device described in each of the above embodiments, a drive frequency switching unit ex803 sets a high drive frequency. The unit then instructs a decoding processing unit ex801, which executes the video decoding method described in each of the above embodiments, to decode the video data. On the other hand, if the video data conforms to a conventional standard, the unit sets a low drive frequency compared to when the video data was generated using the video encoding method or device described in each of the above embodiments. The unit then instructs a decoding processing unit ex802, which conforms to the conventional standard, to decode the video data.

[0303] More specifically, the drive frequency switching unit ex803 is composed of the CPU ex502 and drive frequency control unit ex512 in FIG. 45. The decoding processing unit ex801 that executes the video decoding method described in each of the above embodiments and the decoding processing unit ex802 that complies with the conventional standard correspond to the signal processing unit ex507 in FIG. 45. The CPU ex502 identifies the standard to which the video data conforms. The driving frequency control unit ex512 sets the drive frequency based on the signal from the CPU ex502. The signal processing unit ex507 decodes the video data based on the signal from the CPU ex502. Here, the video data can be identified using, for example, the identification information described in the sixth embodiment. The identification information is not limited to that described in the sixth embodiment, and any information that can identify the standard to which the video data conforms may be used. For example, if it is possible to identify the standard to which the video data conforms based on an external signal that identifies whether the video data is for use on a television or a disc, then the identification may be based on such an external signal. Furthermore, the selection of the drive frequency in the CPUex502 can be performed based on a lookup table that associates the video data standard with the drive frequency, as shown in Fig. 48. The lookup table is stored in the buffer ex508 or the internal memory of the LSI, and the CPUex502 can select the drive frequency by referring to this lookup table.

[0304] FIG. 47 shows steps for implementing the method of this embodiment. First, in step exS200, the signal processing unit ex507 acquires identification information from the multiplexed data. Next, in step exS201, the CPU ex502 identifies, based on the identification information, whether the video data was generated by the encoding method or device described in any of the above embodiments. If the video data was generated by the encoding method or device described in any of the above embodiments, in step exS202, the CPU ex502 sends a signal to the driving frequency control unit ex512 to set the driving frequency to a high level. The driving frequency control unit ex512 then sets the driving frequency to a high level. On the other hand, if the video data indicates that the video data complies with a conventional standard such as MPEG-2, MPEG4-AVC, or VC-1, in step exS203, the CPU ex502 sends a signal to the driving frequency control unit ex512 to set the driving frequency to a low level. The driving frequency control unit ex512 then sets the driving frequency to a lower level than when the video data was generated by the encoding method or device described in any of the above embodiments.

[0305] Furthermore, by changing the voltage applied to the LSIex500 or a device including the LSIex500 in conjunction with switching the drive frequency, it is possible to further enhance the power saving effect. For example, when the drive frequency is set low, it is conceivable to set the voltage applied to the LSIex500 or a device including the LSIex500 lower in response to this change than when the drive frequency is set high.

[0306] Furthermore, the method of setting the drive frequency is not limited to the above-described setting method, and may be such that a high drive frequency is set when the decoding processing volume is large, and a low drive frequency is set when the decoding processing volume is small. For example, if the processing volume required to decode video data conforming to the MPEG4-AVC standard is larger than the processing volume required to decode video data generated by the video encoding method or device described in each of the above-described embodiments, the drive frequency may be set in the opposite way to the above-described setting method.

[0307] Furthermore, the method of setting the drive frequency is not limited to a configuration that lowers the drive frequency. For example, if the identification information indicates that the video data is generated by the video encoding method or device described in each of the above embodiments, the voltage applied to the LSIex500 or a device including the LSIex500 can be set high. If the identification information indicates that the video data complies with conventional standards such as MPEG-2, MPEG4-AVC, or VC-1, the voltage applied to the LSIex500 or a device including the LSIex500 can be set low. As another example, if the identification information indicates that the video data is generated by the video encoding method or device described in each of the above embodiments, the drive of the CPUex502 can be suspended without stopping. If the identification information indicates that the video data complies with conventional standards such as MPEG-2, MPEG4-AVC, or VC-1, the drive of the CPUex502 can be suspended temporarily because there is sufficient processing capacity. Even if the identification information indicates that the video data is generated by the video encoding method or device described in each of the above embodiments, the drive of the CPUex502 can be suspended temporarily if there is sufficient processing capacity. In this case, it is conceivable to set the stop time shorter than when the video data indicates that it is video data that complies with conventional standards such as MPEG-2, MPEG4-AVC, and VC-1.

[0308] In this way, by switching the drive frequency depending on the standard to which the video data conforms, it is possible to achieve power savings. Furthermore, if the LSIex500 or a device including the LSIex500 is driven by a battery, the power savings can also extend the battery life.

[0309] (Embodiment 9) The above-mentioned devices and systems, such as televisions and mobile phones, may receive multiple inputs of video data conforming to different standards. To ensure that the signal processing unit ex507 of the LSIex500 can decode such inputs, the signal processing unit ex507 must support multiple standards. However, using separate signal processing units ex507 for each standard increases the circuit size of the LSIex500 and increases costs.

[0310] To solve this problem, a configuration is provided in which a decoding processing unit for executing the video decoding method described in each of the above embodiments is partially shared with a decoding processing unit conforming to conventional standards such as MPEG-2, MPEG4-AVC, and VC-1. An example of this configuration is shown in ex900 of FIG. 49A. For example, the video decoding method described in each of the above embodiments and a video decoding method conforming to the MPEG4-AVC standard share some of the processing content, such as entropy coding, inverse quantization, deblocking filtering, and motion compensation. For the common processing content, a decoding processing unit ex902 conforming to the MPEG4-AVC standard is shared, and a dedicated decoding processing unit ex901 is used for other processing content unique to one aspect of the present invention that is not conforming to the MPEG4-AVC standard. In particular, since one aspect of the present invention is characterized by motion compensation, for example, a dedicated decoding processing unit ex901 is used for motion compensation, and a decoding processing unit is shared for any or all of the other processing, such as entropy decoding, deblocking filtering, and inverse quantization. Regarding the sharing of the decoding processing unit, for common processing content, the decoding processing unit for executing the video decoding method shown in each of the above embodiments may be shared, and for processing content specific to the MPEG4-AVC standard, a dedicated decoding processing unit may be used.

[0311] Another example of partially sharing processing is shown in ex1000 in Figure 49B. In this example, a dedicated decoding processing unit ex1001 corresponding to processing content specific to one aspect of the present invention, a dedicated decoding processing unit ex1002 corresponding to processing content specific to another conventional standard, and a shared decoding processing unit ex1003 corresponding to processing content common to the video decoding method according to one aspect of the present invention and the video decoding method of another conventional standard are used. Here, the dedicated decoding processing units ex1001 and ex1002 are not necessarily specialized for processing content specific to one aspect of the present invention or another conventional standard, and may be capable of performing other general-purpose processing. The configuration of this embodiment can also be implemented using an LSI ex500.

[0312] In this way, by sharing a decoding processing unit for processing content that is common between a video decoding method according to one embodiment of the present invention and a video decoding method of a conventional standard, it is possible to reduce the circuit size of the LSI and reduce costs. [Industrial Applicability]

[0313] The video encoding method and video decoding method of the present invention can be applied to any multimedia data, can improve the error resistance of video encoding and decoding, and is useful as a video encoding method and video decoding method for storage, transmission, communication, etc. using, for example, mobile phones, DVD devices, personal computers, etc. [Explanation of symbols]

[0314] 100, 200 Video encoding device 101 Subtraction section 102 Orthogonal transformation unit 103 Quantization section 104, 302 Inverse quantization section 105, 303 Inverse orthogonal transform unit 106, 304 Addition section 107, 305 Block Memory 108, 306 frame memory 109, 307 Intra prediction section 110, 308 Inter prediction section 111, 309 Inter-prediction control unit 112 Picture type determination unit 113, 310 switches 114, 311 Prediction motion vector candidate calculation unit 115,312 colPic memory 116 Variable-length coding section 210, 410 Prediction motion vector candidate derivation unit 211, 411 Decision Section 212, 412 1st derivation part 213, 413 Specific part 214, 414 Judgment section 215, 415 2nd derivation 220, 430 Predictive control unit 230 Encoding section 300, 400 Video decoding device 301 Variable Length Decoding Unit 420 Decoding Unit

Claims

1. a packet processing unit that generates a bitstream by a video encoding method and packetizes the generated bitstream to obtain encoded data; a transmitting unit that transmits the packetized encoded data, The video encoding method includes: generating, for each block of an image divided into a plurality of blocks, a candidate list having a plurality of motion vector candidates to be used in encoding the current block from motion vectors used in encoding a plurality of neighboring blocks spatially or temporally adjacent to the current block; selecting a motion vector candidate for the motion vector of the current block from the candidate list; encoding the current block using the selected motion vector candidate, The step of generating the candidate list comprises: selecting a first motion vector used in encoding a first block of the plurality of surrounding blocks and adding the first motion vector to the candidate list; selecting a second motion vector used in encoding a second block different from the first block and adding the second motion vector to the candidate list as a second motion vector candidate, the second motion vector candidate having a value different from the first motion vector candidate; Counting the number of times the first motion vector candidate and the second motion vector candidate are selected in the plurality of neighboring blocks spatially or temporally adjacent to the current block; If the number of times that the second motion vector candidate has been selected is greater than the number of times that the first motion vector candidate has been selected, assigning a smaller value of the predicted motion vector index to the second motion vector candidate. A streaming server characterized by:

2. obtaining a bitstream generated by a video encoding method; transmitting the obtained bitstream; The video encoding method includes: generating, for each block of an image divided into a plurality of blocks, a candidate list having a plurality of motion vector candidates to be used in encoding the current block from motion vectors used in encoding a plurality of neighboring blocks spatially or temporally adjacent to the current block; selecting a motion vector candidate for the motion vector of the current block from the candidate list; encoding the current block using the selected motion vector candidate, The step of generating the candidate list comprises: selecting a first motion vector used in encoding a first block of the plurality of surrounding blocks and adding the first motion vector to the candidate list; selecting a second motion vector used in encoding a second block different from the first block and adding the second motion vector to the candidate list as a second motion vector candidate, the second motion vector candidate having a value different from the first motion vector candidate; Counting the number of times the first motion vector candidate and the second motion vector candidate are selected in the plurality of neighboring blocks spatially or temporally adjacent to the current block; If the number of times that the second motion vector candidate has been selected is greater than the number of times that the first motion vector candidate has been selected, assigning a smaller value of the predicted motion vector index to the second motion vector candidate.

1. A method for transmitting a bitstream, comprising:

Citation Information

Patent Citations

  • System for nested entropy encoding

    WO2012043882A1