[go: up one dir, main page]

WO2019187096A1 - 復号方法、復号装置、符号化装置及びプログラム - Google Patents

復号方法、復号装置、符号化装置及びプログラム Download PDF

Info

Publication number
WO2019187096A1
WO2019187096A1 PCT/JP2018/013856 JP2018013856W WO2019187096A1 WO 2019187096 A1 WO2019187096 A1 WO 2019187096A1 JP 2018013856 W JP2018013856 W JP 2018013856W WO 2019187096 A1 WO2019187096 A1 WO 2019187096A1
Authority
WO
WIPO (PCT)
Prior art keywords
template
decoded
area
screen
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/JP2018/013856
Other languages
English (en)
French (fr)
Inventor
寛史 長岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Socionext Inc
Original Assignee
Socionext Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Socionext Inc filed Critical Socionext Inc
Priority to PCT/JP2018/013856 priority Critical patent/WO2019187096A1/ja
Priority to JP2020508865A priority patent/JP7248013B2/ja
Publication of WO2019187096A1 publication Critical patent/WO2019187096A1/ja
Priority to US17/032,446 priority patent/US11197011B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation

Definitions

  • the present invention relates to a decoding method, a decoding device, an encoding device, and a program.
  • Inter prediction As one of inter-screen prediction (inter prediction) in the next generation video codec (next generation codec following H.265 / HEVC) currently under study, there is inter prediction by template matching. Inter prediction by template matching uses a region (template region) adjacent to a block to be decoded to perform matching in a temporally different reference screen, and generates a prediction image by determining a motion vector. This is one of “compensated inter prediction”.
  • Patent Document 1 proposes a method of setting a region having a predetermined positional relationship with a block to be decoded as a template region in order to improve processing efficiency in inter prediction by template matching.
  • the purpose is to improve the processing efficiency in inter prediction by template matching in the next generation codec.
  • a decoding method comprises the following configuration. That is, A decoding method for decoding an image using inter-screen prediction, Obtaining a rectangular area to be decoded from within the screen being decoded; Setting a first template area in accordance with the position of the rectangular area to be decoded in the screen being decoded; Setting a second template region corresponding to the first template region in a reference screen that is temporally different from the screen being decoded; By moving the second template area by a predetermined vector within the reference screen, a third template area is set, and an image between the third template area and the first template area is set.
  • the step of setting the first template region includes: When the size of the rectangular area to be decoded is equal to or smaller than a predetermined threshold, or the screen including the rectangular area to be decoded is not referred to when decoding another screen that is temporally different. In the case of corresponding to a reference screen, an area adjacent to a predetermined block including the decoding target rectangular area determined by the encoding apparatus is set as the first template area.
  • Processing efficiency can be improved in inter prediction by template matching in the next generation codec.
  • FIG. 1 is a diagram illustrating an application example of an encoder and a decoder.
  • FIG. 2 is a diagram illustrating another application example of the encoder and the decoder.
  • FIG. 3 is a diagram illustrating an example of the hardware configuration of the encoder.
  • FIG. 4 is a diagram illustrating an example of a functional configuration of the encoder.
  • FIG. 5 is a diagram for explaining a rectangular area and a template area to be decoded in the inter prediction mode under consideration in the next generation codec.
  • FIG. 6 is a diagram showing an outline of template matching in the inter prediction mode under consideration in the next generation codec.
  • FIG. 1 is a diagram illustrating an application example of an encoder and a decoder.
  • FIG. 2 is a diagram illustrating another application example of the encoder and the decoder.
  • FIG. 3 is a diagram illustrating an example of the hardware configuration of the encoder.
  • FIG. 4 is a diagram illustrating an example of a functional configuration of the encoder.
  • FIG. 7 is a diagram illustrating an example of a functional configuration (encoder) for realizing inter prediction processing by template matching in the inter prediction mode under consideration in the next generation codec.
  • FIG. 8 is a flowchart showing the flow of inter prediction processing by template matching in the inter prediction mode under consideration in the next generation codec.
  • FIG. 9 is a flowchart showing the flow of the motion search process at the CU level, which details step S801.
  • FIG. 10 is a flowchart showing the flow of the subCU level motion search process, which details step S802.
  • FIG. 11 is a diagram illustrating processing contents and processing timing for each subCU in the inter prediction mode under consideration in the next generation codec.
  • FIG. 12 is a diagram for explaining a rectangular region and a template region to be decoded in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 13 is a diagram illustrating an outline of template matching in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 14 is a diagram illustrating an example of a functional configuration for realizing inter prediction processing by template matching in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 15 is a diagram illustrating template matching execution conditions in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 16 is a flowchart showing a flow of subCU level motion search processing in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 17 is a diagram illustrating processing contents and processing timing for each subCU in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 18 is a first diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 19 is a second diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 20 is a third diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 21 is a diagram illustrating an example of a functional configuration of the decoder.
  • FIG. 18 is a first diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 19 is a second diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 20 is a third diagram illustrating a specific example of parallel processing in the inter prediction mode of the encode
  • FIG. 22 is a diagram illustrating an example of a functional configuration (decoder) for realizing inter prediction processing by template matching in the inter prediction mode under consideration in the next generation codec.
  • FIG. 23 is a diagram illustrating an example of a functional configuration for realizing inter prediction processing by template matching in the inter prediction mode of the decoder according to the first embodiment.
  • FIG. 24 is a diagram for explaining a decoding target rectangular region and a template region in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 25 is a diagram illustrating an example of a functional configuration for realizing inter prediction processing by template matching in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 26 is a diagram illustrating template matching execution conditions in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 27 is a flowchart showing the flow of a subCU level motion search process in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 28 is a diagram illustrating processing contents and processing timing for each subCU in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 29 is a first diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 30 is a second diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 31 is a third diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 32 is a diagram illustrating an example of a functional configuration for realizing inter prediction processing by template matching in the inter prediction mode of the decoder according to the second embodiment.
  • FIG. 33 is a flowchart showing the flow of a subCU level motion search process in the inter prediction mode of the encoder according to the third embodiment.
  • FIG. 1 is a diagram illustrating an application example of an encoder and a decoder.
  • an encoder 110 and a decoder 120 are arranged in a transmitter and a receiver, respectively, and connected via a network 160, thereby forming an image processing system 100 to which the encoder 110 and the decoder 120 are applied. Can do.
  • an encoder 110 disposed in a transmission device generates a data stream (encoded sequence) by encoding input image data. Further, the transmission device transmits the generated data stream to the reception device via the network 160.
  • the receiving device receives the data stream. Further, the decoder 120 disposed in the receiving device generates and displays image data by decoding the data stream.
  • Forming such an image processing system 100 can reduce the transmission load when transmitting image data, and can be applied to various fields such as the Internet field, the broadcast field, and the communication field.
  • Application example 100a shows an example in which the image processing system 100 is applied to the Internet field.
  • the personal computer 121a, the smart terminal 121b, and the like which are examples of the reception device 110, receive and display the data stream transmitted from the server device 111, which is an example of the transmission device 110.
  • the user of the personal computer 121a or the smart terminal 121b can view the moving image data held by the server device 111 via the Internet.
  • Application example 100b shows an example in which the image processing system 100 is applied to the broadcasting field.
  • the television 122 which is an example of the receiving device 110, receives and displays the data stream transmitted from the broadcast transmitter 112, which is an example of the transmitting device 110. Thereby, for example, the user of the television 122 can view the broadcast content transmitted by the broadcast transmitter 112.
  • Application example 100c shows an example in which the image processing system 100 is applied to the communication field.
  • the video phone 123 which is an example of the reception device 110, receives and displays the data stream transmitted from the video phone 113, which is an example of the transmission device 110. Thereby, the user of the video phone 123 can make a call while looking at the face of the other party.
  • FIG. 2 is a diagram illustrating another application example of the encoder and the decoder.
  • the storage device 200 to which the encoder 110 and the decoder 120 are applied can be formed by integrally configuring the encoder 110 and the decoder 120.
  • the input image data is encoded by the encoder 110, and the generated data stream is stored in a recording medium.
  • the storage device 200 generates and displays image data by the decoder 120 decoding the data stream stored in the recording medium.
  • Forming such a storage device 200 can reduce the capacity for storing image data, and can be applied, for example, to the storage field.
  • the application example 200a shows an example in which the storage device 200 is applied to the storage field.
  • the video recorder 211 which is an example of the storage device 200 stores the data stream generated by the built-in encoder 110 by encoding the image data in the recording medium 212.
  • the built-in decoder 120 decodes the data stream read from the recording medium 212 to generate image data and displays it on the monitor 213. Thereby, the user of the video recorder 211 can accumulate
  • FIG. 3 is a diagram illustrating an example of the hardware configuration of the encoder.
  • the encoder 110 includes a CPU (Central Processing Unit) 301, a ROM (Read Only Memory) 302, and a RAM (Random Access Memory) 303.
  • the CPU 301, the ROM 302, and the RAM 303 form a so-called computer.
  • the encoder 110 includes an auxiliary storage device 304, an input device 305, a display device 306, a connection device 307, and a drive device 308. Note that the hardware of the encoder 110 is connected to each other via a bus 309.
  • the CPU 301 executes various programs (for example, an encoding program) installed in the auxiliary storage device 304.
  • ROM 302 is a non-volatile memory.
  • the ROM 302 functions as a main storage device that stores various programs, data, and the like necessary for the CPU 301 to execute various programs installed in the auxiliary storage device 304.
  • the ROM 302 stores a boot program such as BIOS (Basic Input / Output System) and EFI (Extensible Firmware Interface).
  • BIOS Basic Input / Output System
  • EFI Extensible Firmware Interface
  • the RAM 303 is a volatile memory such as DRAM (Dynamic Random Access Memory) or SRAM (Static Random Access Memory).
  • the RAM 303 functions as a main storage device that provides a work area that is expanded when various programs installed in the auxiliary storage device 304 are executed by the CPU 301.
  • the auxiliary storage device 304 is an auxiliary storage device that stores various installed programs and information used when executing the various programs.
  • the input device 305 is an input device used when inputting various instructions to the encoder 110.
  • the display device 306 is a display device that displays internal information of the encoder 110.
  • the connection device 307 is a communication device for the encoder 110 to receive image data from the outside, or the encoder 110 to connect to the decoder 120 to perform communication.
  • the drive device 308 is a device for setting a computer-readable recording medium 310.
  • the recording medium 310 herein includes a medium for recording information optically, electrically, or magnetically, such as a CD-ROM, a flexible disk, a magneto-optical disk, or the like.
  • the recording medium 310 may include a semiconductor memory that electrically records information, such as a ROM and a flash memory.
  • the various programs installed in the auxiliary storage device 304 are installed by, for example, setting the distributed recording medium 310 in the drive device 308 and reading out the various programs recorded in the recording medium 310 by the drive device 308. May be.
  • various programs installed in the auxiliary storage device 304 may be installed by being downloaded from the network 160 via the connection device 307.
  • FIG. 3 is merely an example, and depending on the application form, it may be understood that a part of the hardware illustrated in FIG. 3 may be excluded or replaced with other hardware. Nor.
  • FIG. 4 is a diagram illustrating an example of a functional configuration of the encoder.
  • the encoder 110 includes a block division unit 401, an orthogonal transform unit 402, a quantization unit 403, and an entropy encoding unit 404.
  • the encoder 110 also includes an inverse quantization unit 405, an inverse orthogonal transform unit 406, a loop filter unit 407, a decoded image storage unit 408, and an intra / inter prediction unit 409.
  • the block dividing unit 401 acquires each screen (referred to as an input screen or an input frame) included in the input image data.
  • the block dividing unit 401 divides an input screen (input frame) into fixed-size blocks by a stream. Further, the block division unit 401 further recursively divides each fixed-size block into blocks of coding units.
  • the block dividing unit in H.265 / HEVC divides the input screen into CTUs (Coding
  • the block dividing unit in H.265 / HEVC divides each CTU block into CU (Coding Unit) that is a block of a coding unit. Further, H.C.
  • the block division unit in H.265 / HEVC divides each CU block into prediction unit (PU (Prediction Unit)) and transform unit (TU (Transform Unit)) blocks.
  • PU Prediction Unit
  • TU Transform Unit
  • the block dividing unit 401 will be described as dividing all CTU blocks into CU blocks.
  • the size of the CTU block is 128 pixels ⁇ 128 pixels at the maximum. Therefore, in the following, the size of the CTU block is 128 pixels ⁇ 128 pixels. Will be described.
  • Each input screen (input frame) of image data divided into CU blocks by the block dividing unit 401 is notified to the intra / inter prediction unit 409 and used for calculation of a prediction residual signal.
  • the orthogonal transform unit 402 performs orthogonal transform processing on the prediction residual signal calculated based on the difference between the input image in each CU block of the input screen and the predicted image in each corresponding CU block. To do.
  • the quantization unit 403 generates a quantized signal by quantizing the prediction residual signal on which the orthogonal transform process has been performed, and outputs the quantized signal to the entropy encoding unit 404 and the inverse quantization unit 405.
  • the entropy encoding unit 404 generates and outputs a data stream by entropy encoding the quantized signal.
  • the inverse quantization unit 405 inversely quantizes the quantized signal and outputs it to the inverse orthogonal transform unit 406.
  • the inverse orthogonal transform unit 406 performs an inverse orthogonal transform process on the inversely quantized quantized signal. For example, a decoded image is generated by adding the prediction image generated by the intra / inter prediction unit 409 to the signal obtained by the inverse orthogonal transform unit 406 and is input to the loop filter unit 407.
  • the loop filter unit 407 performs a filter process for reducing the coding noise of the input decoded image.
  • the decoded image storage unit 408 stores the decoded image filtered by the loop filter unit 407 for each screen (for each frame).
  • the intra / inter prediction unit 409 performs intra prediction (intra-screen prediction) that generates a predicted image of a block of a CU to be processed using a decoded image of a block of each CU in the screen being decoded.
  • the intra / inter prediction unit 409 performs motion compensation between screens using the decoded image of each CU block in the reference screen, and generates a predicted image of the CU block to be processed (screen). Prediction).
  • the intra / inter prediction unit 409 performs intra prediction images that are prediction images of the blocks of each CU generated by intra prediction or inter prediction images that are prediction images of the blocks of each CU generated by motion compensated inter prediction. Either one is output.
  • the prediction image of each CU block output from the intra / inter prediction unit 409 is used for residual calculation with the input image of each CU block in the input screen, and the calculated prediction residual signal is orthogonally transformed. Input to the unit 402. Also, the predicted image output from the intra / inter prediction unit 409 is added to the signal obtained by the inverse orthogonal transform unit 406 and input to the loop filter unit 407 as a decoded image.
  • FIG. 5 is a diagram for explaining a rectangular area and a template area to be decoded in the inter prediction mode under consideration in the next generation codec.
  • a CTU 510 of 128 pixels ⁇ 128 pixels in an input screen (input frame) 500 is divided into CU blocks, and inter prediction processing by template matching is performed on the CU blocks.
  • a CTU block is divided into CUs having various block sizes in inter prediction.
  • the example illustrated in FIG. 5 includes a case where the block is divided into square CU blocks (8 ⁇ 8, 16 ⁇ 16, 32 ⁇ 32, 64 ⁇ 64, all in [pixel]).
  • a rectangular block of CU (4 ⁇ 8, 8 ⁇ 4, 8 ⁇ 16, 16 ⁇ 8, 16 ⁇ 32, 32 ⁇ 16, 32 ⁇ 64, 64 ⁇ 32, 64 ⁇ 128). 128 ⁇ 64.
  • the unit is divided into [pixels]).
  • CU block 520 is an enlarged view of a square block divided into 64 pixels ⁇ 64 pixels.
  • rectangular regions such as subCUs 530, 540, and 550 are generated, and the predicted image and the decoded image are sequentially generated for each subCU with the subCU as a decoding target. Is generated.
  • a part of the decoded image of the subCU 540 and a part of the decoded image of the subCU 550 are set as the template areas 541 and 551. Then, inter prediction processing by template matching is performed using the set decoded images of the template areas 541 and 551.
  • FIG. 6 is a diagram showing an outline of template matching in the inter prediction mode under consideration in the next generation codec.
  • a screen 620 is a screen (frame) being decoded by the intra / inter prediction unit 409.
  • the example of FIG. 6 shows a state where template areas 541 and 551 are set for the subCU 530 to be decoded.
  • a screen 610 is a reference screen (a decoding screen that is temporally different from the screen 620 being decoded) on which matching with the template area set in the screen 620 being decoded is performed.
  • FIG. 6 shows a state in which template areas 615 and 616 (second template areas) are set as areas in the screen 610 corresponding to the set template areas 541 and 551 (first template areas). ing.
  • the template areas 615 and 616 are moved by a predetermined vector (moved by the vector 614) in the screen 610, so that the template areas 612 and 613 (third template area) are set. It shows the state.
  • the vector 614 is converted into the subCU 530 to be decoded.
  • the state determined as the motion vector is shown.
  • a part of the decoded image of the subCU adjacent to the subCU 530 to be decoded is set as the template areas 541 and 551, and matching is performed in the screen 610, thereby determining the motion vector 614 used for motion compensation inter prediction. can do.
  • FIG. 7 is a diagram illustrating an example of a functional configuration for realizing inter prediction processing by template matching in the inter prediction mode under consideration in the next generation codec.
  • the intra / inter prediction unit 409 includes a motion search processing unit 701, a cost determination unit 702, a template region setting unit 703, and a decoding screen acquisition unit. 704.
  • the intra / inter prediction unit 409 includes a reference screen acquisition unit 705, a matching unit 706, a motion vector calculation unit 707, a predicted image generation unit 708, a motion vector storage unit 709, and a template search point setting unit 710.
  • the motion search processing unit 701 is a block of a CU obtained by dividing a predetermined CTU among the CTUs of the input screen (input frame) from the block dividing unit 401, and includes a CU to be processed (a subCU to be decoded).
  • the motion search processing unit 701 acquires a decoded screen read out as a reference screen by the reference screen acquisition unit 705 from the decoded screens stored in the decoded image storage unit 408. Furthermore, the motion search processing unit 701 performs a non-template matching process (a general search process other than the template matching process) on the reference screen for the input image of the CU block to be processed. Accordingly, the motion search processing unit 701 calculates a motion vector in non-template matching at the CU level and a cost in non-template matching, and notifies the cost determination unit 702 of the motion vector.
  • a non-template matching process a general search process other than the template matching process
  • the cost determination unit 702 acquires the motion vector in the non-template matching at the CU level and the cost in the non-template matching notified from the motion search processing unit 701. In addition, the cost determination unit 702 acquires a motion vector in CU level template matching and a cost in template matching, which are notified from a motion vector calculation unit 707 described later.
  • the cost determination unit 702 determines the prediction mode of the CU by comparing the acquired costs, and outputs it as inter prediction result information. In addition, when the cost determination unit 702 determines the prediction mode of the CU to be a mode that uses a non-template matching motion vector, the cost determination unit 702 uses the motion vector as a motion vector at the CU level. Notify In addition, the cost determination unit 702 notifies the predicted image generation unit 708 of the determined prediction mode of the CU.
  • the cost determination unit 702 notifies the prediction image generation unit 708 of the determined prediction mode of the CU.
  • the CU prediction mode is determined to be a mode using a template matching motion vector.
  • the template region setting unit 703 sets a CU level template region for the block of the decoding target CU on the decoding screen acquired by the decoding-in-progress screen acquisition unit 704. .
  • the template area setting unit 703 sets a subCU level template area for the subCU to be decoded on the screen being decoded acquired by the decoding-in-progress screen acquisition unit 704. .
  • the template area setting unit 703 corresponds to the CU level template area set for the block of the CU to be decoded in the reference screen acquired by the reference screen acquisition unit 705 in the CU level motion search. Set the template area.
  • the template region setting unit 703 corresponds to a template region corresponding to the sub CU level template region set for the sub CU to be decoded in the reference screen acquired by the reference screen acquisition unit 705. Set.
  • the decoding screen acquisition unit 704 is an example of an acquisition unit.
  • the in-decoding screen acquisition unit 704 reads the screen being decoded from the decoded image storage unit 408.
  • the in-decoding screen acquisition unit 704 matches the decoded image of the CU level template region set by the template region setting unit 703 with respect to the block of the decoding target CU.
  • the decoding-in-progress screen acquisition unit 704 notifies the matching unit 706 of the decoded image of the subCU level template region set by the template region setting unit 703 for the subCU to be decoded. To do.
  • the reference screen acquisition unit 705 is an example of a second setting unit.
  • the reference screen acquisition unit 705 reads a predetermined decoding screen (decoding screen that is temporally different) among the decoding screens stored in the decoded image storage unit 408 as a reference screen. Also, the reference screen acquisition unit 705 notifies the motion search processing unit 701 of the read reference screen.
  • the reference screen acquisition unit 705 extracts a reference image of the CU level template area set by the template search point setting unit 710 in the read reference screen.
  • the template search point setting unit 710 sets template regions at positions corresponding to a plurality of CU-level motion vector candidates with respect to the CU-level template region in the reference screen set by the template region setting unit 703. Set. Then, the reference screen acquisition unit 705 extracts a reference image of the CU level template region set at a position corresponding to the plurality of motion vector candidates, and notifies the matching unit 706 of the extracted reference image.
  • the template search point setting unit 710 sets a template area at each position corresponding to a CU level template search point motion vector for a CU level 1 motion vector candidate.
  • the CU level template search point motion vector is a motion vector at a peripheral position of one motion vector candidate serving as a CU level base point.
  • the reference screen acquisition unit 705 extracts a reference image of the CU level template region set at a position corresponding to the template search point motion vector, and notifies the matching unit 706 of the extracted reference image.
  • the reference screen acquisition unit 705 also blocks the CU at the position corresponding to the CU level one template search point motion vector (the determined CU level one motion vector) set by the template search point setting unit 710. Is specified in the reference screen.
  • the reference screen acquisition unit 705 extracts the reference image of the subCU level template region set by the template search point setting unit 710 from the CU block in the identified reference screen.
  • the template search point setting unit 710 responds to a plurality of sub CU level motion vector candidates for the sub CU level template region set by the template region setting unit 703 in the identified block of the CU in the reference screen. A template area is set for each position. Then, the reference screen acquisition unit 705 extracts a reference image of the sub CU level template region set at a position corresponding to the plurality of motion vector candidates, and notifies the matching unit 706 of the extracted reference image.
  • the template search point setting unit 710 sets a template area at each position corresponding to a sub CU level template search point motion vector for a sub CU level one motion vector candidate.
  • the sub CU level template search point motion vector is a plurality of motion vectors at the peripheral positions of one motion vector candidate serving as a sub CU level base point.
  • the reference screen acquisition unit 705 extracts a reference image of the sub CU level template region set at a position corresponding to the template search point motion vector, and notifies the matching unit 706 of the extracted reference image.
  • the matching unit 706 receives the decoded image of the template area at the CU level notified from the in-decoding screen acquisition unit 704 and the template at the CU level notified from the reference screen acquisition unit 705. The degree of matching with the reference image of the region is calculated.
  • the reference image of the CU level template area notified from the reference screen acquisition unit 705 includes a reference image extracted based on a plurality of CU level motion vector candidates and a CU level template search point motion vector. And a reference image extracted based on the reference image.
  • the matching unit 706 notifies the calculated degree of matching to the motion vector calculation unit 707.
  • the matching unit 706 calculates the degree of matching between the decoded image of the subCU level template region and the reference image of the subCU level template region.
  • the decoded image of the subCU level template area is notified from the in-decoding screen acquisition unit 704. Also, the reference image acquisition unit 705 notifies the reference image of the template region at the subCU level.
  • the reference image of the subCU level template area notified from the reference screen acquisition unit 705 includes a reference image extracted based on a plurality of subCU level motion vector candidates and a subCU level template search point motion vector. And the extracted reference image.
  • the matching unit 706 notifies the calculated degree of matching to the motion vector calculation unit 707.
  • the motion vector calculation unit 707 has the highest matching degree with the reference image of the template region set at the position corresponding to the plurality of motion vector candidates at the CU level. Specify the degree of matching.
  • the motion vector calculation unit 707 stores the CU level motion vector candidate corresponding to the specified maximum matching degree in the motion vector storage unit 709 as one motion vector candidate serving as a CU level base point.
  • the motion vector calculation unit 707 acquires the CU level matching degree notified from the matching unit 706 in response to storing one motion vector candidate serving as a CU level base point in the motion vector storage unit 709. At this time, the degree of matching acquired by the motion vector calculation unit 707 is set at a position corresponding to a CU level template search point motion vector (a plurality of motion vectors around one motion vector candidate serving as a CU level base point). The degree of matching with the reference image of the template area.
  • the motion vector calculation unit 707 determines a motion vector in CU level template matching based on the acquired matching degree, and stores the determined CU level motion vector in the motion vector storage unit 709.
  • the motion vector calculation unit 707 calculates the cost for template matching using the determined CU level motion vector. Further, the motion vector calculation unit 707 notifies the cost determination unit 702 of the determined CU level motion vector and cost.
  • the motion vector calculation unit 707 acquires the sub CU level matching degree notified from the matching unit 706 in response to storing the determined CU level motion vector in the motion vector storage unit 709. Also, the motion vector calculation unit 707 selects the maximum matching degree from the matching degrees with the reference image of the template region set at the position corresponding to the plurality of motion vector candidates at the subCU level among the acquired matching degrees. Identify.
  • the motion vector calculation unit 707 stores, in the motion vector storage unit 709, one motion vector candidate at the subCU level corresponding to the identified maximum matching degree as one motion vector candidate serving as a base point at the subCU level. .
  • the motion vector calculation unit 707 acquires the subCU level matching degree notified from the matching unit 706 in response to storing one motion vector candidate serving as a base point of the subCU level in the motion vector storage unit 709. At this time, the degree of matching acquired by the motion vector calculation unit 707 is set at a position according to a template search point motion vector at the subCU level (a plurality of motion vectors around one motion vector candidate serving as a base point at the subCU level). The degree of matching with the reference image of the template area. Furthermore, the motion vector calculation unit 707 determines a motion vector in subCU level template matching based on the acquired matching degree, and notifies the prediction image generation unit 708 of the motion vector.
  • the predicted image generation unit 708 is an example of a generation unit.
  • the prediction image generation unit 708 acquires a non-template matching motion vector from the cost determination unit 702 when the cost determination unit 702 notifies the CU prediction mode of a mode using a non-template matching motion vector. .
  • the predicted image generation unit 708 identifies a reference image corresponding to a non-template matching motion vector in the reference screen notified from the reference screen acquisition unit 705.
  • the predicted image generation unit 708 performs motion compensation inter prediction by generating a predicted image using the identified reference image. Further, the predicted image generation unit 708 outputs the predicted image of the generated CU block as an inter predicted image.
  • the cost determining unit 702 is notified of a mode that uses a template matching motion vector as the CU prediction mode
  • the predicted image generating unit 708 is sequentially notified from the motion vector calculating unit 707. A subCU level motion vector is acquired.
  • the predicted image generation unit 708 specifies reference images corresponding to the determined subCU level motion vectors sequentially notified from the motion vector calculation unit 707 in the reference screen notified from the reference screen acquisition unit 705. And sequentially output as predicted images of the subCUs to be decoded. Further, the predicted image generation unit 708 generates a predicted image of the block of the CU using each identified reference image. Further, the predicted image generation unit 708 outputs the predicted image of the generated CU block as an inter predicted image.
  • the motion vector storage unit 709 stores one motion vector candidate serving as a CU level base point.
  • the motion vector storage unit 709 stores the determined CU level motion vector. Also, the motion vector storage unit 709 stores one motion vector candidate serving as a base point of the subCU level.
  • the template search point setting unit 710 sets a template region at each position corresponding to a plurality of motion vector candidates at the CU level with respect to the template region at the CU level in the reference screen set by the template region setting unit 703. .
  • the template search point setting unit 710 determines a CU level template search point motion vector based on one motion vector candidate that is stored in the motion vector storage unit 709 and serves as a CU level base point.
  • the template search point setting unit 710 also sets a template area at each position corresponding to the CU level template search point motion vector in the reference screen.
  • the template search point setting unit 710 responds to a plurality of sub CU level motion vector candidates with respect to the sub CU level template region set by the template region setting unit 703 in the specified block of the CU in the reference screen.
  • a template area is set for each position.
  • the template search point setting unit 710 determines a sub CU level template search point motion vector based on one motion vector candidate that is stored in the motion vector storage unit 709 and serves as a sub CU level base point. Further, the template search point setting unit 710 sets a template area at each position corresponding to the template search point motion vector at the subCU level in the reference screen.
  • FIG. 8 is a flowchart showing the flow of inter prediction processing by template matching in the inter prediction mode under consideration in the next generation codec.
  • step S801 the intra / inter prediction unit 409 executes a CU level motion search process to determine a CU level motion vector.
  • step S802 the intra / inter prediction unit 409 executes a sub CU level motion search process based on the CU level motion vector determined in step S801, and determines a sub CU level motion vector. Details of steps S801 and S802 will be described below.
  • FIG. 9 is a flowchart showing the flow of the motion search process at the CU level, which details step S801.
  • step S901 the template area setting unit 703 sets a CU level template area for the block of the CU to be decoded in the screen being decoded.
  • step S902 the template search point setting unit 710 sets a template area at each position corresponding to a plurality of motion vector candidates at the CU level in the reference screen.
  • the matching unit 706 calculates the degree of matching between the decoded image of the CU level template region set in step S901 and the reference image of the CU level template region set in step S902.
  • the motion vector calculation unit 707 specifies the maximum matching degree among the calculated matching degrees.
  • the motion vector calculation unit 707 determines a CU level motion vector candidate corresponding to the identified maximum matching degree as one motion vector candidate serving as a CU level base point.
  • step S904 the template search point setting unit 710 sets a template region at each position corresponding to the CU level template search point motion vector for one motion vector candidate serving as a CU level base point.
  • step S905 the matching unit 706 matches the decoded image of the CU level template region set in step S901 with the reference image of the template region set in a position corresponding to the CU level template search point motion vector. Calculate the degree.
  • step S906 the motion vector calculation unit 707 determines a motion vector in CU level template matching based on the calculated matching degree.
  • the reference screen acquisition unit 705 identifies the block of the CU at the position corresponding to the determined motion vector of CU level (the block of the CU in the reference screen corresponding to the block of the decoding target CU). be able to.
  • FIG. 10 is a flowchart showing the flow of the subCU level motion search process, which details step S802.
  • step S1001 the template area setting unit 703 sets a subCU level template area for the subCU to be decoded in the screen being decoded.
  • step S1002 the template search point setting unit 710 sets a template region at each position corresponding to a plurality of motion vector candidates at the subCU level in the block of the CU in the reference screen specified by the reference screen acquisition unit 705.
  • the matching unit 706 calculates the degree of matching between the decoded image of the sub CU level template area set in step S1001 and the reference image of the sub CU level template area set in step S1002.
  • the motion vector calculation unit 707 specifies the maximum matching degree among the calculated matching degrees.
  • the motion vector calculation unit 707 determines a sub CU level motion vector candidate corresponding to the identified maximum matching degree as one motion vector candidate serving as a sub CU level base point.
  • step S1004 the template search point setting unit 710 sets a template region for each position corresponding to the sub CU level template search point motion vector for one motion vector candidate serving as a sub CU level base point.
  • step S1005 the matching unit 706 matches the decoded image of the subCU level template region set in step S1001 with the reference image of the template region set at a position corresponding to the subCU level template search point motion vector. Calculate the degree.
  • step S1006 the motion vector calculation unit 707 determines a motion vector in subCU level template matching based on the calculated matching degree.
  • the predicted image generation unit 708 identifies a reference image corresponding to the determined motion vector at the subCU level, and outputs it as a predicted image of the subCU to be decoded. Further, the predicted image generation unit 708 generates a predicted image of the block of the CU using each identified reference image and outputs it as an inter predicted image.
  • the subCU predicted image output from the predicted image generation unit 708 is added to the signal obtained from the inverse orthogonal transform unit 406 and input to the loop filter unit 407 as a subCU decoded image.
  • step S1008 the in-decoding screen acquisition unit 704 determines whether prediction images have been output for all subCUs included in the processing target CU in the screen being decoded. If it is determined in step S1008 that there is a subCU that has not output a predicted image (NO in step S1008), the process returns to step S1001. On the other hand, if it is determined in step S1008 that predicted images have been output for all subCUs included in the processing target CU in the screen being decoded (in the case of YES in step S1008), motion search at the subCU level. End the process.
  • FIG. 11 is a diagram illustrating processing contents and processing timing for each subCU in the inter prediction mode under consideration in the next generation codec.
  • FIG. 11A shows an example of a block of a CU including each subCU to be decoded.
  • the block of the CU including the subCU to be decoded is “CU n ”, and the block of the CU includes four subCUs (“sub0”, “sub1”, “sub2”, "sub3") is included.
  • the example of FIG. 11A indicates that a decoded image is generated for each of the upper CU block and the left CU block adjacent to “CU n ”.
  • the example of FIG. 11A shows that a part of the decoded image of the block of the adjacent CU is set as the template areas 1101 to 1112.
  • FIG. 11B is a diagram illustrating processing timing when the intra / inter prediction unit 409 executes processing for four subCUs included in “CU n ”.
  • the processing executed by the intra / inter prediction unit 409 is as follows. Setting of CU level motion vector candidates and determination of one motion vector candidate as a base point; CU level motion vector determination, Setting of subCU level motion vector candidates and determination of one motion vector candidate as a base point; Determination of subCU level motion vectors, Generation of predicted images at the subCU level, ⁇ Acquisition of subCU level decoded image, These are shown separately.
  • the processing timing “T m ” to “T m + 6 ” is shown due to space limitations.
  • a template region is set at each position corresponding to a CU level motion vector candidate, and a CU level base point and One motion vector candidate is determined.
  • processing timing “T m + 1 ”
  • a CU level motion vector is determined for “CU n ”.
  • processing timing “T m + 4 ”
  • a predicted image is generated for “subCU0”
  • the predicted image is output.
  • a template region is set for each position corresponding to a sub CU level motion vector candidate for “sub CU 1” with respect to a sub CU level motion vector determined for “sub CU 0”.
  • One motion vector candidate as a base point of the subCU level is determined.
  • a motion vector at the subCU level is determined for “subCU1”. Note that when determining the motion vector of “subCU1”, the decoded images of the template areas 1102 and 1131 are used.
  • the inter prediction mode under consideration in the next-generation codec the fact that the decoded images of the upper and left subCUs adjacent to the subCU to be decoded are generated is that when determining the motion vector at the subCU level. This is a precondition (see the dotted arrow in FIG. 11B). For this reason, the inter prediction mode under consideration in the encoder of the next-generation codec cannot be said to have high processing efficiency.
  • FIG. 12 is a diagram for explaining a rectangular region and a template region to be decoded in the inter prediction mode of the encoder according to the first embodiment.
  • the CTU 510 of 128 pixels ⁇ 128 pixels in the input screen (input frame) 500 is divided into CU blocks. Further, inter prediction by template matching is performed for the block of the CU (see FIG. 12).
  • CU block 520 is an enlarged view of a square block divided into 64 pixels ⁇ 64 pixels.
  • rectangular regions such as subCUs 530, 540, and 550 are generated, and a predicted image and a decoded image are generated for each subCU with subCU as a decoding target. Is done.
  • the prediction images and decoded images of a plurality of subCUs are generated in parallel.
  • a part of a block adjacent to a predetermined block is set as a template region.
  • the predetermined block is a block of a decoding unit including a plurality of subCUs to be decoded, and in the example of FIG. 12, indicates a block 520 of the CU.
  • the subCU to be decrypted is subCU530
  • template matching A block of the CU adjacent to the upper side of the block 520 of the CU including the subCU 530 to be decoded, and The generation of the prediction image and the decoded image is completed for all the blocks of the CU adjacent to the left side of the block 520 of the CU including the subCU 530 to be decoded. Therefore, in the encoder according to the first embodiment, a part of CU blocks adjacent to the upper side and the left side are set as template regions 1202 and 1213, and template matching is performed on the subCU 530 to be decoded.
  • the subCU to be decoded is subCU540
  • a block of the CU adjacent to the upper side of the block 520 of the CU including the subCU 540 to be decoded and The generation of the prediction image and the decoded image is completed for all the CU blocks adjacent to the left side of the block 520 of the CU including the subCU 540 to be decoded. Therefore, in the encoder according to the first embodiment, a part of CU blocks adjacent to the upper side and the left side are set as template regions 1202 and 1212, and template matching is performed on the subCU 540 to be decoded. That is, the subCU 530 and the subCU 540 can perform template matching in parallel (the same applies to the subCU 550 and the like).
  • template matching is performed in parallel for a plurality of subCUs by setting a part of the upper and left CU blocks of the decoding unit (CU) block including the subCUs to be decoded as template regions. It becomes possible to do.
  • CU decoding unit
  • FIG. 13 is a diagram illustrating an outline of template matching in the inter prediction mode of the encoder according to the first embodiment.
  • a screen 620 is a screen (frame) being decoded by the intra / inter prediction unit 409.
  • the example of FIG. 13 shows a state where the template areas 1202 and 1213 are set for the subCU 530 to be decoded.
  • a screen 610 is a reference screen (a decoding screen that is temporally different from the screen 620 being decoded) on which matching with the template area set in the screen 620 being decoded is performed.
  • FIG. 13 shows a state in which template areas 1321 and 1322 (second template area) are set as areas in the screen 610 corresponding to the set template areas 1202 and 1213 (first template area). ing.
  • the template regions 1311 and 1312 are set by moving the template regions 1321 and 1322 by a predetermined vector (moving by the vector 614) in the screen 610. It shows the state.
  • the vector 614 becomes the motion vector of the subCU 530 to be decoded. It shows how it was decided.
  • a part of the decoded image of the block of the CU adjacent to the block of the CU including the subCU 530 to be decoded is set as the template regions 1202 and 1213, and matching is performed in the screen 610, thereby performing motion compensation inter prediction. Can be determined.
  • FIG. 14 is a diagram illustrating an example of a functional configuration for realizing inter prediction processing by template matching in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 7 is different from FIG. 7 in that a template area determination unit 1401 and a template area selection unit 1402 are provided in the case of FIG. Hereinafter, the difference from FIG. 7 will be mainly described.
  • the template area determination unit 1401 determines whether or not the decoding target subCU satisfies a predetermined execution condition. Further, the template area determination unit 1401 notifies the template area setting unit 703 of the determination result as to whether or not a predetermined execution condition is satisfied.
  • the decoding screen acquisition unit 704 has been described with reference to FIG. Set the template area. Specifically, a part of the decoded image of the upper subCU adjacent to the subCU to be decoded and a part of the decoded image of the left subCU are set as template regions. In this case, the decoding-in-progress screen acquisition unit 704 uses the decoded image of the template region set by the template region setting unit 703 (part of the decoded image of the adjacent subCU) as a template among the decoded images included in the screen being decoded. The area selection unit 1402 is notified.
  • the template region setting unit 703 explains to the in-decoding screen acquisition unit 704 using FIG. Set the template area.
  • the template area setting unit 703 identifies a block of a CU that includes a subCU to be decoded, and a part of a decoded image of a block of a CU adjacent to the upper side and the left side of the identified CU block is used as a template. Set as area.
  • the decoding-in-progress screen acquisition unit 704 decodes the decoded image of the template region set by the template region setting unit 703 (part of the decoded image of the block of the adjacent CU) among the decoded images included in the screen being decoded. Is sent to the template area selection unit 1402.
  • the template area selection unit 1402 receives the decoded image of the template area notified from the in-decoding screen acquisition unit 704 (part of the decoded image of the adjacent subCU). Select. Further, the template area selection unit 1402 notifies the matching unit 706 of the decoded image of the selected template area. As a result, the matching unit 706 can perform template matching in the reference screen using the decoded image of the template region corresponding to the determination result notified from the template region determination unit 1401 for the subCU to be decoded.
  • the template region selection unit 1402 receives the decoded image of the template region notified from the decoding in progress screen acquisition unit 704 (the decoded image of the block of the adjacent CU block). Select (some). Further, the template area selection unit 1402 notifies the matching unit 706 of the decoded image of the selected template area. As a result, the matching unit 706 can perform template matching in the reference screen using the decoded image of the template region corresponding to the determination result notified from the template region determination unit 1401 for the subCU to be decoded.
  • FIG. 15 is a diagram illustrating template matching execution conditions in the inter prediction mode of the encoder according to the first embodiment.
  • the execution condition information 1500 includes “execution condition determination item”, “determination item threshold”, and “determination reason” as information items.
  • Example 1 a determination item for determining whether or not the execution target condition is satisfied for the subCU to be decrypted is stored.
  • “Threshold value of determination item” stores a threshold value for determining that an execution condition is satisfied for each determination item stored in “determination item of execution condition”. The reason for determining that the execution condition is satisfied is stored in the “determination reason”.
  • “subCU size” is included as the “execution condition determination item”, and the size of the subCU to be decoded is equal to or smaller than a predetermined threshold (“8 pixels ⁇ 8 pixels or less”). Indicates that the execution condition is satisfied. This is because if the size of the subCU is small, the processing efficiency of the encoder is reduced unless the process of the next subCU is advanced unless the generation of the prediction image and the decoded image is completed for the adjacent subCU.
  • a part of a decoded image of a CU block adjacent to the CU block including the subCU is used as a template.
  • Set as area.
  • the execution condition is changed. It indicates that it is determined that the condition is satisfied.
  • the picture type is a non-reference screen
  • the template matching does not correspond to a screen referred to by another screen being decoded. This is based on the fact that the coding error itself is not accumulated because the decoding screen is not referenced even if the coding error increases by making the region away from the subCU to be decoded a template region. It is.
  • the encoder according to the first embodiment when the subCU of the non-reference screen is a decoding target, a part of the decoded image of the block of the CU adjacent to the block of the CU including the subCU is used as the template region. Set as. Thereby, in the encoder according to the first embodiment, parallel processing in which template matching is performed in parallel for a plurality of subCUs can be realized.
  • step S801 CU-level motion search processing
  • step S802 subCU level motion search process
  • FIG. 16 is a flowchart showing the flow of a subCU level motion search process in the inter prediction mode of the encoder according to the first embodiment. Differences from FIG. 10 are steps S1601 to S1603.
  • step S1601 the template region determination unit 1401 determines whether or not the decoding target subCU satisfies the execution condition indicated in the execution condition information 1500. If it is determined in step S1601 that the execution condition is satisfied (YES in step S1601), the process proceeds to step S1602.
  • step S1602 the template area setting unit 703 sets a part of the decoded image of the block of the CU adjacent to the block of the CU including the subCU to be decoded as a template area.
  • step S1601 determines whether the execution condition is not satisfied (NO in step S1601). If it is determined in step S1601 that the execution condition is not satisfied (NO in step S1601), the process proceeds to step S1603.
  • step S1603 the template area setting unit 703 sets a part of the decoded image of the subCU adjacent to the decoding target subCU as a template area.
  • FIG. 17 is a diagram illustrating processing contents and processing timing for each subCU in the inter prediction mode of the encoder according to the first embodiment.
  • FIG. 17A shows an example of a block of a CU including each subCU to be decoded.
  • the block of the CU including the subCU to be decoded is “CU n ”, and the block of the CU includes four subCUs (“sub0”, “sub1”, “sub2”, This indicates that the area of “sub3”) is included.
  • the example of FIG. 17A indicates that a decoded image is generated for both the upper CU block and the left CU block adjacent to “CU n ”.
  • the example of FIG. 17A shows that a part of the decoded image of the block of the adjacent CU is set as the template areas 1101 to 1112.
  • FIG. 17B is a diagram illustrating processing timing when the intra / inter prediction unit 409 executes processing for four subCUs included in “CU n ”.
  • the processing executed by the intra / inter prediction unit 409 is as follows. Setting of CU level motion vector candidates and determination of one motion vector candidate as a base point; CU level motion vector determination, Setting of subCU level motion vector candidates and determination of one motion vector candidate as a base point; Determination of subCU level motion vectors, Generation of predicted images at the subCU level, ⁇ Acquisition of subCU level decoded image, These are shown separately.
  • the processing timing “T m ” to “T m + 7 ” is shown due to space limitations.
  • processing timing “T m + 2 ”, for “subCU0” to “subCU3”, template regions are set at positions corresponding to motion vector candidates at the subCU level, and one motion vector candidate serving as a base point at the subCU level is set. Decisions are performed in parallel. Subsequently, at the processing timing “T m + 3 ”, the sub CU level motion vectors are determined in parallel for “sub CU0” to “sub CU 3 ”.
  • the motion vector at the subCU level for “subCU0” is determined by template matching using the decoded images of the template areas 1101 and 1111.
  • the subCU level motion vector for “subCU1” is determined by template matching using the decoded images of the template areas 1102 and 1111.
  • the subCU level motion vector for “subCU2” is determined by template matching using the decoded images of the template areas 1101 and 1112.
  • the subCU level motion vector for “subCU3” is determined by template matching using the decoded images of the template regions 1102 and 1112.
  • a template region is set at each position corresponding to a motion vector candidate at the CU level, and one motion vector serving as a CU level base point Candidates are determined.
  • processing timing “T m + 5 ”
  • a CU level motion vector is determined for “CU n + 1 ”.
  • prediction images of “subCU0” to “subCU3” are generated and output in parallel.
  • the motion vector at the subCU level has already been determined, and therefore, generation of a predicted image can be executed in parallel.
  • the motion vector can be determined for the subCU included in “CU n + 1 ”, which is the block of the CU next to “CU n ”.
  • FIG. 18 is a first diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the first embodiment.
  • the example of FIG. 18 illustrates the parallel processing performed on the subCU included in the block 1800 of the 8 pixel ⁇ 8 pixel CU generated by dividing the CTU 510 of 128 pixels ⁇ 128 pixels (subCU size). Since 4 pixels ⁇ 4 pixels, parallel processing is executed).
  • the block 1800 of the CU is divided into four subCUs.
  • a part of the decoded image of the CU block adjacent to the upper side and the left side of the CU block 1800 is set as template regions 1801, 1802, 1811, and 1812. .
  • FIG. 19 is a second diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the first embodiment.
  • the example of FIG. 19 shows parallel processing executed on a subCU included in a block 1900 of a CU of 64 pixels ⁇ 64 pixels generated by dividing a CTU 510 of 128 pixels ⁇ 128 pixels (picture type is It is assumed that parallel processing is executed by being a non-reference image).
  • the CU block 1900 is divided into 16 subCUs.
  • a part of the decoded image of the block of the CU adjacent to the upper side and the left side of the CU block 1900 is set as template regions 1901 to 1904 and 1911 to 1914. Yes.
  • FIG. 20 is a third diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the first embodiment.
  • the example of FIG. 20 illustrates a case where the blocks 2001 to 2004 of CUs of 8 pixels ⁇ 4 pixels generated by dividing the CTU 510 of 128 pixels ⁇ 128 pixels are processed.
  • each of the CU blocks 2001 to 2004 is divided into two subCUs.
  • the size of the subCU is 4 pixels ⁇ 4 pixels, and parallel processing is executed for two subCUs.
  • Reference numeral 2010 indicates a time series in which a template area is set for each subCU included in the CU blocks 2001 to 2004, and indicates that the time axis advances from the bottom to the top. .
  • a part of the decoded image of the CU adjacent to the upper side and the left side of the CU block 2001 is set as the template areas 2011, 2012, and 2021. The As a result, it is possible to execute parallel processing for two subCUs included in the block 2001 of the CU.
  • the process proceeds to the CU block 2002.
  • a part of the decoded image of the CU block (CU block 2001) adjacent to the upper side and the left side of the CU block 2002 is a template region 2013, 2014. , 2022 is set.
  • a part of the decoded image of the CU block (CU block 2002) adjacent to the upper side and the left side of the CU block 2003 is a template region 2015, 2016. , 2023. This makes it possible to execute parallel processing on two subCUs included in the block 2003 of the CU.
  • a decoded image is generated for the subCU
  • the process proceeds to the processing of the CU block 2004.
  • a part of the decoded image of the CU block (CU block 2003) adjacent to the upper side and the left side of the CU block 2004 is a template region 2017, 2018. , 2024. This makes it possible to execute parallel processing on two subCUs included in the block 2004 of the CU.
  • FIG. 21 is a diagram illustrating an example of a functional configuration of the decoder.
  • the decoder 120 includes an entropy decoding unit 2101, an inverse quantization unit 2102, an inverse orthogonal transform unit 2103, a loop filter unit 2104, a decoded image storage unit 2105, and an intra / inter prediction unit 2106.
  • the entropy decoding unit 2101 decodes the received data stream and outputs a quantized signal. Also, the entropy decoding unit 2101 extracts incidental information from the data stream and notifies the intra / inter prediction unit 2106 of the information.
  • the inverse quantization unit 2102 inversely quantizes the quantized signal and outputs it to the inverse orthogonal transform unit 2103.
  • the inverse orthogonal transform unit 2103 obtains a prediction residual signal by performing an inverse orthogonal transform process on the inversely quantized quantized signal.
  • the prediction image generated by the intra / inter prediction unit 2106 for each CU block is added to the prediction residual signal obtained by the inverse orthogonal transform unit 2103, for example. As a result, a decoded image of each CU block is generated and input to the loop filter unit 2104.
  • the loop filter unit 2104 performs a filter process for reducing the coding noise of the input decoded image.
  • the loop filter unit 2104 outputs the decoded decoded image as a decoding result and stores it in the decoded image storage unit 2105.
  • the intra / inter prediction unit 2106 performs intra prediction (intra-screen prediction) for generating a predicted image using the decoded image in the screen being decoded.
  • the intra / inter prediction unit 2106 performs motion compensation between screens using the decoded image in the reference screen, and performs motion compensation inter prediction (inter-screen prediction) for generating a predicted image.
  • the intra / inter prediction unit 2106 outputs either a predicted image generated by intra prediction or a predicted image generated by motion compensation inter prediction.
  • the output prediction image is added to the prediction residual signal obtained by the inverse orthogonal transform unit 2103 to generate a decoded image, which is input to the loop filter unit 2104.
  • FIG. 22 is a diagram illustrating an example of a functional configuration (decoder) for realizing inter prediction processing by template matching in the inter prediction mode under consideration in the next generation codec.
  • the intra / inter prediction unit 2106 includes a template region setting unit 2201, a decoding screen acquisition unit 2202, and a reference screen acquisition unit 2203. .
  • the intra / inter prediction unit 2106 includes a matching unit 2204, a motion vector calculation unit 2205, a predicted image generation unit 2207, a motion vector storage unit 2208, and a template search point setting unit 2209.
  • the template area setting unit 2201 is an example of a first setting unit.
  • the template area setting unit 2201 sets a CU level template area for the block of the decoding target CU on the decoding screen acquired by the decoding screen acquisition unit 2202. .
  • the template area setting unit 2201 sets a subCU level template area for the subCU to be decoded on the screen being decoded acquired by the decoding-in-progress screen acquisition unit 2202. .
  • the template area setting unit 2201 corresponds to the CU level template area set for the block of the decoding target CU in the reference screen acquired by the reference screen acquisition unit 2203. Set the template area.
  • the template area setting unit 2201 corresponds to the template area corresponding to the subCU level template area set for the decoding target subCU in the reference screen acquired by the reference screen acquisition unit 2203. Set.
  • the decoding screen acquisition unit 2202 is an example of an acquisition unit.
  • the in-decoding screen acquisition unit 2202 reads out the screen being decoded from the decoded image storage unit 2105.
  • the in-decoding screen acquisition unit 2202 matches the decoded image of the CU level template area set by the template area setting unit 2201 with respect to the block of the decoding target CU.
  • the decoding-in-progress screen acquisition unit 2202 notifies the matching unit 2204 of the decoded image of the subCU level template area set by the template area setting unit 2201 for the subCU to be decoded. To do.
  • the reference screen acquisition unit 2203 is an example of a second setting unit.
  • the reference screen acquisition unit 2203 reads a predetermined decoding screen (decoding screen that is temporally different) from among the decoding screens stored in the decoded image storage unit 2105 as a reference screen.
  • the reference screen acquisition unit 2203 extracts the reference image of the CU level template area set by the template search point setting unit 2209 in the read reference screen.
  • the template search point setting unit 2209 sets template regions at positions corresponding to a plurality of motion vector candidates at the CU level with respect to the template region at the CU level in the reference screen set by the template region setting unit 2201. Set. Then, the reference screen acquisition unit 2203 extracts a reference image of the CU level template region set at a position corresponding to the plurality of motion vector candidates, and notifies the matching unit 2204 of the extracted reference image.
  • the template search point setting unit 2209 sets a template area at each position corresponding to the CU level template search point motion vector for a CU level 1 motion vector candidate.
  • the CU level template search point motion vector is a motion vector at a peripheral position of one motion vector candidate serving as a CU level base point.
  • the reference screen acquisition unit 2203 extracts the reference image of the CU-level template region set at the position corresponding to the template search point motion vector, and notifies the matching unit 2204 of it.
  • the reference screen acquisition unit 2203 also blocks the CU at the position corresponding to the CU level one template search point motion vector (determined CU level one motion vector) set by the template search point setting unit 2209. Is specified in the reference screen.
  • the reference screen acquisition unit 2203 extracts the reference image of the template region at the subCU level set by the template search point setting unit 2209 from the CU block in the identified reference screen.
  • the template search point setting unit 2209 responds to a plurality of sub CU level motion vector candidates for the sub CU level template region set by the template region setting unit 2201 in the specified CU block in the reference screen. A template area is set for each position. Then, the reference screen acquisition unit 2203 extracts a reference image of the template region at the subCU level set at a position corresponding to the plurality of motion vector candidates, and notifies the matching unit 2204 of the extracted reference image.
  • the template search point setting unit 2209 sets a template area at each position corresponding to a sub CU level template search point motion vector for a sub CU level one motion vector candidate.
  • the sub CU level template search point motion vector is a plurality of motion vectors at the peripheral positions of one motion vector candidate serving as a sub CU level base point.
  • the reference screen acquisition unit 2203 extracts the reference image of the subCU level template region set at the position corresponding to the template search point motion vector, and notifies the matching unit 2204 of the extracted reference image.
  • the matching unit 2204 is an example of a calculation unit. In the motion search at the CU level, the matching unit 2204 receives the decoded image of the CU level template area notified from the decoding-in-progress screen acquisition unit 2202 and the CU level template notified from the reference screen acquisition unit 2203. The degree of matching with the reference image of the region is calculated.
  • the reference image of the CU level template area notified from the reference screen acquisition unit 2203 includes a reference image extracted based on a plurality of CU level motion vector candidates and a CU level template search point motion vector. And a reference image extracted based on the reference image.
  • the matching unit 2204 notifies the motion vector calculation unit 2205 of the calculated matching degrees.
  • the matching unit 2204 calculates the degree of matching between the decoded image of the subCU level template area and the reference image of the subCU level template area.
  • the decoded image of the template region at the subCU level is notified from the in-decoding screen acquisition unit 2202.
  • the reference image of the sub-CU level template area is notified from the reference screen acquisition unit 2203.
  • the reference image of the sub CU level template area notified from the reference screen acquisition unit 2203 includes a reference image extracted based on a plurality of sub CU level motion vector candidates and a sub CU level template search point motion vector. And the extracted reference image.
  • the matching unit 2204 notifies the motion vector calculation unit 2205 of the calculated matching degrees.
  • the motion vector calculation unit 2205 is an example of a determination unit. Of the matching degrees notified from the matching unit 2204, the motion vector calculation unit 2205 has the highest matching degree with the reference image of the template region set at the position corresponding to the plurality of motion vector candidates at the CU level. Specify the degree of matching.
  • the motion vector calculation unit 2205 stores the CU level motion vector candidate corresponding to the specified maximum matching degree in the motion vector storage unit 2208 as one motion vector candidate serving as a CU level base point.
  • the motion vector calculation unit 2205 acquires the CU level matching degree notified from the matching unit 2204 in response to storing one motion vector candidate serving as a CU level base point in the motion vector storage unit 2208. At this time, the degree of matching acquired by the motion vector calculation unit 2205 is set at a position corresponding to a CU level template search point motion vector (a plurality of motion vectors around one motion vector candidate serving as a CU level base point). The degree of matching with the reference image of the template area.
  • the motion vector calculation unit 2205 determines a motion vector in CU level template matching based on the acquired matching degree, and stores the determined CU level motion vector in the motion vector storage unit 2208.
  • the motion vector calculation unit 2205 acquires the sub CU level matching degree notified from the matching unit 2204 in response to storing the determined CU level motion vector in the motion vector storage unit 2208. Also, the motion vector calculation unit 2205 selects the maximum matching degree from the matching degrees with the reference image of the template region set at the position corresponding to the plurality of motion vector candidates at the subCU level among the acquired matching degrees. Identify.
  • the motion vector calculation unit 2205 stores, in the motion vector storage unit 2208, one motion vector candidate at the subCU level corresponding to the specified maximum matching degree as one motion vector candidate serving as a base point at the subCU level. .
  • the motion vector calculation unit 2205 acquires the subCU level matching degree notified from the matching unit 2204 in response to storing one motion vector candidate serving as a base point of the subCU level in the motion vector storage unit 2208. At this time, the degree of matching acquired by the motion vector calculation unit 2205 is set at a position according to the template vector for the search point for the subCU level (a plurality of motion vectors around one motion vector candidate serving as the base point for the subCU level). The degree of matching with the reference image of the template area. Furthermore, the motion vector calculation unit 2205 determines a motion vector in subCU level template matching based on the acquired matching degree, and notifies the prediction image generation unit 2207 of the motion vector.
  • the predicted image generation unit 2207 is an example of a generation unit.
  • the predicted image generation unit 2207 identifies reference images corresponding to the determined subCU level motion vectors sequentially notified from the motion vector calculation unit 2205 in the reference screen notified from the reference screen acquisition unit 2203. Further, the predicted image generation unit 2207 generates and outputs a predicted image of the subCU using each identified reference image.
  • the motion vector storage unit 2208 stores one motion vector candidate serving as a CU level base point.
  • the motion vector storage unit 2208 stores the determined CU level motion vector.
  • the motion vector storage unit 2208 stores one motion vector candidate serving as a base point of the subCU level.
  • the template search point setting unit 2209 sets a template region at each position corresponding to a plurality of motion vector candidates at the CU level with respect to the template region at the CU level in the reference screen set by the template region setting unit 2201. .
  • the template search point setting unit 2209 determines a CU level template search point motion vector based on one motion vector candidate that is stored in the motion vector storage unit 2208 and serves as a CU level base point.
  • the template search point setting unit 2209 sets a template area at each position corresponding to the CU level template search point motion vector in the reference screen.
  • the template search point setting unit 2209 responds to a plurality of sub CU level motion vector candidates with respect to the sub CU level template region set by the template region setting unit 2201 in the specified CU block in the reference screen.
  • a template area is set for each position.
  • the template search point setting unit 2209 determines a sub CU level template search point motion vector based on one motion vector candidate that is stored in the motion vector storage unit 2208 and serves as a sub CU level base point. Further, the template search point setting unit 2209 sets a template area at each position according to the template search point motion vector at the subCU level in the reference screen.
  • FIG. 23 is a diagram illustrating an example of a functional configuration for realizing inter prediction processing by template matching in the inter prediction mode of the decoder according to the first embodiment.
  • FIG. 22 is different from FIG. 22 in that a template region determination unit 2301 and a template region selection unit 2302 are included in the case of FIG. Hereinafter, the difference from FIG. 22 will be mainly described.
  • the template area determination unit 2301 determines whether or not the decoding target subCU satisfies a predetermined execution condition. Further, the template area determination unit 2301 notifies the template area setting unit 2201 of the determination result as to whether or not a predetermined execution condition is satisfied.
  • the decoding screen acquisition unit 2202 when the determination result indicating that the predetermined execution condition is not satisfied is notified from the template area determination unit 2301, the decoding screen acquisition unit 2202 has been described with reference to FIG. Set the template area. Specifically, a part of the decoded image of the upper subCU adjacent to the subCU to be decoded and a part of the decoded image of the left subCU are set as template regions. In this case, the decoding-in-progress screen acquisition unit 2202 uses the decoded image of the template region set by the template region setting unit 2201 (part of the decoded image of the adjacent subCU) as a template among the decoded images included in the screen being decoded. The area selection unit 2302 is notified.
  • the template region setting unit 2201 explains to the in-decoding screen acquisition unit 2202 with reference to FIG. Set the template area.
  • the template area setting unit 2201 specifies a block of a CU that includes a subCU to be decoded, and a part of a decoded image of a block of a CU adjacent to the upper side and the left side of the specified CU block is used as a template. Set as area.
  • the decoding-in-progress screen acquisition unit 2202 out of the decoded images included in the decoding-in-progress screen, the decoded image of the template area set by the template area setting unit 2201 (part of the decoded image of the adjacent CU block) Is sent to the template area selection unit 2302.
  • the template region selection unit 2302 receives the decoded image of the template region notified from the decoding-in-progress screen acquisition unit 2202 (part of the decoded image of the adjacent subCU). Select. Further, the template area selection unit 2302 notifies the matching unit 2204 of the decoded image of the selected template area. As a result, the matching unit 2204 can perform template matching on the decoding target subCU in the reference screen using the decoded image of the template region corresponding to the determination result notified from the template region determining unit 2301.
  • the template region selection unit 2302 receives the decoded image of the template region notified by the in-decoding screen acquisition unit 2202 (the decoded image of the block of the adjacent CU block). Select (some). Further, the template area selection unit 2302 notifies the matching unit 2204 of the decoded image of the selected template area. As a result, the matching unit 2204 can perform template matching on the decoding target subCU in the reference screen using the decoded image of the template region corresponding to the determination result notified from the template region determining unit 2301.
  • a block of a decoding unit (CU) is divided into a plurality of rectangular areas (subCU).
  • subCU rectangular areas
  • -It is determined whether or not a rectangular area to be decoded satisfies a predetermined execution condition, and if it is determined that the predetermined execution condition is satisfied, a decoded image of a block adjacent to a block of a decoding unit including the rectangular area Is set as a template area.
  • template matching is performed by parallel processing for all rectangular areas included in the block of the decoding unit, and a predicted image of each rectangular area is output.
  • a block of a decoding unit (CU) is divided into a plurality of rectangular areas (subCU).
  • subCU rectangular areas
  • -It is determined whether or not a rectangular area to be decoded satisfies a predetermined execution condition, and if it is determined that the predetermined execution condition is satisfied, a decoded image of a block adjacent to a block of a decoding unit including the rectangular area Is set as a template area.
  • template matching is performed by parallel processing for all rectangular areas included in the block of the decoding unit, and a predicted image of each rectangular area is output.
  • the processing efficiency is improved by setting a part of the decoded image of the block adjacent to the block of the decoding unit including the decoding target subCU as the template region.
  • the processing efficiency is improved by setting a part of the predicted image of the subCU adjacent to the decoding target subCU as a template region.
  • FIG. 24 is a diagram for explaining a decoding target rectangular region and a template region in the inter prediction mode of the encoder according to the second embodiment.
  • the CTU 510 of 128 pixels ⁇ 128 pixels in the input screen (input frame) 500 is divided into CU blocks.
  • inter prediction processing is performed on the block of the CU (see FIG. 24).
  • the CU block 520 is an enlarged view of a square block divided into 64 pixels ⁇ 64 pixels.
  • rectangular regions such as subCUs 530, 540, and 550 are generated, and prediction images and decoded images are generated for each subCU with the subCU as a decoding target. Is done.
  • the encoder according to the second embodiment also generates a plurality of subCU predicted images and decoded images in parallel. For this reason, in the encoder according to the second embodiment, a part of the predicted image of the subCU adjacent to the subCU to be decoded is set as a template region.
  • the template matching is A part of the predicted image of the upper subCU 540 adjacent to the subCU 530 to be decoded; A part of the prediction image of the left subCU 550 adjacent to the subCU 530 to be decoded; Is used as a template region.
  • template matching is performed for the subCU 530 to be decoded using the predicted images of the template areas 2401 and 2402.
  • FIG. 25 is a diagram illustrating an example of a functional configuration for realizing inter prediction processing by template matching in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 14 is different from FIG. 14 in that a prediction image acquisition unit 2501 is included in the case of FIG.
  • the difference from FIG. 14 will be mainly described.
  • the predicted image acquisition unit 2501 acquires the predicted image of the subCU adjacent to the decoding target subCU generated by the predicted image generation unit 708. Specifically, the predicted image acquisition unit 2501 acquires the predicted image of the template region set by the template region setting unit 703 (the template region set at the position of the subCU adjacent to the decoding target subCU). In addition, the predicted image acquisition unit 2501 notifies the template region selection unit 1402 of the acquired predicted image of the template region.
  • the template region setting unit 703 has described the prediction image acquisition unit 2501 with reference to FIG. 24 when the template region determination unit 1401 is notified of a determination result that satisfies a predetermined execution condition. Set the template area.
  • the template area setting unit 703 sets a part of the predicted image of the subCU adjacent to the upper side of the subCU to be decoded and a part of the predicted image of the subCU adjacent to the left side as the template area.
  • the predicted image acquisition unit 2501 selects the predicted image of the template region set by the template region setting unit 703 (part of the predicted image of the adjacent subCU) among the predicted images generated by the predicted image generation unit 708. Notify the template area selection unit 1402.
  • the template area selection unit 1402 receives the decoded image of the template area notified from the in-decoding screen acquisition unit 704 (part of the decoded image of the adjacent subCU). Select. Further, the template area selection unit 1402 notifies the matching unit 706 of the decoded image of the selected template area. As a result, the matching unit 706 can perform template matching in the reference screen using the decoded image of the template region corresponding to the determination result notified from the template region determination unit 1401 for the subCU to be decoded.
  • the template region selection unit 1402 predicts the predicted image of the template region notified from the predicted image acquisition unit 1403 (part of the predicted image of the adjacent subCU). Select. Further, the template area selection unit 1402 notifies the matching unit 706 of the predicted image of the selected template area. As a result, the matching unit 706 can perform template matching on the decoding target subCU using the predicted image of the template region corresponding to the determination result notified from the template region determining unit 1401 in the reference screen.
  • FIG. 26 is a diagram illustrating template matching execution conditions in the inter prediction mode of the encoder according to the second embodiment.
  • the execution condition information 2600 includes “execution condition determination item”, “determination item threshold”, and “determination reason” as information items.
  • Example 1 a determination item for determining whether or not the execution target condition is satisfied for the subCU to be decrypted is stored.
  • “Threshold value of determination item” stores a threshold value for determining that an execution condition is satisfied for each determination item stored in “determination item of execution condition”. The reason for determining that the execution condition is satisfied is stored in the “determination reason”.
  • subCU size and “picture type” are stored as “execution condition determination items”. Note that “subCU size” and “picture type” have already been described with reference to FIG. 15 in the first embodiment, and thus description thereof is omitted here.
  • the example of FIG. 26 indicates that “quantization parameter of CU” is included as “determination item of execution condition”.
  • the determination item is determined to satisfy the execution condition when the quantization parameter of the block of the CU including the subCU to be decoded is equal to or less than a predetermined threshold (30 or less). This is because when the quantization parameter of the block of the CU is “30 or less”, the difference between the decoded image and the predicted image is small, so that the influence of setting the template region using the predicted image can be suppressed.
  • the example of FIG. 26 indicates that “CU-level motion vector” is included as the “execution condition determination item”.
  • the determination item is determined to satisfy the execution condition when the absolute value of the CU-level motion vector for the block of the CU including the subCU to be decoded is equal to or less than a predetermined number of pixels (“1 pixel or less”).
  • a predetermined number of pixels (“1 pixel or less”).
  • the encoder according to the second embodiment when the CU level motion vector for a block of a CU including a subCU to be decoded is “1 pixel or less”, a predicted image of a subCU adjacent to the subCU. Is set as a template area. Thereby, in the encoder according to the second embodiment, parallel processing for executing template matching of a plurality of subCUs in parallel can be realized.
  • step S801 CU level motion search processing
  • step S802 subCU level motion search process
  • FIG. 27 is a flowchart showing the flow of a subCU level motion search process in the inter prediction mode of the encoder according to the second embodiment. Differences from FIG. 10 are steps S2701 to S2702.
  • step S2701 the template region determination unit 1401 determines whether or not the decoding target subCU satisfies the execution condition indicated in the execution condition information 2600. If it is determined in step S2701 that the execution condition is satisfied (YES in step S2701), the process proceeds to step S2702.
  • step S2702 the predicted image acquisition unit 2501 acquires a predicted image of the upper subCU and the left subCU adjacent to the decoding target subCU from the predicted image generation unit 708.
  • the decoding-in-progress screen acquisition unit 704 displays the upper subCU adjacent to the decoding target subCU or the left subCU. You may acquire the decoding image of subCU.
  • the template area selection unit 1402 selects a predicted image or a part of the decoded image of the subCU adjacent to the decoding target subCU as an image of the template area.
  • FIG. 28 is a diagram illustrating processing contents and processing timing for each subCU in the inter prediction mode of the encoder according to the second embodiment.
  • FIG. 28 (a) shows an example of a block of a CU including each subCU to be decoded.
  • the block of the CU including the subCU to be decoded is “CU n ”, and there are four subCUs (“sub0”, “sub1”, “sub2”) in the CU block. , “Sub3”).
  • the example of FIG. 28A shows that a decoded image is generated for both the upper CU block and the left CU block adjacent to “CU n ”.
  • the example of FIG. 28A shows that a part of the decoded image of the adjacent CU block is set as the template areas 1101 to 1112.
  • FIG. 28B is a diagram illustrating processing timing when the intra / inter prediction unit 409 executes processing for four subCUs included in “CU n ”.
  • the processing executed by the intra / inter prediction unit 409 is as follows. Setting of CU level motion vector candidates and determination of one motion vector candidate as a base point; CU level motion vector determination, Setting of subCU level motion vector candidates and determination of one motion vector candidate as a base point; Determination of subCU level motion vectors, Generation of predicted images at the subCU level, ⁇ Acquisition of subCU level decoded image, These are shown separately.
  • the processing timing “T m ” to “T m + 7 ” is shown due to space limitations.
  • a motion vector candidate at the subCU level is set for “subCU0”, and one motion vector candidate as a base point at the subCU level is determined.
  • a motion vector at the subCU level is determined for “subCU0”.
  • the decoded images of the template areas 1101 and 1111 are used when determining the motion vector of “subCU0”.
  • a template region can be set for each position corresponding to a subCU level motion vector candidate for “subCU1” and “subCU2”. .
  • a subCU-level motion vector can be determined for “subCU1” and “subCU2”.
  • the motion vector at the subCU level is determined for “subCU1” and “subCU2”. Note that when determining the motion vector of “subCU1”, the decoded image of the template area 1102 and the predicted image of the template area 2801 are used. In addition, when determining the motion vector of “subCU2”, the predicted image in the template region 2802 and the decoded image in the template region 1112 are used.
  • the decoded image is generated by outputting the predicted image
  • processing timing “T m + 6 ”, for “subCU3”, a template region is set at each position corresponding to the motion vector candidate at the subCU level, and one motion vector candidate serving as a base point at the subCU level is determined.
  • prediction images are generated and output for “subCU1” and “subCU2” in parallel.
  • a subCU-level motion vector can be determined for “subCU3”.
  • a motion vector at the subCU level is determined for “subCU3”.
  • the predicted image of the template area 2803 and the predicted image of the template area 2804 are used.
  • the decoded image is generated by outputting the predicted image
  • parallel processing can be executed for a plurality of subCUs, and the processing efficiency can be improved.
  • FIG. 29 is a first diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the second embodiment.
  • the example of FIG. 29 illustrates parallel processing executed on a subCU included in a block 1800 of an 8 pixel ⁇ 8 pixel CU generated by dividing a CTU 510 of 128 pixels ⁇ 128 pixels (subCU size). Since 4 pixels ⁇ 4 pixels, parallel processing is executed).
  • the CU block 1800 is divided into four subCUs.
  • template areas are set for each of the four subCUs 2901 to 2904 as follows.
  • SubCU 2901 A part of the decoded image of the upper subCU adjacent to the subCU 2901 and a part of the decoded image of the left subCU adjacent to the subCU 2901 are set as template regions 1801 and 1811.
  • SubCU 2902 A part of the decoded image of the upper sub CU 2902 adjacent to the sub CU 2902 and a part of the predicted image of the left sub CU 2901 adjacent to the sub CU 2902 are set as template regions 1802 and 2911.
  • SubCU 2903 A part of the predicted image of the upper sub CU 2901 adjacent to the sub CU 2903 and a part of the decoded image of the left sub CU adjacent to the sub CU 2903 are set as template regions 2912 and 1812.
  • SubCU 2904 A part of the prediction image of the upper sub CU 2902 adjacent to the sub CU 2904 and a part of the prediction image of the left sub CU 2903 adjacent to the sub CU 2904 are set as template regions 2913 and 2914.
  • template matching of the subCU 2902 and the subCU 2903 can be executed in parallel with the processing of the subCU 2901.
  • FIG. 30 is a second diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the second embodiment.
  • the example of FIG. 30 illustrates parallel processing executed on a subCU included in a block 1900 of a 64 pixel ⁇ 64 pixel CU generated by dividing a CTU 510 of 128 pixels ⁇ 128 pixels (for example, CU).
  • the parallel processing is executed when the quantization parameter of the block 1900 is 30 or less).
  • the CU block 1900 is divided into 16 subCUs.
  • a part of the decoded image or predicted image of the upper subCU adjacent to the subCU and a part of the decoded image or predicted image of the left subCU are set as template regions. To do.
  • a part of the decoded image of the upper subCU adjacent to the subCU 3001 is set as the template area 1901, and a part of the decoded image of the left subCU adjacent to the subCU 3001 is set as the template area 1911.
  • template matching of the subCU 3002 and the subCU 3005 can be executed in parallel with the processing of the subCU 3001. Furthermore, in parallel with the processing of the subCU 3002 and the subCU 3005, for example, template matching of the subCUs 3003, 3006, and 3009 can be executed.
  • FIG. 31 is a third diagram illustrating a specific example of parallel processing in the inter prediction mode of the encoder according to the second embodiment.
  • the example of FIG. 31 illustrates a case where 8 to 4 CU blocks 2001 to 2004 generated by dividing a 128-by-128 CTU 510 are processed.
  • each of the CU blocks 2001 to 2004 is divided into two subCUs.
  • the size of the subCU is 4 pixels ⁇ 4 pixels, and parallel processing is executed for two subCUs.
  • Reference numeral 3110 indicates, in time series, how a template area is set for each subCU included in the CU blocks 2001 to 2004, and indicates that the time axis advances from the bottom to the top. .
  • a part of the decoded image of the subCU adjacent to the upper side of the left subCU and a part of the decoded image of the subCU adjacent to the left side are represented.
  • Template areas 2011 and 2021 are set.
  • a part of the decoded image of the subCU adjacent to the upper side of the right subCU and a part of the predicted image of the subCU adjacent to the left side are displayed in the template region 2012, Set as 3121.
  • template matching of the right subCU among the two subCUs included in the block 2001 of the CU can be executed in parallel with the processing of the left subCU.
  • the process proceeds to the CU block 2002. Specifically, among the two subCUs included in the block 2002 of the CU, a part of the decoded image of the subCU adjacent to the upper side of the left subCU and a part of the decoded image of the subCU adjacent to the left side are used as a template. The areas 2013 and 2022 are set. In addition, among the two subCUs included in the block 2002 of the CU, a part of the decoded image of the subCU adjacent to the upper side of the right subCU and a part of the predicted image of the subCU adjacent to the left side are displayed in the template region 2014, 3122 is set.
  • template matching of the right subCU among the two subCUs included in the block 2002 of the CU can be executed in parallel with the processing of the left subCU.
  • the process proceeds to the CU block 2003. Specifically, among the two subCUs included in the block 2003 of the CU, a part of the decoded image of the subCU adjacent to the upper side of the left subCU and a part of the decoded image of the subCU adjacent to the left side are used as a template. Set as areas 2015 and 2023. In addition, among the two subCUs included in the block 2003 of the CU, a part of the decoded image of the subCU adjacent to the upper side of the right subCU and a part of the predicted image of the subCU adjacent to the left side are converted into a template region 2016, 3123 is set.
  • the process proceeds to the processing of the CU block 2004.
  • a part of the decoded image of the subCU adjacent to the upper side of the left subCU and a part of the decoded image of the subCU adjacent to the left side are used as a template.
  • Areas 2017 and 2024 are set.
  • a part of the decoded image of the subCU adjacent to the upper side of the right subCU and a part of the predicted image of the subCU adjacent to the left side are displayed in the template region 2018, 3124 is set.
  • FIG. 32 is a diagram illustrating an example of a functional configuration for realizing inter prediction processing by template matching in the inter prediction mode of the decoder according to the second embodiment.
  • FIG. 23 is different from FIG. 23 in that a prediction image acquisition unit 3201 is provided in the case of FIG. Hereinafter, the difference from FIG. 23 will be mainly described.
  • the predicted image acquisition unit 3201 acquires the predicted image of the subCU adjacent to the decoding target subCU generated by the predicted image generation unit 2207. Specifically, the predicted image acquisition unit 3201 acquires the predicted image of the template region set by the template region setting unit 2201 (the template region set at the position of the subCU adjacent to the decoding target subCU). Also, the predicted image acquisition unit 3201 notifies the template region selection unit 2302 of the acquired predicted image of the template region.
  • the template region setting unit 2201 has been described with reference to FIG. 24 for the predicted image acquisition unit 3201 when the template region determination unit 2301 is notified of a determination result that satisfies a predetermined execution condition. Set the template area.
  • the template region setting unit 2201 sets a part of the predicted image of the subCU adjacent to the upper side of the subCU to be decoded and a part of the predicted image of the subCU adjacent to the left side as the template region.
  • the predicted image acquisition unit 3201 selects the predicted image of the template region set by the template region setting unit 2201 (part of the predicted image of the adjacent subCU) among the predicted images generated by the predicted image generation unit 2207. Notify the template area selection unit 2302.
  • the template region selection unit 2302 receives the decoded image of the template region notified from the decoding-in-progress screen acquisition unit 2202 (part of the decoded image of the adjacent subCU). Select. Further, the template area selection unit 2302 notifies the matching unit 2204 of the decoded image of the selected template area. As a result, the matching unit 2204 can perform template matching on the decoding target subCU in the reference screen using the decoded image of the template region corresponding to the determination result notified from the template region determining unit 2301.
  • the template region selection unit 2302 predicts the predicted image of the template region notified from the predicted image acquisition unit 3201 (part of the predicted image of the adjacent subCU). Select. Further, the template area selection unit 2302 notifies the matching unit 2204 of the predicted image of the selected template area. Accordingly, the matching unit 2204 can perform template matching on the decoding target subCU using the predicted image of the template region corresponding to the determination result notified from the template region determining unit 2301 in the reference screen.
  • the block (CU) of the decoding unit is divided into a plurality of rectangular areas (subCU). If it is determined whether the rectangular area to be decoded satisfies a predetermined execution condition, and if it is determined that the predetermined execution condition is satisfied, a part of the predicted image of the rectangular area adjacent to the rectangular area is a template area Set as. Using the set template area, template matching is performed by parallel processing on a part of the rectangular areas included in the decoding unit block, and a predicted image of each rectangular area is output.
  • the block (CU) of the decoding unit is divided into a plurality of rectangular areas (subCU). If it is determined whether the rectangular area to be decoded satisfies a predetermined execution condition and it is determined that the predetermined execution condition is satisfied, a part of the predicted image of the rectangular area adjacent to the rectangular area is used as a template. Set as area. Using the set template area, template matching is performed by parallel processing on a part of the rectangular areas included in the decoding unit block, and a predicted image of each rectangular area is output.
  • a part of a decoded image of a block of a CU adjacent to a block of a CU including a subCU to be decoded is a template region.
  • the function described in the first embodiment and the function described in the second embodiment are respectively arranged in the encoder and the decoder, and both functions are switched and executed.
  • the structure to perform is demonstrated.
  • the third embodiment will be described focusing on differences from the second embodiment.
  • FIG. 33 is a flowchart showing the flow of a subCU level motion search process in the inter prediction mode of the encoder according to the third embodiment. The difference from FIG. 27 is steps S3301, S3302, S1602, S2702, and S1603.
  • step S3301 the template area determination unit 1401 determines whether or not the decoding target subCU satisfies the first execution condition.
  • the first execution condition refers to, for example, any of the execution conditions defined in the execution condition information 1500.
  • step S3301 If it is determined in step S3301 that the first execution condition is satisfied (YES in step S3301), the process proceeds to step S1602.
  • step S1602 the template area setting unit 703 sets a part of the decoded image of the block of the CU adjacent to the block of the CU including the subCU to be decoded as a template area.
  • step S3301 determines whether the first execution condition is not satisfied (NO in step S3301).
  • the process proceeds to step S3302.
  • the template area determination unit 1401 determines whether the decoding target subCU satisfies the second execution condition.
  • the second execution condition refers to, for example, any execution condition that does not overlap with the execution condition information 1500 among the execution conditions specified in the execution condition information 2700.
  • step S3302 If it is determined in step S3302 that the second execution condition is satisfied (YES in step S3302), the process proceeds to step S2702.
  • step S2702 the predicted image acquisition unit 2501 acquires, from the predicted image generation unit 708, a predicted image or a decoded image of the upper subCU and the left subCU adjacent to the decoding target subCU. Further, the template area selection unit 1402 sets a predicted image or a part of the decoded image of the subCU adjacent to the decoding target subCU as a template area.
  • step S3302 determines whether the second execution condition is not satisfied (NO in step S3302), the process proceeds to step S1603.
  • step S1603 the template area setting unit 703 sets a part of the decoded image of the subCU adjacent to the decoding target subCU as a template area.
  • the intra / inter prediction unit of the encoder and decoder performs the inter prediction process by template matching in the inter prediction mode. If it is determined whether the rectangular area of the decoded image satisfies the first execution condition, and it is determined that the first execution condition is satisfied, the block of the block adjacent to the block of the decoding unit that includes the rectangular area A part of the decoded image is set as a template area. If it is determined whether the rectangular area of the decoded image satisfies the second execution condition and it is determined that the second execution condition is satisfied, a part of the predicted image of the rectangular area adjacent to the rectangular area is Set as template area.
  • the encoder and the decoder according to the third embodiment it is possible to set a template region according to the attribute of the subCU to be decoded and execute the inter prediction process by template matching.
  • the predetermined block is described as a block of a decoding unit (CU) including a subCU to be decoded.
  • the predetermined block is not limited to a CU block. As long as the block includes the subCU to be decoded, the block may be smaller than the CU or larger than the CU.
  • a predetermined block is defined in advance in the encoder 110, and that information indicating the predetermined block is included in the incidental information when the data stream is output. This is because the decoder 120 can recognize a predetermined block based on the incidental information.
  • the determination is made based on the execution conditions defined in the execution condition information 1500 in FIG. 15 or the execution condition information 2600 in FIG.
  • the execution condition used for the determination is not limited to this, and it goes without saying that the determination may be made based on other predetermined execution conditions not defined in the execution condition information 1500 or the execution condition information 2600. .
  • each of the encoder 110 and the decoder 120 performs determination based on all execution conditions defined in the execution condition information 1500 in FIG. 15 or the execution condition information 2600 in FIG. Explained as a thing.
  • the encoder 110 and the decoder 120 may be configured to perform determination based on any execution condition.
  • the encoder 110 since the decoder 120 needs to recognize the execution condition used for the determination in the encoder 110, the encoder 110 includes the execution condition used for the determination in the incidental information as a syntax and transmits the syntax to the decoder 120.
  • a part of the decoded image of the adjacent CU is set as a template region, and when the second execution condition is satisfied, it is adjacent.
  • a part of the predicted image of subCU is set as a template area. That is, the template region is set with either a part of the decoded image of the adjacent CU or a part of the predicted image of the adjacent subCU.
  • the template region setting method is not limited to this, and for example, a part of the prediction image of the adjacent CU may be set.
  • Image processing system 110 Encoder 120: Decoder 409: Intra / inter prediction unit 520: CU blocks 530 to 550: subCU 541, 542: Template region 610: Screen 620: Screen 701: Motion search processing unit 702: Cost determination unit 703: Template region setting unit 704: Decoding screen acquisition unit 705: Reference screen acquisition unit 706: Matching unit 707: Motion vector Calculation unit 708: Predictive image generation unit 709: Motion vector storage unit 710: Template search point setting unit 1101, 1102: Template region 1111, 1112: Template region 1131: Template region 1201, 1202: Template region 1211-1213: Template region 1401 : Template region determination unit 1402: Template region selection unit 1500: Execution condition information 2106: Intra / inter prediction Unit 2201: Template region setting unit 2202: Decoding screen acquisition unit 2203: Reference screen acquisition unit 2204: Matching unit 2205: Motion vector calculation unit 2207: Predictive image generation unit 2208: Motion vector storage unit 2209: Template search point setting unit 2301 :

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

次世代コーデックでのインタ予測において、処理効率を向上させる。復号方法は、復号中の画面内より第1のテンプレート領域を設定するステップと、参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定するステップと、前記第2のテンプレート領域を、所定ベクトル分移動することで設定した第3のテンプレート領域と、前記第1のテンプレート領域との相関値を算出するステップと、複数の前記相関値に基づいて動きベクトルを決定するステップと、前記動きベクトルに基づいて、前記復号対象の動き補償を行うステップと、を有し、前記第1のテンプレート領域を設定するステップは、前記復号対象のサイズが所定の閾値以下であった場合、または、前記復号対象が含まれる画面が、参照されることのない画面に該当する場合に、前記復号対象が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定する。

Description

復号方法、復号装置、符号化装置及びプログラム
 本発明は、復号方法、復号装置、符号化装置及びプログラムに関する。
 現在検討中である次世代ビデオコーデック(H.265/HEVCに続く次世代コーデック)における画面間予測(インタ予測)の1つとして、テンプレートマッチングによるインタ予測がある。テンプレートマッチングによるインタ予測は、復号対象のブロックに隣接する領域(テンプレート領域)を用いて、時間的に異なる参照画面内でマッチングを行い、動きベクトルを決定することで予測画像を生成する、"動き補償インタ予測"の1つである。
 ここで、標準化されたビデオコーデックでの動き補償インタ予測に対しては、従来より、種々の改善方法が提案されている。例えば、下記特許文献1では、テンプレートマッチングによるインタ予測において、処理効率を向上させるべく、復号対象のブロックと所定の位置関係にある領域をテンプレート領域として設定する方法が提案されている。
国際公開第2010/095560号
 一方で、次世代コーデックの場合、インタ予測の際にsubCUと呼ばれるブロックに分割して符号化を行う。このため、次世代コーデックでのテンプレートマッチングによるインタ予測では、復号対象のブロックとの位置関係が所定の位置関係に当てはまらないパターンが存在する。この結果、上記特許文献1のように、処理効率の向上を実現できない場合がある。
 一つの側面では、次世代コーデックでのテンプレートマッチングによるインタ予測において、処理効率を向上させることを目的としている。
 一態様によれば、復号方法は、以下の構成を備える。すなわち、
 画面間予測を用いて画像を復号する復号方法であって、
 復号中の画面内より復号対象の矩形領域を取得するステップと、
 前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定するステップと、
 前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定するステップと、
 前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出するステップと、
 複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定するステップと、
 前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行うステップと、を有し、
 前記第1のテンプレート領域を設定するステップは、
 前記復号対象の矩形領域のサイズが所定の閾値以下であった場合、または、前記復号対象の矩形領域が含まれる画面が、時間的に異なる他の画面を復号する際に参照されることのない参照画面に該当する場合に、符号化装置において決定された、前記復号対象の矩形領域が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定することを特徴とする。
 次世代コーデックでのテンプレートマッチングによるインタ予測において、処理効率を向上させることができる。
図1は、エンコーダ及びデコーダの適用例を示す図である。 図2は、エンコーダ及びデコーダの他の適用例を示す図である。 図3は、エンコーダのハードウェア構成の一例を示す図である。 図4は、エンコーダの機能構成の一例を示す図である。 図5は、次世代コーデックにおいて検討中のインタ予測モードにおける、復号対象の矩形領域及びテンプレート領域を説明するための図である。 図6は、次世代コーデックにおいて検討中のインタ予測モードにおける、テンプレートマッチングの概要を示す図である。 図7は、次世代コーデックにおいて検討中のインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成(エンコーダ)の一例を示す図である。 図8は、次世代コーデックにおいて検討中のインタ予測モードにおける、テンプレートマッチングによるインタ予測処理の流れを示すフローチャートである。 図9は、ステップS801を詳細化した、CUレベルの動き探索処理の流れを示すフローチャートである。 図10は、ステップS802を詳細化した、subCUレベルの動き探索処理の流れを示すフローチャートである。 図11は、次世代コーデックにおいて検討中のインタ予測モードにおける、subCUごとの処理内容及び処理タイミングを示す図である。 図12は、第1の実施形態に係るエンコーダのインタ予測モードにおける、復号対象の矩形領域及びテンプレート領域を説明するための図である。 図13は、第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングの概要を示す図である。 図14は、第1の実施形態に係るエンコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成の一例を示す図である。 図15は、第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングの実行条件を示す図である。 図16は、第1の実施形態に係るエンコーダのインタ予測モードにおける、subCUレベルの動き探索処理の流れを示すフローチャートである。 図17は、第1の実施形態に係るエンコーダのインタ予測モードにおける、subCUごとの処理内容及び処理タイミングを示す図である。 図18は、第1の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第1の図である。 図19は、第1の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第2の図である。 図20は、第1の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第3の図である。 図21は、デコーダの機能構成の一例を示す図である。 図22は、次世代コーデックにおいて検討中のインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成(デコーダ)の一例を示す図である。 図23は、第1の実施形態に係るデコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成の一例を示す図である。 図24は、第2の実施形態に係るエンコーダのインタ予測モードにおける、復号対象の矩形領域及びテンプレート領域を説明するための図である。 図25は、第2の実施形態に係るエンコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成の一例を示す図である。 図26は、第2の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングの実行条件を示す図である。 図27は、第2の実施形態に係るエンコーダのインタ予測モードにおける、subCUレベルの動き探索処理の流れを示すフローチャートである。 図28は、第2の実施形態に係るエンコーダのインタ予測モードにおける、subCUごとの処理内容及び処理タイミングを示す図である。 図29は、第2の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第1の図である。 図30は、第2の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第2の図である。 図31は、第2の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第3の図である。 図32は、第2の実施形態に係るデコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成の一例を示す図である。 図33は、第3の実施形態に係るエンコーダのインタ予測モードにおける、subCUレベルの動き探索処理の流れを示すフローチャートである。
 以下、各実施形態について添付の図面を参照しながら説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複した説明を省略する。
 [第1の実施形態]
 <1.エンコーダ及びデコーダの適用例>
 はじめに、エンコーダ(符号化装置)及びデコーダ(復号装置)の適用例について説明する。図1は、エンコーダ及びデコーダの適用例を示す図である。
 図1に示すように、エンコーダ110を送信装置に、デコーダ120を受信装置にそれぞれ配し、ネットワーク160を介して接続することで、エンコーダ110及びデコーダ120を適用した画像処理システム100を形成することができる。
 画像処理システム100において、送信装置に配されたエンコーダ110は、入力された画像データを符号化することでデータストリーム(符号化列)を生成する。また、送信装置は生成されたデータストリームを、ネットワーク160を介して受信装置に送信する。
 受信装置はデータストリームを受信する。また、受信装置に配されたデコーダ120は、データストリームを復号することで画像データを生成し、表示する。
 かかる画像処理システム100を形成することで、画像データを送信する際の送信負荷を低減できるため、例えば、インタネット分野、放送分野、通信分野等の種々の分野に適用することができる。
 適用例100aは、画像処理システム100をインタネット分野に適用した例を示している。適用例100aの場合、送信装置110の一例であるサーバ装置111より送信されたデータストリームを、受信装置110の一例であるパーソナルコンピュータ121a、スマート端末121b等が受信し、表示する。これにより、パーソナルコンピュータ121aやスマート端末121bのユーザは、サーバ装置111が保持する動画像データをインタネットを介して視聴することができる。
 適用例100bは、画像処理システム100を放送分野に適用した例を示している。適用例100bの場合、送信装置110の一例である放送用送信機112より送信されたデータストリームを、受信装置110の一例であるテレビ122が受信し、表示する。これにより、例えば、テレビ122のユーザは、放送用送信機112が送信する放送内容を視聴することができる。
 適用例100cは、画像処理システム100を通信分野に適用した例を示している。適用例100cの場合、送信装置110の一例であるテレビ電話機113より送信されたデータストリームを、受信装置110の一例であるテレビ電話機123が受信し、表示する。これにより、テレビ電話機123のユーザは、通話相手の顔を見ながら通話することができる。
 図2は、エンコーダ及びデコーダの他の適用例を示す図である。図2に示すように、エンコーダ110とデコーダ120とを一体的に構成することで、エンコーダ110及びデコーダ120を適用した蓄積装置200を形成することができる。
 蓄積装置200は、入力された画像データをエンコーダ110が符号化し、生成したデータストリームを記録媒体に格納する。また、蓄積装置200は、記録媒体に格納されたデータストリームを、デコーダ120が復号することで画像データを生成し、表示する。
 かかる蓄積装置200を形成することで、画像データを格納する際の容量を低減できるため、例えば、蓄積分野に適用することができる。適用例200aは蓄積装置200を蓄積分野に適用した例を示している。適用例200aの場合、蓄積装置200の一例であるビデオレコーダ211は、内蔵するエンコーダ110が、画像データを符号化することで生成したデータストリームを記録媒体212に格納する。また、ビデオレコーダ211は、内蔵するデコーダ120が、記録媒体212より読み出したデータストリームを復号することで画像データを生成し、モニタ213に表示する。これにより、ビデオレコーダ211のユーザは、取得した動画像データを効率的に蓄積することができる。
 <2.エンコーダ及びデコーダのハードウェア構成>
 次に、エンコーダ及びデコーダのハードウェア構成について説明する。なお、エンコーダ110及びデコーダ120は、同様のハードウェア構成を有していることから、ここでは、エンコーダ110のハードウェア構成について説明する。
 図3は、エンコーダのハードウェア構成の一例を示す図である。図3に示すように、エンコーダ110は、CPU(Central Processing Unit)301、ROM(Read Only Memory)302、RAM(Random Access Memory)303を有する。CPU301、ROM302、RAM303は、いわゆるコンピュータを形成する。また、エンコーダ110は、補助記憶装置304、入力装置305、表示装置306、接続装置307、ドライブ装置308を有する。なお、エンコーダ110の各ハードウェアは、バス309を介して相互に接続される。
 CPU301は、補助記憶装置304にインストールされた各種プログラム(例えば、符号化プログラム等)を実行する。
 ROM302は、不揮発性メモリである。ROM302は、補助記憶装置304にインストールされた各種プログラムをCPU301が実行するために必要な各種プログラム、データ等を記憶する、主記憶デバイスとして機能する。具体的には、ROM302はBIOS(Basic Input/Output System)やEFI(Extensible Firmware Interface)等のブートプログラム等を記憶する。
 RAM303は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)等の揮発性メモリである。RAM303は、補助記憶装置304にインストールされた各種プログラムがCPU301によって実行される際に展開される作業領域を提供する、主記憶デバイスとして機能する。
 補助記憶装置304は、インストールされた各種プログラムや、各種プログラムを実行する際に用いる情報を記憶する補助記憶デバイスである。
 入力装置305は、エンコーダ110に対して各種指示を入力する際に用いる入力デバイスである。
 表示装置306は、エンコーダ110の内部情報を表示する表示デバイスである。接続装置307は、エンコーダ110が外部からの画像データを受け付けたり、エンコーダ110がデコーダ120と接続し、通信を行うための通信デバイスである。
 ドライブ装置308はコンピュータ読み取り可能な記録媒体310をセットするためのデバイスである。ここでいう記録媒体310には、CD-ROM、フレキシブルディスク、光磁気ディスク等のように情報を光学的、電気的あるいは磁気的に記録する媒体が含まれる。あるいは、記録媒体310には、ROM、フラッシュメモリ等のように情報を電気的に記録する半導体メモリ等が含まれてもよい。
 なお、補助記憶装置304にインストールされる各種プログラムは、例えば、配布された記録媒体310がドライブ装置308にセットされ、該記録媒体310に記録された各種プログラムがドライブ装置308により読み出されることでインストールされてもよい。あるいは、補助記憶装置304にインストールされる各種プログラムは、接続装置307を介してネットワーク160からダウンロードされることでインストールされてもよい。
 なお、図3に示すハードウェア構成は、あくまで一例にすぎず、適用形態によっては、図3に示すハードウェアの一部を除外して、あるいは他のハードウェアに置き換えてもよいことはいうまでもない。
 <3.エンコーダの機能構成>
 次に、エンコーダ110の機能構成について説明する。図4は、エンコーダの機能構成の一例を示す図である。図4に示すように、エンコーダ110は、ブロック分割部401、直交変換部402、量子化部403、エントロピ符号化部404を有する。また、エンコーダ110は、逆量子化部405、逆直交変換部406、ループフィルタ部407、復号画像記憶部408、イントラ/インタ予測部409を有する。
 ブロック分割部401は、入力された画像データに含まれる各画面(入力画面または入力フレームと称す)を取得する。また、ブロック分割部401は、入力画面(入力フレーム)をストリームで固定サイズのブロックに分割する。更に、ブロック分割部401は、固定サイズのブロックそれぞれを、更に再帰的に、符号化単位のブロックに分割する。なお、H.265/HEVCにおけるブロック分割部では、入力画面をストリームで固定サイズのブロックであるCTU(Coding Tree Unit)に分割する。また、H.265/HEVCにおけるブロック分割部では、各CTUのブロックを符号化単位のブロックであるCU(Coding Unit)に分割する。更に、H.265/HEVCにおけるブロック分割部では、各CUのブロックを予測ユニット(PU(Prediction Unit))と変換ユニット(TU(Transform Unit))のブロックに分割する。
 しかしながら、H.265/HEVCに続く次世代コーデックの国際標準では、PU、TUを廃止し、全てCUのブロックに分割することが見込まれている。このため、本実施形態では、ブロック分割部401が、CTUのブロックを、全てCUのブロックに分割するものとして説明する。なお、H.265/HEVCに続く次世代コーデックにおいて検討されている内容によれば、CTUのブロックのサイズは、最大128画素×128画素であるので、以下では、CTUのブロックのサイズは、128画素×128画素として説明する。
 ブロック分割部401によりCUのブロックに分割された画像データの各入力画面(入力フレーム)は、イントラ/インタ予測部409に通知されるとともに、予測残差信号の算出に用いられる。
 直交変換部402は、入力画面の各CUのブロック内の入力画像と、対応する各CUのブロック内の予測画像との差分に基づいて算出された予測残差信号に対して直交変換処理を実行する。
 量子化部403は、直交変換処理が実行された予測残差信号を量子化することで量子化信号を生成し、エントロピ符号化部404及び逆量子化部405に出力する。
 エントロピ符号化部404は、量子化信号をエントロピ符号化することで、データストリームを生成し、出力する。
 逆量子化部405は、量子化信号を逆量子化し、逆直交変換部406に出力する。逆直交変換部406は、逆量子化された量子化信号に対して逆直交変換処理を実行する。逆直交変換部406により得られた信号に対しては、例えば、イントラ/インタ予測部409が生成した予測画像が加算されることで復号画像が生成され、ループフィルタ部407に入力される。
 ループフィルタ部407は、入力された復号画像の符号化ノイズを低減するフィルタ処理を行う。復号画像記憶部408は、ループフィルタ部407によりフィルタ処理された復号画像を画面ごと(フレームごと)に記憶する。
 イントラ/インタ予測部409は、復号中の画面内の各CUのブロックの復号画像を用いて処理対象のCUのブロックの予測画像を生成するイントラ予測(画面内予測)を行う。また、イントラ/インタ予測部409は、参照画面内の各CUのブロックの復号画像を用いて画面間で動き補償を行い、処理対象のCUのブロックの予測画像を生成する動き補償インタ予測(画面間予測)を行う。
 更に、イントラ/インタ予測部409は、イントラ予測により生成された各CUのブロックの予測画像であるイントラ予測画像または動き補償インタ予測により生成された各CUのブロックの予測画像であるインタ予測画像のいずれか一方を出力する。
 イントラ/インタ予測部409より出力された各CUのブロックの予測画像は、入力画面内の各CUのブロックの入力画像との残差計算に用いられ、算出された予測残差信号は、直交変換部402に入力される。また、イントラ/インタ予測部409より出力された予測画像は、逆直交変換部406により得られた信号に加算され、復号画像としてループフィルタ部407に入力される。
 <4.エンコーダのイントラ/インタ予測部の詳細>
 続いて、エンコーダのイントラ/インタ予測部409における、テンプレートマッチングによるインタ予測処理の詳細について説明する。なお、以下では、まず、対比として次世代コーデックにおいて検討中のインタ予測モードにおける、テンプレートマッチングによるインタ予測処理について説明する(以下、<4.1>参照)。続いて、第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングによるインタ予測処理について説明する(以下、<4.2>参照)。
  <4.1 次世代コーデックにおいて検討中のインタ予測モードにおける、テンプレートマッチングによるインタ予測処理>
 (1)復号対象の矩形領域(subCU)及びテンプレート領域の説明
 はじめに、次世代コーデックにおいて検討中のインタ予測モードで、テンプレートマッチングによるインタ予測処理を行う場合の、復号対象の矩形領域及びテンプレート領域について説明する。図5は、次世代コーデックにおいて検討中のインタ予測モードにおける、復号対象の矩形領域及びテンプレート領域を説明するための図である。
 図5に示すように、入力画面(入力フレーム)500のうち、128画素×128画素のCTU510が、CUのブロックに分割され、当該CUのブロックについて、テンプレートマッチングによるインタ予測処理が行われる。
 なお、CTU510に示すように、CTUのブロックは、インタ予測の際、様々なブロックサイズのCUに分割される。図5に示す例では、正方形のCUのブロック(8×8、16×16、32×32、64×64。単位は全て[画素])に分割された場合が含まれる。更に、図5に示す例では、長方形のCUのブロック(4×8、8×4、8×16、16×8、16×32、32×16、32×64、64×32、64×128、128×64。単位は全て[画素])に分割された場合が含まれる。
 CUのブロック520は、このうち、64画素×64画素に分割された正方形のブロックを拡大して示したものである。CUのブロック520に示すように、次世代コーデックにおいては、インタ予測モードにおいて、subCU530、540、550等の矩形領域が生成され、subCUを復号対象として、subCUごとに、順次、予測画像及び復号画像が生成される。
 図5の例において、復号対象のsubCU530について、テンプレートマッチングによるインタ予測処理を行うことで予測画像及び復号画像を生成する場合、
・subCU530の上側に隣接するsubCU540と、
・subCU530の左側に隣接するsubCU550と、
が用いられる。つまり、subCU530についてテンプレートマッチングによるインタ予測処理を行うことで予測画像及び復号画像を生成するにあたっては、subCU540、550についての予測画像及び復号画像の生成が、いずれも完了していることが前提となる。
 図5の例によれば、subCU540の復号画像の一部と、subCU550の復号画像の一部とが、テンプレート領域541、551として設定される。そして、設定されたテンプレート領域541、551の復号画像を用いて、テンプレートマッチングによるインタ予測処理が行われる。
 (2)テンプレートマッチングの概要
 続いて、次世代コーデックにおいて検討中のインタ予測モードにおける、テンプレートマッチングの概要について説明する。図6は、次世代コーデックにおいて検討中のインタ予測モードにおける、テンプレートマッチングの概要を示す図である。
 図6において、画面620は、イントラ/インタ予測部409によって復号中の画面(フレーム)である。図6の例は、復号対象のsubCU530について、テンプレート領域541、551が設定された様子を示している。
 また、図6において、画面610は、復号中の画面620において設定されたテンプレート領域とのマッチングが行われる参照画面(復号中の画面620とは時間的に異なる復号画面)である。
 図6の例は、設定されたテンプレート領域541、551(第1のテンプレート領域)に相当する画面610内の領域として、テンプレート領域615、616(第2のテンプレート領域)が設定された様子を示している。
 また、図6の例は、テンプレート領域615、616が、画面610内で所定のベクトル分移動(ベクトル614分移動)されることで、テンプレート領域612、613(第3のテンプレート領域)が設定された様子を示している。
 更に、図6の例は、テンプレート領域612、613とテンプレート領域541、551との間で算出された画像の相関値(マッチング度)が最大であったことにより、ベクトル614が、復号対象のsubCU530の動きベクトルとして決定された様子を示している。
 このように、復号対象のsubCU530に隣接するsubCUの復号画像の一部をテンプレート領域541、551として設定し、画面610内においてマッチングを行うことで、動き補償インタ予測に用いられる動きベクトル614を決定することができる。
 (3)イントラ/インタ予測部の機能構成(エンコーダ)
 続いて、次世代コーデックにおいて検討中のインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成(エンコーダ)について説明する。図7は、次世代コーデックにおいて検討中のインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成の一例を示す図である。
 図7に示すように、次世代コーデックにおいて検討中のインタ予測モードの場合、イントラ/インタ予測部409は、動き探索処理部701、コスト判定部702、テンプレート領域設定部703、復号中画面取得部704を有する。また、イントラ/インタ予測部409は、参照画面取得部705、マッチング部706、動きベクトル算出部707、予測画像生成部708、動きベクトル格納部709、テンプレート探索点設定部710を有する。
 動き探索処理部701は、ブロック分割部401より、入力画面(入力フレーム)のCTUのうち、所定のCTUを分割することで得られるCUのブロックであって、処理対象のCU(復号対象のsubCUが含まれるCU)のブロックの入力画像を取得する。
 また、動き探索処理部701は、復号画像記憶部408に記憶された復号画面の中から、参照画面取得部705により参照画面として読み出された復号画面を取得する。更に、動き探索処理部701は、処理対象のCUのブロックの入力画像について、参照画面に対する非テンプレートマッチング処理(テンプレートマッチング処理以外の一般的な探索処理)を実行する。これにより、動き探索処理部701は、CUレベルの非テンプレートマッチングにおける動きベクトルと、非テンプレートマッチングにおけるコストとを算出し、コスト判定部702に通知する。
 コスト判定部702は、動き探索処理部701より通知される、CUレベルの非テンプレートマッチングにおける動きベクトルと、非テンプレートマッチングにおけるコストとを取得する。また、コスト判定部702は、後述する動きベクトル算出部707より通知される、CUレベルのテンプレートマッチングにおける動きベクトルと、テンプレートマッチングにおけるコストとを取得する。
 更に、コスト判定部702は、取得したコストを比較することで、CUの予測モードを決定し、インタ予測結果情報として出力する。また、コスト判定部702は、CUの予測モードを、非テンプレートマッチングの動きベクトルを利用するモードに決定した場合にあっては、当該動きベクトルを、CUレベルの動きベクトルとして、予測画像生成部708に通知する。また、コスト判定部702は、決定したCUの予測モードを予測画像生成部708に通知する。
 一方、CUの予測モードを、テンプレートマッチングの動きベクトルを利用するモードに決定した場合にあっては、コスト判定部702は、決定したCUの予測モードを予測画像生成部708に通知する。なお、以下では、説明の簡略化のため、CUの予測モードがテンプレートマッチングの動きベクトルを利用するモードに決定されるものとして説明する。
 テンプレート領域設定部703は、CUレベルの動き探索にあっては、復号中画面取得部704が取得した復号中の画面において、復号対象のCUのブロックに対して、CUレベルのテンプレート領域を設定する。また、テンプレート領域設定部703は、subCUレベルの動き探索にあっては、復号中画面取得部704が取得した復号中の画面において、復号対象のsubCUに対して、subCUレベルのテンプレート領域を設定する。
 更に、テンプレート領域設定部703は、CUレベルの動き探索にあっては、参照画面取得部705が取得した参照画面内において、復号対象のCUのブロックについて設定されたCUレベルのテンプレート領域に相当するテンプレート領域を設定する。また、テンプレート領域設定部703は、subCUレベルの動き探索にあっては、参照画面取得部705が取得した参照画面内において、復号対象のsubCUについて設定されたsubCUレベルのテンプレート領域に相当するテンプレート領域を設定する。
 復号中画面取得部704は取得手段の一例である。復号中画面取得部704は、復号画像記憶部408より、復号中の画面を読み出す。また、復号中画面取得部704は、CUレベルの動き探索にあっては、復号対象のCUのブロックについて、テンプレート領域設定部703により設定されたCUレベルのテンプレート領域の復号画像を、マッチング部706に通知する。
 更に、復号中画面取得部704は、subCUレベルの動き探索にあっては、復号対象のsubCUについて、テンプレート領域設定部703により設定されたsubCUレベルのテンプレート領域の復号画像を、マッチング部706に通知する。
 参照画面取得部705は第2の設定手段の一例である。参照画面取得部705は、復号画像記憶部408に記憶された復号画面のうち、所定の復号画面(時間的に異なる復号画面)を参照画面として読み出す。また、参照画面取得部705は、読み出した参照画面を動き探索処理部701に通知する。
 また、参照画面取得部705は、読み出した参照画面内において、テンプレート探索点設定部710により設定されたCUレベルのテンプレート領域の参照画像を抽出する。
 なお、テンプレート探索点設定部710では、テンプレート領域設定部703により設定された参照画面内のCUレベルのテンプレート領域に対して、CUレベルの複数の動きベクトル候補に応じた位置それぞれに、テンプレート領域を設定する。そして、参照画面取得部705は、複数の動きベクトル候補に応じた位置に設定されたCUレベルのテンプレート領域の参照画像を抽出して、マッチング部706に通知する。
 また、テンプレート探索点設定部710では、CUレベルの1の動きベクトル候補に対して、CUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれにテンプレート領域を設定する。CUレベルのテンプレート探索点用動きベクトルとは、CUレベルの基点となる1の動きベクトル候補の周辺位置の動きベクトルである。そして、参照画面取得部705は、テンプレート探索点用動きベクトルに応じた位置に設定されたCUレベルのテンプレート領域の参照画像を抽出して、マッチング部706に通知する。
 また、参照画面取得部705は、テンプレート探索点設定部710により設定されたCUレベルの1のテンプレート探索点用動きベクトル(決定されたCUレベルの1の動きベクトル)に応じた位置のCUのブロックを、参照画面内において特定する。
 また、参照画面取得部705は、特定した参照画面内のCUのブロックから、テンプレート探索点設定部710により設定されたsubCUレベルのテンプレート領域の参照画像を抽出する。
 なお、テンプレート探索点設定部710は、特定した参照画面内のCUのブロックにおいて、テンプレート領域設定部703により設定されたsubCUレベルのテンプレート領域に対して、subCUレベルの複数の動きベクトル候補に応じた位置それぞれに、テンプレート領域を設定する。そして、参照画面取得部705は、複数の動きベクトル候補に応じた位置に設定されたsubCUレベルのテンプレート領域の参照画像を抽出して、マッチング部706に通知する。
 また、テンプレート探索点設定部710では、subCUレベルの1の動きベクトル候補に対して、subCUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれにテンプレート領域を設定する。subCUレベルのテンプレート探索点用動きベクトルとは、subCUレベルの基点となる1の動きベクトル候補の周辺位置の複数の動きベクトルである。そして、参照画面取得部705は、テンプレート探索点用動きベクトルに応じた位置に設定されたsubCUレベルのテンプレート領域の参照画像を抽出して、マッチング部706に通知する。
 マッチング部706は、CUレベルの動き探索にあっては、復号中画面取得部704より通知された、CUレベルのテンプレート領域の復号画像と、参照画面取得部705より通知された、CUレベルのテンプレート領域の参照画像とのマッチング度を算出する。
 なお、参照画面取得部705より通知されるCUレベルのテンプレート領域の参照画像には、CUレベルの複数の動きベクトル候補に基づいて抽出された参照画像と、CUレベルのテンプレート探索点用動きベクトルに基づいて抽出された参照画像とが含まれる。マッチング部706では、算出したそれぞれのマッチング度を動きベクトル算出部707に通知する。
 また、マッチング部706は、subCUレベルの動き探索にあっては、subCUレベルのテンプレート領域の復号画像と、subCUレベルのテンプレート領域の参照画像とのマッチング度を算出する。
 なお、subCUレベルのテンプレート領域の復号画像は、復号中画面取得部704より通知される。また、subCUレベルのテンプレート領域の参照画像は、参照画面取得部705より通知される。参照画面取得部705より通知されるsubCUレベルのテンプレート領域の参照画像には、subCUレベルの複数の動きベクトル候補に基づいて抽出された参照画像と、subCUレベルのテンプレート探索点用動きベクトルに基づいて抽出された参照画像とが含まれる。マッチング部706では、算出したそれぞれのマッチング度を動きベクトル算出部707に通知する。
 動きベクトル算出部707は、マッチング部706より通知されたマッチング度のうち、CUレベルの複数の動きベクトル候補に応じた位置に設定されたテンプレート領域の参照画像とのマッチング度の中から、最大のマッチング度を特定する。
 また、動きベクトル算出部707は、特定した最大のマッチング度に対応する、CUレベルの動きベクトル候補を、CUレベルの基点となる1の動きベクトル候補として、動きベクトル格納部709に格納する。
 また、動きベクトル算出部707は、CUレベルの基点となる1の動きベクトル候補を動きベクトル格納部709に格納したことに応じて、マッチング部706より通知されたCUレベルのマッチング度を取得する。このとき動きベクトル算出部707が取得するマッチング度は、CUレベルのテンプレート探索点用動きベクトル(CUレベルの基点となる1の動きベクトル候補の周辺の複数の動きベクトル)に応じた位置に設定されたテンプレート領域の参照画像とのマッチング度である。
 更に、動きベクトル算出部707は、取得したマッチング度に基づいて、CUレベルのテンプレートマッチングにおける動きベクトルを決定し、決定したCUレベルの動きベクトルを動きベクトル格納部709に格納する。
 また、動きベクトル算出部707は、決定したCUレベルの動きベクトルによるテンプレートマッチングにおけるコストを算出する。また、動きベクトル算出部707は、決定したCUレベルの動きベクトルとコストとをコスト判定部702に通知する。
 また、動きベクトル算出部707は、決定したCUレベルの動きベクトルを動きベクトル格納部709に格納したことに応じて、マッチング部706より通知されたsubCUレベルのマッチング度を取得する。また、動きベクトル算出部707は、取得したマッチング度のうち、subCUレベルの複数の動きベクトル候補に応じた位置に設定されたテンプレート領域の参照画像とのマッチング度の中から、最大のマッチング度を特定する。
 また、動きベクトル算出部707は、特定した最大のマッチング度に対応する、subCUレベルの1の動きベクトル候補を、subCUレベルの基点となる1の動きベクトル候補として、動きベクトル格納部709に格納する。
 また、動きベクトル算出部707は、subCUレベルの基点となる1の動きベクトル候補を動きベクトル格納部709に格納したことに応じて、マッチング部706より通知されたsubCUレベルのマッチング度を取得する。このとき動きベクトル算出部707が取得するマッチング度は、subCUレベルのテンプレート探索点用動きベクトル(subCUレベルの基点となる1の動きベクトル候補の周辺の複数の動きベクトル)に応じた位置に設定されたテンプレート領域の参照画像とのマッチング度である。更に、動きベクトル算出部707は、取得したマッチング度に基づいて、subCUレベルのテンプレートマッチングにおける動きベクトルを決定し、予測画像生成部708に通知する。
 予測画像生成部708は生成手段の一例である。予測画像生成部708は、コスト判定部702より、CUの予測モードとして、非テンプレートマッチングの動きベクトルを利用するモードが通知された場合、コスト判定部702より、非テンプレートマッチングの動きベクトルを取得する。この場合、予測画像生成部708は、参照画面取得部705より通知された参照画面内において、非テンプレートマッチングの動きベクトルに対応する参照画像を特定する。また、予測画像生成部708は、特定した参照画像を用いて予測画像を生成することで動き補償インタ予測を行う。更に、予測画像生成部708は、生成したCUのブロックの予測画像を、インタ予測画像として出力する。
 一方、コスト判定部702より、CUの予測モードとして、テンプレートマッチングの動きベクトルを利用するモードが通知された場合、予測画像生成部708は、動きベクトル算出部707より順次通知される、決定されたsubCUレベルの動きベクトルを取得する。
 また、予測画像生成部708は、参照画面取得部705より通知された参照画面内において、動きベクトル算出部707より順次通知された、決定されたsubCUレベルの動きベクトルに対応する参照画像を特定し、復号対象のsubCUの予測画像として、順次、出力する。更に、予測画像生成部708は、特定した各参照画像を用いてCUのブロックの予測画像を生成する。更に、予測画像生成部708は、生成したCUのブロックの予測画像を、インタ予測画像として出力する。
 動きベクトル格納部709は、CUレベルの基点となる1の動きベクトル候補を格納する。また、動きベクトル格納部709は、決定したCUレベルの動きベクトルを格納する。また、動きベクトル格納部709は、subCUレベルの基点となる1の動きベクトル候補を格納する。
 テンプレート探索点設定部710は、テンプレート領域設定部703により設定された参照画面内のCUレベルのテンプレート領域に対して、CUレベルの複数の動きベクトル候補に応じた位置それぞれに、テンプレート領域を設定する。
 また、テンプレート探索点設定部710は、動きベクトル格納部709に格納された、CUレベルの基点となる1の動きベクトル候補に基づいて、CUレベルのテンプレート探索点用動きベクトルを決定する。また、テンプレート探索点設定部710は、参照画面内において、CUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれに、テンプレート領域を設定する。
 また、テンプレート探索点設定部710は、特定された参照画面内のCUのブロックにおいて、テンプレート領域設定部703により設定されたsubCUレベルのテンプレート領域に対して、subCUレベルの複数の動きベクトル候補に応じた位置それぞれに、テンプレート領域を設定する。
 また、テンプレート探索点設定部710は、動きベクトル格納部709に格納された、subCUレベルの基点となる1の動きベクトル候補に基づいて、subCUレベルのテンプレート探索点用動きベクトルを決定する。また、テンプレート探索点設定部710は、参照画面内において、subCUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれに、テンプレート領域を設定する。
 (4)インタ予測処理の流れ
 続いて、次世代コーデックにおいて検討中のインタ予測モードにおける、テンプレートマッチングによるインタ予測処理の流れについて説明する。図8は、次世代コーデックにおいて検討中のインタ予測モードにおける、テンプレートマッチングによるインタ予測処理の流れを示すフローチャートである。
 ステップS801において、イントラ/インタ予測部409は、CUレベルの動き探索処理を実行し、CUレベルの動きベクトルを決定する。
 ステップS802において、イントラ/インタ予測部409は、ステップS801において決定したCUレベルの動きベクトルに基づいて、subCUレベルの動き探索処理を実行し、subCUレベルの動きベクトルを決定する。以下、ステップS801、S802の詳細について説明する。
 ・CUレベルの動き探索処理の流れ(ステップS801)
 図9は、ステップS801を詳細化した、CUレベルの動き探索処理の流れを示すフローチャートである。
 ステップS901において、テンプレート領域設定部703は、復号中の画面内において、復号対象のCUのブロックに対して、CUレベルのテンプレート領域を設定する。
 ステップS902において、テンプレート探索点設定部710は、参照画面内において、CUレベルの複数の動きベクトル候補に応じた位置それぞれにテンプレート領域を設定する。
 ステップS903において、マッチング部706は、ステップS901において設定されたCUレベルのテンプレート領域の復号画像と、ステップS902において設定されたCUレベルのテンプレート領域の参照画像とのマッチング度を算出する。また、動きベクトル算出部707は、算出されたマッチング度のうち、最大のマッチング度を特定する。更に、動きベクトル算出部707は、特定した最大のマッチング度に対応する、CUレベルの動きベクトル候補を、CUレベルの基点となる1の動きベクトル候補に決定する。
 ステップS904において、テンプレート探索点設定部710は、CUレベルの基点となる1の動きベクトル候補に対して、CUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれにテンプレート領域を設定する。
 ステップS905において、マッチング部706は、ステップS901において設定されたCUレベルのテンプレート領域の復号画像と、CUレベルのテンプレート探索点用動きベクトルに応じた位置に設定されたテンプレート領域の参照画像とのマッチング度を算出する。
 ステップS906において、動きベクトル算出部707は、算出されたマッチング度に基づいて、CUレベルのテンプレートマッチングにおける動きベクトルを決定する。これにより、参照画面取得部705では、決定されたCUレベルの1の動きベクトルに応じた位置のCUのブロック(復号対象のCUのブロックに対応する、参照画面内のCUのブロック)を特定することができる。
 ・subCUレベルの動き探索処理の流れ(ステップS802)
 図10は、ステップS802を詳細化した、subCUレベルの動き探索処理の流れを示すフローチャートである。
 ステップS1001において、テンプレート領域設定部703は、復号中の画面内において、復号対象のsubCUに対して、subCUレベルのテンプレート領域を設定する。
 ステップS1002において、テンプレート探索点設定部710は、参照画面取得部705により特定された参照画面内のCUのブロックにおいて、subCUレベルの複数の動きベクトル候補に応じた位置それぞれにテンプレート領域を設定する。
 ステップS1003において、マッチング部706は、ステップS1001において設定されたsubCUレベルのテンプレート領域の復号画像と、ステップS1002において設定されたsubCUレベルのテンプレート領域の参照画像とのマッチング度を算出する。また、動きベクトル算出部707は、算出されたマッチング度のうち、最大のマッチング度を特定する。更に、動きベクトル算出部707は、特定した最大のマッチング度に対応する、subCUレベルの動きベクトル候補を、subCUレベルの基点となる1の動きベクトル候補に決定する。
 ステップS1004において、テンプレート探索点設定部710は、subCUレベルの基点となる1の動きベクトル候補に対して、subCUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれにテンプレート領域を設定する。
 ステップS1005において、マッチング部706は、ステップS1001において設定されたsubCUレベルのテンプレート領域の復号画像と、subCUレベルのテンプレート探索点用動きベクトルに応じた位置に設定されたテンプレート領域の参照画像とのマッチング度を算出する。
 ステップS1006において、動きベクトル算出部707は、算出されたマッチング度に基づいて、subCUレベルのテンプレートマッチングにおける動きベクトルを決定する。
 ステップS1007において、予測画像生成部708は、決定されたsubCUレベルの動きベクトルに対応する参照画像を特定し、復号対象のsubCUの予測画像として出力する。更に、予測画像生成部708は、特定した各参照画像を用いてCUのブロックの予測画像を生成し、インタ予測画像として出力する。
 なお、予測画像生成部708により出力されたsubCUの予測画像は、逆直交変換部406より得られた信号に加算され、subCUの復号画像としてループフィルタ部407に入力される。
 ステップS1008において、復号中画面取得部704は、復号中の画面内の処理対象のCUに含まれる全てのsubCUについて、予測画像を出力したか否かを判定する。ステップS1008において、予測画像を出力していないsubCUがあると判定した場合には(ステップS1008においてNOの場合には)、ステップS1001に戻る。一方、ステップS1008において、復号中の画面内の処理対象のCUに含まれる全てのsubCUについて予測画像を出力したと判定した場合には(ステップS1008においてYESの場合には)、subCUレベルの動き探索処理を終了する。
 (5)subCUごとの処理のタイミングチャート
 続いて、次世代コーデックにおいて検討中のインタ予測モードにおける、subCUごとの処理内容及び処理タイミングについて説明する。図11は、次世代コーデックにおいて検討中のインタ予測モードにおける、subCUごとの処理内容及び処理タイミングを示す図である。
 このうち、図11(a)は、復号対象の各subCUが含まれるCUのブロックの一例を示している。図11(a)の例は、復号対象のsubCUが含まれるCUのブロックが"CU"であり、当該CUのブロックには、4つのsubCU("sub0"、"sub1"、"sub2"、"sub3")が含まれることを示している。また、図11(a)の例は、"CU"に隣接する上側のCUのブロック及び左側のCUのブロックについては、いずれも、復号画像が生成されていることを示している。更に、図11(a)の例は、当該隣接するCUのブロックの復号画像の一部が、テンプレート領域1101~1112として設定されていることを示している。
 図11(b)は、"CU"に含まれる4つのsubCUについて、イントラ/インタ予測部409が処理を実行する際の処理タイミングを示した図である。図11(b)の例では、イントラ/インタ予測部409が実行する処理を、
・CUレベルの動きベクトル候補の設定と基点となる1の動きベクトル候補の決定、
・CUレベルの動きベクトルの決定、
・subCUレベルの動きベクトル候補の設定と基点となる1の動きベクトル候補の決定、
・subCUレベルの動きベクトルの決定、
・subCUレベルの予測画像の生成、
・subCUレベルの復号画像の取得、
に分けて示している。なお、図11(b)の例では、紙面の都合上、処理タイミング="T"~"Tm+6"までを示している。
 図11(b)に示すように、はじめに、処理タイミング="T"において、"CU"について、CUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、CUレベルの基点となる1の動きベクトル候補が決定される。続いて、処理タイミング="Tm+1"において、"CU"について、CUレベルの動きベクトルが決定される。
 続いて、処理タイミング"Tm+2"において、"subCU0"について、subCUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、subCUレベルの基点となる1の動きベクトル候補が決定される。続いて、処理タイミング="Tm+3"において、"subCU0"について、subCUレベルの動きベクトルが決定される。なお、"subCU0"の動きベクトルの決定に際しては、テンプレート領域1101、1111の復号画像が用いられる。
 続いて、処理タイミング="Tm+4"において、"subCU0"について予測画像が生成され、予測画像が出力される。更に、予測画像が出力されたことで復号画像が生成され、処理タイミング="Tm+5"において、"subCU0"について生成された復号画像が取得される。
 subCU0についての復号画像が取得されると、"subCU1"について、subCUレベルの動きベクトルを決定する際に用いられるテンプレート領域1131を設定することが可能となる。
 そこで、処理タイミング="Tm+5"において、"subCU0"について決定されたsubCUレベルの動きベクトルに対して、"subCU1"について、subCUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、subCUレベルの基点となる1の動きベクトル候補が決定される。その後、処理タイミング="Tm+6"において、"subCU1"について、subCUレベルの動きベクトルが決定される。なお、"subCU1"の動きベクトルの決定に際しては、テンプレート領域1102、1131の復号画像が用いられる。
 このように、次世代コーデックにおいて検討中のインタ予測モードの場合、復号対象のsubCUに隣接する上側及び左側のsubCUの復号画像が生成されていることが、subCUレベルの動きベクトルを決定する際の前提となる(図11(b)の点線矢印参照)。このため、次世代コーデックのエンコーダにおいて検討中のインタ予測モードは、処理効率が高いとはいえない。
  <4.2 第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングによるインタ予測処理>
 次に、第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングによるインタ予測処理について説明する。
 (1)復号対象の矩形領域(subCU)及びテンプレート領域の説明
 はじめに、第1の実施形態に係るエンコーダのインタ予測モードにおいて、テンプレートマッチングによるインタ予測処理を行う場合の、復号対象の矩形領域及びテンプレート領域について説明する。図12は、第1の実施形態に係るエンコーダのインタ予測モードにおける、復号対象の矩形領域及びテンプレート領域を説明するための図である。
 図5を用いて説明したとおり、第1の実施形態に係るエンコーダにおいても、入力画面(入力フレーム)500のうち、128画素×128画素のCTU510が、CUのブロックに分割される。また、当該CUのブロックについて、テンプレートマッチングによるインタ予測が行われる(図12参照)。
 CUのブロック520は、このうち、64画素×64画素に分割された正方形のブロックを拡大して示したものである。図5を用いて説明したとおり、次世代コーデックにおいては、インタ予測モードにおいて、subCU530、540、550等の矩形領域が生成され、subCUを復号対象として、subCUごとに、予測画像及び復号画像が生成される。
 ただし、第1の実施形態に係るエンコーダの場合、複数のsubCUの予測画像及び復号画像の生成を、並列して行う。このために、第1の実施形態に係るエンコーダでは、所定のブロックに隣接するブロックの一部を、テンプレート領域として設定する。所定のブロックとは、復号対象の複数のsubCUを含む復号単位のブロックであり、図12の例では、CUのブロック520を指す。
 例えば、復号対象のsubCUがsubCU530であった場合、テンプレートマッチングを行う時点で、
・復号対象のsubCU530が含まれるCUのブロック520の上側に隣接するCUのブロック、及び、
・復号対象のsubCU530が含まれるCUのブロック520の左側に隣接するCUのブロック
は、いずれも、予測画像及び復号画像の生成が完了している。そこで、第1の実施形態に係るエンコーダでは、上側と左側に隣接するCUのブロックの一部をテンプレート領域1202、1213として設定し、復号対象のsubCU530について、テンプレートマッチングを行う。
 同様に、例えば、復号対象のsubCUがsubCU540であった場合、テンプレートマッチングを行う時点で、
・復号対象のsubCU540が含まれるCUのブロック520の上側に隣接するCUのブロック、及び、
・復号対象のsubCU540が含まれるCUのブロック520の左側に隣接するCUのブロック
は、いずれも、予測画像及び復号画像の生成が完了している。そこで、第1の実施形態に係るエンコーダでは、上側と左側に隣接するCUのブロックの一部をテンプレート領域1202、1212として設定し、復号対象のsubCU540について、テンプレートマッチングを行う。つまり、subCU530とsubCU540とは、並列してテンプレートマッチングを行うことができる(なお、subCU550等についても同様である)。
 このように、復号対象のsubCUが含まれる復号単位(CU)のブロックの上側及び左側のCUのブロックの一部をテンプレート領域として設定することで、複数のsubCUについて、テンプレートマッチングを並列して実行することが可能となる。
 (2)テンプレートマッチングの概要
 続いて、第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングについて概要を説明する。図13は、第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングの概要を示す図である。
 図13において、画面620は、イントラ/インタ予測部409によって復号中の画面(フレーム)である。図13の例は、復号対象のsubCU530について、テンプレート領域1202、1213が設定された様子を示している。
 また、図13において、画面610は、復号中の画面620において設定されたテンプレート領域とのマッチングが行われる参照画面(復号中の画面620とは時間的に異なる復号画面)である。
 図13の例は、設定されたテンプレート領域1202、1213(第1のテンプレート領域)に相当する画面610内の領域として、テンプレート領域1321、1322(第2のテンプレート領域)が設定された様子を示している。
 また、図13の例は、テンプレート領域1321、1322が、画面610内で所定のベクトル分移動(ベクトル614分移動)されることで、テンプレート領域1311、1312(第3のテンプレート領域)が設定された様子を示している。
 更に、図13の例は、テンプレート領域1311、1312とテンプレート領域1202、1213との間で算出された画像のマッチング度が最大であったことで、ベクトル614が、復号対象のsubCU530の動きベクトルとして決定された様子を示している。
 このように、復号対象のsubCU530が含まれるCUのブロックに隣接するCUのブロックの復号画像の一部をテンプレート領域1202、1213として設定し、画面610内においてマッチングを行うことで、動き補償インタ予測に用いる動きベクトル614を決定することができる。
 (3)イントラ/インタ予測部の機能構成(エンコーダ)
 続いて、第1の実施形態に係るエンコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成について説明する。図14は、第1の実施形態に係るエンコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成の一例を示す図である。
 図7との相違点は、図14の場合、テンプレート領域判定部1401、テンプレート領域選択部1402を有する点である。以下、図7との相違点を中心に説明する。
 テンプレート領域判定部1401は、復号対象のsubCUが所定の実行条件を満たすか否かを判定する。また、テンプレート領域判定部1401は、所定の実行条件を満たすか否かの判定結果を、テンプレート領域設定部703に通知する。
 なお、テンプレート領域設定部703では、テンプレート領域判定部1401より、所定の実行条件を満たさない旨の判定結果が通知された場合、復号中画面取得部704に対して、図5を用いて説明したテンプレート領域を設定する。具体的には、復号対象のsubCUに隣接する上側のsubCUの復号画像の一部と、左側のsubCUの復号画像の一部とを、テンプレート領域として設定する。この場合、復号中画面取得部704は、復号中の画面に含まれる復号画像のうち、テンプレート領域設定部703により設定されたテンプレート領域の復号画像(隣接するsubCUの復号画像の一部)をテンプレート領域選択部1402に通知する。
 一方、テンプレート領域判定部1401より、所定の実行条件を満たす旨の判定結果が通知された場合には、テンプレート領域設定部703は、復号中画面取得部704に対して、図12を用いて説明したテンプレート領域を設定する。
 具体的には、テンプレート領域設定部703は、復号対象のsubCUが含まれるCUのブロックを特定し、特定したCUのブロックの上側及び左側に隣接するCUのブロックの復号画像の一部を、テンプレート領域として設定する。この場合、復号中画面取得部704は、復号中の画面に含まれる復号画像のうち、テンプレート領域設定部703により設定されたテンプレート領域の復号画像(隣接するCUのブロックの復号画像の一部)をテンプレート領域選択部1402に通知する。
 テンプレート領域選択部1402は、所定の実行条件を満たさない旨の判定結果が通知されると、復号中画面取得部704より通知されたテンプレート領域の復号画像(隣接するsubCUの復号画像の一部)を選択する。また、テンプレート領域選択部1402は、選択したテンプレート領域の復号画像を、マッチング部706に通知する。これにより、マッチング部706では、復号対象のsubCUについて、テンプレート領域判定部1401より通知された判定結果に応じたテンプレート領域の復号画像を用いて、参照画面内においてテンプレートマッチングを行うことができる。
 また、テンプレート領域選択部1402は、所定の実行条件を満たす旨の判定結果が通知されると、復号中画面取得部704より通知されたテンプレート領域の復号画像(隣接するCUのブロックの復号画像の一部)を選択する。また、テンプレート領域選択部1402は、選択したテンプレート領域の復号画像を、マッチング部706に通知する。これにより、マッチング部706では、復号対象のsubCUについて、テンプレート領域判定部1401より通知された判定結果に応じたテンプレート領域の復号画像を用いて、参照画面内においてテンプレートマッチングを行うことができる。
 (4)実行条件情報
 続いて、復号対象のsubCUについてテンプレートマッチングが実行される際に、テンプレート領域判定部1401が判定するテンプレートマッチングの実行条件について説明する。図15は、第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングの実行条件を示す図である。
 図15に示すように、実行条件情報1500は、情報の項目として、"実行条件の判定項目"、"判定項目の閾値"、"判定理由"を含む。
 "実行条件の判定項目"には、復号対象のsubCUについて、実行条件を満たすか否かを判定するための判定項目が格納される。
 "判定項目の閾値"には、"実行条件の判定項目"に格納された各判定項目について、実行条件を満たすと判定するための閾値が格納される。"判定理由"には、実行条件を満たすと判定する理由が格納される。
 図15の例は、"実行条件の判定項目"として、"subCUのサイズ"が含まれ、復号対象のsubCUのサイズが所定の閾値以下("8画素×8画素以下")であった場合には、実行条件を満たすと判定することを示している。subCUのサイズが小さい場合、隣接するsubCUについて予測画像及び復号画像の生成が完了しないかぎり、次のsubCUの処理に進めないとすると、エンコーダの処理効率が低下するからである。
 そこで、第1の実施形態に係るエンコーダでは、所定のサイズ以下のsubCUが復号対象であった場合には、当該subCUが含まれるCUのブロックに隣接するCUのブロックの復号画像の一部をテンプレート領域として設定する。これにより、第1の実施形態に係るエンコーダでは、複数のsubCUについてテンプレートマッチングを並列に行う並列処理を実現することができる。
 また、図15の例は、"実行条件の判定項目"として、"ピクチャタイプ"が含まれ、復号対象のsubCUのピクチャタイプが"非参照画面であること"に該当する場合に、実行条件を満たすと判定することを示している。ピクチャタイプが非参照画面であった場合には、テンプレートマッチングにおいて、他の復号中の画面によって参照される画面に該当しない。これは、復号対象のsubCUから離れた領域をテンプレート領域にすることで、符号化誤差が増加しても、その復号画面は参照されないため、符号化誤差自体は累積されない、ということを考慮したものである。
 そこで、第1の実施形態に係るエンコーダでは、非参照画面のsubCUが復号対象であった場合には、当該subCUが含まれるCUのブロックに隣接するCUのブロックの復号画像の一部をテンプレート領域として設定する。これにより、第1の実施形態に係るエンコーダでは、複数のsubCUについてテンプレートマッチングを並列に行う並列処理を実現することができる。
 このように、実行条件情報1500に定義された実行条件を満たす場合に、並列処理を実行することで、画質に影響を与えることなく、処理効率を向上させることが可能となる。
 (5)インタ予測処理の流れ(subCUレベルの動き探索処理の流れ)
 続いて、第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングによるインタ予測処理の流れについて説明する。なお、第1の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングによるインタ予測処理の全体の流れは、図8と同じであるため、ここでは説明を省略する。
 また、第1の実施形態に係るエンコーダのインタ予測モードの場合、図8の各工程のうち、図9において詳細を説明した、図8のステップS801(CUレベルの動き探索処理)の流れも同じである。このため、ここでは説明を省略し、図8の各工程のうちステップS802(subCUレベルの動き探索処理)について説明する。
 図16は、第1の実施形態に係るエンコーダのインタ予測モードにおける、subCUレベルの動き探索処理の流れを示すフローチャートである。図10との相違点は、ステップS1601からステップS1603である。
 ステップS1601において、テンプレート領域判定部1401は、復号対象のsubCUが実行条件情報1500に示す実行条件を満たすか否かを判定する。ステップS1601において、実行条件を満たすと判定した場合には(ステップS1601においてYESの場合には)、ステップS1602に進む。
 ステップS1602において、テンプレート領域設定部703は、復号対象のsubCUが含まれるCUのブロックに隣接するCUのブロックの復号画像の一部を、テンプレート領域として設定する。
 一方、ステップS1601において、実行条件を満たさないと判定した場合には(ステップS1601においてNOの場合には)、ステップS1603に進む。ステップS1603において、テンプレート領域設定部703は、復号対象のsubCUに隣接するsubCUの復号画像の一部を、テンプレート領域として設定する。
 (6)subCUごとの処理のタイミングチャート
 続いて、第1の実施形態に係るエンコーダのインタ予測モードにおける、subCUごとの処理内容及び処理タイミングについて説明する。図17は、第1の実施形態に係るエンコーダのインタ予測モードにおける、subCUごとの処理内容及び処理タイミングを示す図である。
 このうち、図17(a)は、復号対象の各subCUが含まれるCUのブロックの一例を示している。図17(a)の例は、復号対象のsubCUが含まれるCUのブロックが"CU"であり、当該CUのブロックには、4つのsubCU("sub0"、"sub1"、"sub2"、"sub3")の領域が含まれることを示している。また、図17(a)の例は、"CU"に隣接する上側のCUのブロック及び左側のCUのブロックについては、いずれも、復号画像が生成されていることを示している。また、図17(a)の例は、当該隣接するCUのブロックの復号画像の一部が、テンプレート領域1101~1112として設定されていることを示している。
 図17(b)は、"CU"に含まれる4つのsubCUについて、イントラ/インタ予測部409が処理を実行する際の処理タイミングを示した図である。図11(b)同様、図17(b)の例では、イントラ/インタ予測部409が実行する処理を、
・CUレベルの動きベクトル候補の設定と基点となる1の動きベクトル候補の決定、
・CUレベルの動きベクトルの決定、
・subCUレベルの動きベクトル候補の設定と基点となる1の動きベクトル候補の決定、
・subCUレベルの動きベクトルの決定、
・subCUレベルの予測画像の生成、
・subCUレベルの復号画像の取得、
に分けて示している。なお、図11(b)の例では、紙面の都合上、処理タイミング="T"~"Tm+7"までを示している。また、ここでは、復号対象のsubCUが、実行条件情報1500に定義された実行条件を満たしているものとして説明する。
 図17(b)に示すように、処理タイミング="T"において、"CU"について、CUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、CUレベルの基点となる1の動きベクトル候補が決定される。続いて、処理タイミング="Tm+1"において、"CU"について、CUレベルの動きベクトルが決定される。
 続いて、処理タイミング"Tm+2"において、"subCU0"~"subCU3"について、subCUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、subCUレベルの基点となる1の動きベクトル候補の決定が並列に実行される。続いて、処理タイミング="Tm+3"において、"subCU0"~"subCU3"について、subCUレベルの動きベクトルの決定が並列に実行される。
 なお、"subCU0"についてのsubCUレベルの動きベクトルは、テンプレート領域1101、1111の復号画像を用いたテンプレートマッチングにより決定される。また、"subCU1"についてのsubCUレベルの動きベクトルは、テンプレート領域1102、1111の復号画像を用いたテンプレートマッチングにより決定される。また、"subCU2"についてのsubCUレベルの動きベクトルは、テンプレート領域1101、1112の復号画像を用いたテンプレートマッチングにより決定される。更に、"subCU3"についてのsubCUレベルの動きベクトルは、テンプレート領域1102、1112の復号画像を用いたテンプレートマッチングにより決定される。
 "subCU0"~"subCU3"それぞれのsubCUレベルの動きベクトルが決定されると、"CU"の次のCUのブロックである、"CUn+1"についての処理に移行し、CUレベルの動きベクトル候補の設定と基点となる1の動きベクトル候補の決定とが行われる。
 具体的には、まず、処理タイミング="Tm+4"において、"CUn+1"について、CUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、CUレベルの基点となる1の動きベクトル候補が決定される。続いて、処理タイミング="Tm+5"において、"CUn+1"について、CUレベルの動きベクトルが決定される。
 また、処理タイミング="Tm+4"では、並行して、"subCU0"~"subCU3"の予測画像が生成され、出力される。"subCU0"~"subCU3"それぞれについては、既にsubCUレベルの動きベクトルが決定されているため、予測画像の生成を並列に実行することができる。
 更に、予測画像が出力されることで、復号画像が生成され、処理タイミング="Tm+5"において、"subCU0"~"subCU3"それぞれについて生成された復号画像が取得される。"subCU0"~"subCU3"それぞれについては、既に予測画像が出力されているため、復号画像の取得を並列に実行することができる。
 "subCU0"~"subCU3"それぞれの復号画像が取得されると、"CU"の次のCUのブロックである、"CUn+1"に含まれるsubCUについて、動きベクトルを決定することが可能となる。
 そこで、まず、処理タイミング="Tm+6"において、"CUn+1"についてのCUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、subCUレベルの基点となる1の動きベクトル候補が決定される。その後、処理タイミング="Tm+7"において、"subCU0"~"subCU3"について、subCUレベルの動きベクトルの決定が並列に実行される。
 このように、第1の実施形態に係るエンコーダによれば、複数のsubCUについての並列処理が実行可能となるため、処理効率を向上させることができる。この結果、処理タイミング="T"~"Tm+5"の間に、"CU"に含まれる4つのsubCUについて復号画像を生成することができる。
 (7)並列処理の具体例(その1)
 続いて、第1の実施形態に係るエンコーダのインタ予測モードにおいて、複数のsubCUについて実行される並列処理の具体例について説明する。図18は、第1の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第1の図である。図18の例は、128画素×128画素のCTU510を分割することで生成された、8画素×8画素のCUのブロック1800に含まれるsubCUについて実行される並列処理を示している(subCUのサイズが4画素×4画素であるため、並列処理が実行される)。
 図18の例では、CUのブロック1800を4つのsubCUに分けている。また、図18の例では、4つのsubCUそれぞれについて、CUのブロック1800の上側及び左側に隣接するCUのブロックの復号画像の一部を、テンプレート領域1801、1802、1811、1812として設定している。これにより、CUのブロック1800に含まれる4つのsubCUについて並列処理を実行することが可能となる。
 (8)並列処理の具体例(その2)
 図19は、第1の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第2の図である。図19の例は、128画素×128画素のCTU510を分割することで生成された、64画素×64画素のCUのブロック1900に含まれるsubCUについて実行される並列処理を示している(ピクチャタイプが非参照画像であることで並列処理が実行されるものとする)。
 図19の例では、CUのブロック1900を16個のsubCUに分けている。また、図19の例では、16個のsubCUそれぞれについて、CUのブロック1900の上側及び左側に隣接するCUのブロックの復号画像の一部を、テンプレート領域1901~1904、1911~1914として設定している。これにより、CUのブロック1900に含まれる16個のsubCUについて並列処理を実行することが可能となる。
 (9)並列処理の具体例(その3)
 図20は、第1の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第3の図である。図20の例は、128画素×128画素のCTU510を分割することで生成された、8画素×4画素のCUのブロック2001~2004を処理する場合を示している。
 図20の例では、CUのブロック2001~2004それぞれを、2つのsubCUに分けている。このため、subCUのサイズが4画素×4画素となり、2つのsubCUについて並列処理が実行される。
 符号2010は、CUのブロック2001~2004に含まれる各subCUについて、テンプレート領域を設定していく様子を時系列で示したものであり、下から上に向かって時間軸が進むことを示している。
 符号2010に示すように、CUのブロック2001に含まれる2つのsubCUそれぞれについて、CUのブロック2001の上側及び左側に隣接するCUの復号画像の一部が、テンプレート領域2011、2012、2021として設定される。これにより、CUのブロック2001に含まれる2つのsubCUについて並列処理を実行することが可能となる。
 CUのブロック2001に含まれる2つのsubCUが並列処理されることで、当該subCUについて復号画像が生成されると、続いて、CUのブロック2002の処理に移行する。具体的には、CUのブロック2002に含まれる2つのsubCUについて、CUのブロック2002の上側及び左側に隣接するCUのブロック(CUのブロック2001)の復号画像の一部が、テンプレート領域2013、2014、2022として設定される。これにより、CUのブロック2002に含まれる2つのsubCUについて並列処理を実行することが可能となる。
 CUのブロック2002に含まれる2つのsubCUが並列処理されることで、当該subCUについて復号画像が生成されると、続いて、CUのブロック2003の処理に移行する。具体的には、CUのブロック2003に含まれる2つのsubCUについて、CUのブロック2003の上側及び左側に隣接するCUのブロック(CUのブロック2002)の復号画像の一部が、テンプレート領域2015、2016、2023として設定される。これにより、CUのブロック2003に含まれる2つのsubCUについて並列処理を実行することが可能となる。
 CUのブロック2003に含まれる2つのsubCUが並列処理されることで、当該subCUについて復号画像が生成されると、続いて、CUのブロック2004の処理に移行する。具体的には、CUのブロック2004に含まれる2つのsubCUについて、CUのブロック2004の上側及び左側に隣接するCUのブロック(CUのブロック2003)の復号画像の一部が、テンプレート領域2017、2018、2024として設定される。これにより、CUのブロック2004に含まれる2つのsubCUについて並列処理を実行することが可能となる。
 <5.デコーダの機能構成>
 次に、復号プログラムを実行することで実現される、デコーダ120の機能構成について説明する。図21は、デコーダの機能構成の一例を示す図である。図21に示すように、デコーダ120は、エントロピ復号部2101、逆量子化部2102、逆直交変換部2103、ループフィルタ部2104、復号画像記憶部2105、イントラ/インタ予測部2106を有する。
 エントロピ復号部2101は、受信したデータストリームを復号し、量子化信号を出力する。また、エントロピ復号部2101は、データストリームより付帯情報を抽出し、イントラ/インタ予測部2106に通知する。
 逆量子化部2102は、量子化信号を逆量子化し、逆直交変換部2103に出力する。逆直交変換部2103は、逆量子化された量子化信号に対して逆直交変換処理を実行することで、予測残差信号を得る。
 逆直交変換部2103により得られた予測残差信号には、例えば、イントラ/インタ予測部2106が各CUのブロックについて生成した予測画像が加算される。これにより、各CUのブロックの復号画像が生成され、ループフィルタ部2104に入力される。
 ループフィルタ部2104は、入力された復号画像の符号化ノイズを低減するフィルタ処理を行う。
 また、ループフィルタ部2104は、フィルタ処理した復号画像を復号結果として出力するとともに、復号画像記憶部2105に記憶する。
 イントラ/インタ予測部2106は、復号中の画面内の復号画像を用いて予測画像を生成するイントラ予測(画面内予測)を行う。また、イントラ/インタ予測部2106は、参照画面内の復号画像を用いて画面間で動き補償を行い、予測画像を生成する動き補償インタ予測(画面間予測)を行う。
 更に、イントラ/インタ予測部2106は、イントラ予測により生成された予測画像または動き補償インタ予測により生成された予測画像のいずれか一方を出力する。出力された予測画像は、逆直交変換部2103により得られた予測残差信号に加算されることで復号画像が生成され、ループフィルタ部2104に入力される。
 <6.デコーダのイントラ/インタ予測部の詳細>
 続いて、デコーダのイントラ/インタ予測部2106における、テンプレートマッチングによるインタ予測処理の詳細について説明する。なお、デコーダの場合も、以下では、まず、対比として次世代コーデックにおいて検討中のインタ予測モードにおける、テンプレートマッチングによるインタ予測処理について説明する(以下、<6.1>参照)。続いて、第1の実施形態に係るデコーダのインタ予測モードにおける、テンプレートマッチングによるインタ予測処理について説明する(以下、<6.2>参照)。
  <6.1 次世代コーデックにおいて検討中のインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するためのイントラ/インタ予測部の機能構成(デコーダ)>
 図22は、次世代コーデックにおいて検討中のインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成(デコーダ)の一例を示す図である。
 図22に示すように、次世代コーデックのデコーダにおいて検討中のインタ予測モードの場合、イントラ/インタ予測部2106は、テンプレート領域設定部2201、復号中画面取得部2202、参照画面取得部2203を有する。また、イントラ/インタ予測部2106は、マッチング部2204、動きベクトル算出部2205、予測画像生成部2207、動きベクトル格納部2208、テンプレート探索点設定部2209を有する。
 テンプレート領域設定部2201は第1の設定手段の一例である。テンプレート領域設定部2201は、CUレベルの動き探索にあっては、復号中画面取得部2202が取得した復号中の画面において、復号対象のCUのブロックに対して、CUレベルのテンプレート領域を設定する。また、テンプレート領域設定部2201は、subCUレベルの動き探索にあっては、復号中画面取得部2202が取得した復号中の画面において、復号対象のsubCUに対して、subCUレベルのテンプレート領域を設定する。
 更に、テンプレート領域設定部2201は、CUレベルの動き探索にあっては、参照画面取得部2203が取得した参照画面内において、復号対象のCUのブロックについて設定されたCUレベルのテンプレート領域に相当するテンプレート領域を設定する。また、テンプレート領域設定部2201は、subCUレベルの動き探索にあっては、参照画面取得部2203が取得した参照画面内において、復号対象のsubCUについて設定されたsubCUレベルのテンプレート領域に相当するテンプレート領域を設定する。
 復号中画面取得部2202は取得手段の一例である。復号中画面取得部2202は、復号画像記憶部2105より、復号中の画面を読み出す。また、復号中画面取得部2202は、CUレベルの動き探索にあっては、復号対象のCUのブロックについて、テンプレート領域設定部2201により設定されたCUレベルのテンプレート領域の復号画像を、マッチング部2204に通知する。
 更に、復号中画面取得部2202は、subCUレベルの動き探索にあっては、復号対象のsubCUについて、テンプレート領域設定部2201により設定されたsubCUレベルのテンプレート領域の復号画像を、マッチング部2204に通知する。
 参照画面取得部2203は第2の設定手段の一例である。参照画面取得部2203は、復号画像記憶部2105に記憶された復号画面のうち、所定の復号画面(時間的に異なる復号画面)を参照画面として読み出す。
 また、参照画面取得部2203は、読み出した参照画面内において、テンプレート探索点設定部2209により設定されたCUレベルのテンプレート領域の参照画像を抽出する。
 なお、テンプレート探索点設定部2209では、テンプレート領域設定部2201により設定された参照画面内のCUレベルのテンプレート領域に対して、CUレベルの複数の動きベクトル候補に応じた位置それぞれに、テンプレート領域を設定する。そして、参照画面取得部2203は、複数の動きベクトル候補に応じた位置に設定されたCUレベルのテンプレート領域の参照画像を抽出して、マッチング部2204に通知する。
 また、テンプレート探索点設定部2209では、CUレベルの1の動きベクトル候補に対して、CUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれにテンプレート領域を設定する。CUレベルのテンプレート探索点用動きベクトルとは、CUレベルの基点となる1の動きベクトル候補の周辺位置の動きベクトルである。そして、参照画面取得部2203は、テンプレート探索点用動きベクトルに応じた位置に設定されたCUレベルのテンプレート領域の参照画像を抽出して、マッチング部2204に通知する。
 また、参照画面取得部2203は、テンプレート探索点設定部2209により設定されたCUレベルの1のテンプレート探索点用動きベクトル(決定されたCUレベルの1の動きベクトル)に応じた位置のCUのブロックを、参照画面内において特定する。
 また、参照画面取得部2203は、特定した参照画面内のCUのブロックから、テンプレート探索点設定部2209により設定されたsubCUレベルのテンプレート領域の参照画像を抽出する。
 なお、テンプレート探索点設定部2209は、特定した参照画面内のCUのブロックにおいて、テンプレート領域設定部2201により設定されたsubCUレベルのテンプレート領域に対して、subCUレベルの複数の動きベクトル候補に応じた位置それぞれに、テンプレート領域を設定する。そして、参照画面取得部2203は、複数の動きベクトル候補に応じた位置に設定されたsubCUレベルのテンプレート領域の参照画像を抽出して、マッチング部2204に通知する。
 また、テンプレート探索点設定部2209では、subCUレベルの1の動きベクトル候補に対して、subCUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれにテンプレート領域を設定する。subCUレベルのテンプレート探索点用動きベクトルとは、subCUレベルの基点となる1の動きベクトル候補の周辺位置の複数の動きベクトルである。そして、参照画面取得部2203は、テンプレート探索点用動きベクトルに応じた位置に設定されたsubCUレベルのテンプレート領域の参照画像を抽出して、マッチング部2204に通知する。
 マッチング部2204は算出手段の一例である。マッチング部2204は、CUレベルの動き探索にあっては、復号中画面取得部2202より通知された、CUレベルのテンプレート領域の復号画像と、参照画面取得部2203より通知された、CUレベルのテンプレート領域の参照画像とのマッチング度を算出する。
 なお、参照画面取得部2203より通知されるCUレベルのテンプレート領域の参照画像には、CUレベルの複数の動きベクトル候補に基づいて抽出された参照画像と、CUレベルのテンプレート探索点用動きベクトルに基づいて抽出された参照画像とが含まれる。マッチング部2204では、算出したそれぞれのマッチング度を動きベクトル算出部2205に通知する。
 また、マッチング部2204は、subCUレベルの動き探索にあっては、subCUレベルのテンプレート領域の復号画像と、subCUレベルのテンプレート領域の参照画像とのマッチング度を算出する。
 なお、subCUレベルのテンプレート領域の復号画像は、復号中画面取得部2202より通知される。また、subCUレベルのテンプレート領域の参照画像は、参照画面取得部2203より通知される。参照画面取得部2203より通知されるsubCUレベルのテンプレート領域の参照画像には、subCUレベルの複数の動きベクトル候補に基づいて抽出された参照画像と、subCUレベルのテンプレート探索点用動きベクトルに基づいて抽出された参照画像とが含まれる。マッチング部2204では、算出したそれぞれのマッチング度を動きベクトル算出部2205に通知する。
 動きベクトル算出部2205は決定手段の一例である。動きベクトル算出部2205は、マッチング部2204より通知されたマッチング度のうち、CUレベルの複数の動きベクトル候補に応じた位置に設定されたテンプレート領域の参照画像とのマッチング度の中から、最大のマッチング度を特定する。
 また、動きベクトル算出部2205は、特定した最大のマッチング度に対応する、CUレベルの動きベクトル候補を、CUレベルの基点となる1の動きベクトル候補として、動きベクトル格納部2208に格納する。
 また、動きベクトル算出部2205は、CUレベルの基点となる1の動きベクトル候補を動きベクトル格納部2208に格納したことに応じて、マッチング部2204より通知されたCUレベルのマッチング度を取得する。このとき動きベクトル算出部2205が取得するマッチング度は、CUレベルのテンプレート探索点用動きベクトル(CUレベルの基点となる1の動きベクトル候補の周辺の複数の動きベクトル)に応じた位置に設定されたテンプレート領域の参照画像とのマッチング度である。
 更に、動きベクトル算出部2205は、取得したマッチング度に基づいて、CUレベルのテンプレートマッチングにおける動きベクトルを決定し、決定したCUレベルの動きベクトルを動きベクトル格納部2208に格納する。
 また、動きベクトル算出部2205は、決定したCUレベルの動きベクトルを動きベクトル格納部2208に格納したことに応じて、マッチング部2204より通知されたsubCUレベルのマッチング度を取得する。また、動きベクトル算出部2205は、取得したマッチング度のうち、subCUレベルの複数の動きベクトル候補に応じた位置に設定されたテンプレート領域の参照画像とのマッチング度の中から、最大のマッチング度を特定する。
 また、動きベクトル算出部2205は、特定した最大のマッチング度に対応する、subCUレベルの1の動きベクトル候補を、subCUレベルの基点となる1の動きベクトル候補として、動きベクトル格納部2208に格納する。
 また、動きベクトル算出部2205は、subCUレベルの基点となる1の動きベクトル候補を動きベクトル格納部2208に格納したことに応じて、マッチング部2204より通知されたsubCUレベルのマッチング度を取得する。このとき動きベクトル算出部2205が取得するマッチング度は、subCUレベルのテンプレート探索点用動きベクトル(subCUレベルの基点となる1の動きベクトル候補の周辺の複数の動きベクトル)に応じた位置に設定されたテンプレート領域の参照画像とのマッチング度である。更に、動きベクトル算出部2205は、取得したマッチング度に基づいて、subCUレベルのテンプレートマッチングにおける動きベクトルを決定し、予測画像生成部2207に通知する。
 予測画像生成部2207は生成手段の一例である。予測画像生成部2207は、参照画面取得部2203より通知された参照画面内において、動きベクトル算出部2205より順次通知された、決定されたsubCUレベルの動きベクトルに対応する参照画像を特定する。更に、予測画像生成部2207は、特定した各参照画像を用いてsubCUの予測画像を生成し、出力する。
 動きベクトル格納部2208は、CUレベルの基点となる1の動きベクトル候補を格納する。また、動きベクトル格納部2208は、決定したCUレベルの動きベクトルを格納する。また、動きベクトル格納部2208は、subCUレベルの基点となる1の動きベクトル候補を格納する。
 テンプレート探索点設定部2209は、テンプレート領域設定部2201により設定された参照画面内のCUレベルのテンプレート領域に対して、CUレベルの複数の動きベクトル候補に応じた位置それぞれに、テンプレート領域を設定する。
 また、テンプレート探索点設定部2209は、動きベクトル格納部2208に格納された、CUレベルの基点となる1の動きベクトル候補に基づいて、CUレベルのテンプレート探索点用動きベクトルを決定する。また、テンプレート探索点設定部2209は、参照画面内において、CUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれに、テンプレート領域を設定する。
 また、テンプレート探索点設定部2209は、特定された参照画面内のCUのブロックにおいて、テンプレート領域設定部2201により設定されたsubCUレベルのテンプレート領域に対して、subCUレベルの複数の動きベクトル候補に応じた位置それぞれに、テンプレート領域を設定する。
 また、テンプレート探索点設定部2209は、動きベクトル格納部2208に格納された、subCUレベルの基点となる1の動きベクトル候補に基づいて、subCUレベルのテンプレート探索点用動きベクトルを決定する。また、テンプレート探索点設定部2209は、参照画面内において、subCUレベルのテンプレート探索点用動きベクトルに応じた位置それぞれに、テンプレート領域を設定する。
  <6.2 第1の実施形態に係るデコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するためのイントラ/インタ予測部の機能構成>
 続いて、第1の実施形態に係るデコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成について説明する。図23は、第1の実施形態に係るデコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成の一例を示す図である。
 図22との相違点は、図23の場合、テンプレート領域判定部2301、テンプレート領域選択部2302を有する点である。以下、図22との相違点を中心に説明する。
 テンプレート領域判定部2301は、復号対象のsubCUが所定の実行条件を満たすか否かを判定する。また、テンプレート領域判定部2301は、所定の実行条件を満たすか否かの判定結果を、テンプレート領域設定部2201に通知する。
 なお、テンプレート領域設定部2201では、テンプレート領域判定部2301より、所定の実行条件を満たさない旨の判定結果が通知された場合、復号中画面取得部2202に対して、図5を用いて説明したテンプレート領域を設定する。具体的には、復号対象のsubCUに隣接する上側のsubCUの復号画像の一部と、左側のsubCUの復号画像の一部を、テンプレート領域として設定する。この場合、復号中画面取得部2202は、復号中の画面に含まれる復号画像のうち、テンプレート領域設定部2201により設定されたテンプレート領域の復号画像(隣接するsubCUの復号画像の一部)をテンプレート領域選択部2302に通知する。
 一方、テンプレート領域判定部2301より、所定の実行条件を満たす旨の判定結果が通知された場合には、テンプレート領域設定部2201は、復号中画面取得部2202に対して、図12を用いて説明したテンプレート領域を設定する。
 具体的には、テンプレート領域設定部2201は、復号対象のsubCUが含まれるCUのブロックを特定し、特定したCUのブロックの上側及び左側に隣接するCUのブロックの復号画像の一部を、テンプレート領域として設定する。この場合、復号中画面取得部2202は、復号中の画面に含まれる復号画像のうち、テンプレート領域設定部2201により設定されたテンプレート領域の復号画像(隣接するCUのブロックの復号画像の一部)をテンプレート領域選択部2302に通知する。
 テンプレート領域選択部2302は、所定の実行条件を満たさない旨の判定結果が通知されると、復号中画面取得部2202より通知されたテンプレート領域の復号画像(隣接するsubCUの復号画像の一部)を選択する。また、テンプレート領域選択部2302は、選択したテンプレート領域の復号画像を、マッチング部2204に通知する。これにより、マッチング部2204では、復号対象のsubCUについて、テンプレート領域判定部2301より通知された判定結果に応じたテンプレート領域の復号画像を用いて、参照画面内においてテンプレートマッチングを行うことができる。
 また、テンプレート領域選択部2302は、所定の実行条件を満たす旨の判定結果が通知されると、復号中画面取得部2202より通知されたテンプレート領域の復号画像(隣接するCUのブロックの復号画像の一部)を選択する。また、テンプレート領域選択部2302は、選択したテンプレート領域の復号画像を、マッチング部2204に通知する。これにより、マッチング部2204では、復号対象のsubCUについて、テンプレート領域判定部2301より通知された判定結果に応じたテンプレート領域の復号画像を用いて、参照画面内においてテンプレートマッチングを行うことができる。
 <7.まとめ>
 以上の説明から明らかなように、第1の実施形態に係るエンコーダのイントラ/インタ予測部では、インタ予測モードにおいてテンプレートマッチングによるインタ予測処理を実行する際、
・復号単位(CU)のブロックを複数の矩形領域(subCU)に分ける。
・復号対象の矩形領域が所定の実行条件を満たすか否かを判定し、所定の実行条件を満たすと判定した場合には、当該矩形領域が含まれる復号単位のブロックに隣接するブロックの復号画像の一部を、テンプレート領域として設定する。
・設定したテンプレート領域を用いて、復号単位のブロックに含まれる全ての矩形領域について、並列処理によりテンプレートマッチングを行い、各矩形領域の予測画像を出力する。
 これにより、第1の実施形態に係るエンコーダによれば、テンプレートマッチングによるインタ予測において、処理効率を向上させることができる。
 また、第1の実施形態に係るデコーダのイントラ/インタ予測部では、インタ予測モードにおいてテンプレートマッチングによるインタ予測処理を実行する際、
・復号単位(CU)のブロックを複数の矩形領域(subCU)に分ける。
・復号対象の矩形領域が所定の実行条件を満たすか否かを判定し、所定の実行条件を満たすと判定した場合には、当該矩形領域が含まれる復号単位のブロックに隣接するブロックの復号画像の一部を、テンプレート領域として設定する。
・設定したテンプレート領域を用いて、復号単位のブロックに含まれる全ての矩形領域について、並列処理によりテンプレートマッチングを行い、各矩形領域の予測画像を出力する。
 これにより、第1の実施形態に係るデコーダによれば、テンプレートマッチングによるインタ予測において、処理効率を向上させることができる。
 [第2の実施形態]
 上記第1の実施形態では、復号対象のsubCUが含まれる復号単位のブロックに隣接するブロックの復号画像の一部を、テンプレート領域として設定することで、処理効率の向上を実現した。これに対して、第2の実施形態では、復号対象のsubCUに隣接するsubCUの予測画像の一部を、テンプレート領域として設定することで、処理効率の向上を実現する。以下、第2の実施形態について、上記第1の実施形態との相違点を中心に説明する。
 <1.第2の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングによるインタ予測処理>
 (1)復号対象の矩形領域(subCU)及びテンプレート領域の説明
 はじめに、第2の実施形態に係るエンコーダのインタ予測モードにおいて、テンプレートマッチングによるインタ予測処理を実行する場合の、復号対象の矩形領域及びテンプレート領域について説明する。図24は、第2の実施形態に係るエンコーダのインタ予測モードにおける、復号対象の矩形領域及びテンプレート領域を説明するための図である。
 図12を用いて説明したとおり、第2の実施形態に係るエンコーダにおいても、入力画面(入力フレーム)500のうち、128画素×128画素のCTU510が、CUのブロックに分割される。また、当該CUのブロックについて、インタ予測処理が行われる(図24参照)。
 CUのブロック520は、64画素×64画素に分割された正方形のブロックを拡大して示したものである。図12を用いて説明したとおり、次世代コーデックにおいては、インタ予測モードにおいて、subCU530、540、550等の矩形領域が生成され、subCUを復号対象として、subCUごとに、予測画像及び復号画像が生成される。
 第1の実施形態と同様に、第2の実施形態に係るエンコーダも、複数のsubCUの予測画像及び復号画像の生成を、並列して行う。このために、第2の実施形態に係るエンコーダでは、復号対象のsubCUに隣接するsubCUの予測画像の一部を、テンプレート領域として設定する。
 図24に示すように、例えば、復号対象のsubCUがsubCU530であった場合、テンプレートマッチングは、
・復号対象のsubCU530に隣接する上側のsubCU540の予測画像の一部、
・復号対象のsubCU530に隣接する左側のsubCU550の予測画像の一部、
を、テンプレート領域として用いて行う。具体的には、テンプレート領域2401、2402の予測画像を用いて、復号対象のsubCU530について、テンプレートマッチングを行う。
 このように、復号対象のsubCUに隣接するsubCUの予測画像の一部をテンプレート領域として設定することで、復号対象のsubCUのテンプレートマッチングを、隣接するsubCUの処理と並列して実行することが可能となる。
 (2)イントラ/インタ予測部の機能構成(エンコーダ)
 続いて、第2の実施形態に係るエンコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成について説明する。図25は、第2の実施形態に係るエンコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成の一例を示す図である。
 図14との相違点は、図25の場合、予測画像取得部2501を有する点である。以下、図14との相違点を中心に説明する。
 予測画像取得部2501は、予測画像生成部708により生成された、復号対象のsubCUに隣接するsubCUの予測画像を取得する。具体的には、予測画像取得部2501は、テンプレート領域設定部703より設定されたテンプレート領域(復号対象のsubCUに隣接するsubCUの位置に設定されたテンプレート領域)の予測画像を取得する。また、予測画像取得部2501は、取得したテンプレート領域の予測画像を、テンプレート領域選択部1402に通知する。
 なお、テンプレート領域設定部703は、テンプレート領域判定部1401から、所定の実行条件を満たす旨の判定結果が通知された場合には、予測画像取得部2501に対して、図24を用いて説明したテンプレート領域を設定する。
 具体的には、テンプレート領域設定部703は、復号対象のsubCUの上側に隣接するsubCUの予測画像の一部と、左側に隣接するsubCUの予測画像の一部とを、テンプレート領域として設定する。この場合、予測画像取得部2501は、予測画像生成部708により生成された予測画像のうち、テンプレート領域設定部703により設定されたテンプレート領域の予測画像(隣接するsubCUの予測画像の一部)をテンプレート領域選択部1402に通知する。
 テンプレート領域選択部1402は、所定の実行条件を満たさない旨の判定結果が通知されると、復号中画面取得部704より通知されたテンプレート領域の復号画像(隣接するsubCUの復号画像の一部)を選択する。また、テンプレート領域選択部1402は、選択したテンプレート領域の復号画像を、マッチング部706に通知する。これにより、マッチング部706では、復号対象のsubCUについて、テンプレート領域判定部1401より通知された判定結果に応じたテンプレート領域の復号画像を用いて、参照画面内においてテンプレートマッチングを行うことができる。
 また、テンプレート領域選択部1402は、所定の実行条件を満たす旨の判定結果が通知されると、予測画像取得部1403より通知されたテンプレート領域の予測画像(隣接するsubCUの予測画像の一部)を選択する。また、テンプレート領域選択部1402は、選択したテンプレート領域の予測画像を、マッチング部706に通知する。これにより、マッチング部706では、復号対象のsubCUについて、テンプレート領域判定部1401より通知された判定結果に応じたテンプレート領域の予測画像を用いて、参照画面内においてテンプレートマッチングを行うことができる。
 (3)実行条件情報
 続いて、復号対象のsubCUについてテンプレートマッチングが実行される際に、テンプレート領域判定部1401が判定するテンプレートマッチングの実行条件について説明する。図26は、第2の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングの実行条件を示す図である。
 図26に示すように、実行条件情報2600は、情報の項目として、"実行条件の判定項目"、"判定項目の閾値"、"判定理由"を含む。
 "実行条件の判定項目"には、復号対象のsubCUについて、実行条件を満たすか否かを判定するための判定項目が格納される。
 "判定項目の閾値"には、"実行条件の判定項目"に格納された各判定項目について、実行条件を満たすと判定するための閾値が格納される。"判定理由"には、実行条件を満たすと判定する理由が格納される。
 図26の例は、"実行条件の判定項目"として、"subCUのサイズ"、"ピクチャタイプ"が格納されている。なお、"subCUのサイズ"、"ピクチャタイプ"については、上記第1の実施形態において、図15を用いて説明済みであるため、ここでは説明を省略する。
 また、図26の例は、"実行条件の判定項目"として、"CUの量子化パラメータ"が含まれることを示している。当該判定項目は、復号対象のsubCUが含まれるCUのブロックの量子化パラメータが、所定の閾値以下(30以下)であった場合、実行条件を満たすと判定される。CUのブロックの量子化パラメータが"30以下"の場合、復号画像と予測画像との差分が少ないため、予測画像を用いてテンプレート領域を設定することによる影響が抑えられるからである。
 そこで、第2の実施形態に係るエンコーダでは、復号対象のsubCUが含まれるCUのブロックの量子化パラメータが、"30以下"であった場合、当該subCUに隣接するsubCUの予測画像の一部をテンプレート領域として設定する。これにより、第2の実施形態に係るエンコーダでは、複数のsubCUのテンプレートマッチングを並列に実行する並列処理を実現することができる。
 また、図26の例は、"実行条件の判定項目"として、"CUレベルの動きベクトル"が含まれることを示している。当該判定項目は、復号対象のsubCUが含まれるCUのブロックについてのCUレベルの動きベクトルの絶対値が所定の画素数以下("1画素以下")であった場合、実行条件を満たすと判定される。CUレベルの動きベクトルの絶対値が1画素以下とは、当該CUのブロックが静止領域のブロックであることを示しており、この場合、予測画像がそのまま復号画像となることが多いからである。
 そこで、第2の実施形態に係るエンコーダでは、復号対象のsubCUが含まれるCUのブロックについてのCUレベルの動きベクトルが、"1画素以下"であった場合、当該subCUに隣接するsubCUの予測画像の一部をテンプレート領域として設定する。これにより、第2の実施形態に係るエンコーダでは、複数のsubCUのテンプレートマッチングを並列に実行する並列処理を実現することができる。
 (4)インタ予測処理の流れ(subCUレベル動き探索処理の流れ)
 続いて、第2の実施形態に係るエンコーダのインタ予測モードにおける、テンプレートマッチングによるインタ予測処理の流れについて説明する。なお、第2の実施形態に係るエンコーダのインタ予測モードの場合も、第1の実施形態と同様、テンプレートマッチングによるインタ予測処理の全体の流れは、図8と同じであるため、ここでは説明を省略する。
 また、第2の実施形態に係るエンコーダのインタ予測モードの場合、図8の各工程のうち、図9において詳細を説明した、図8のステップS801(CUレベルの動き探索処理)の流れも同じである。このため、ここでは説明を省略し、図8の各工程のうちステップS802(subCUレベルの動き探索処理)について説明する。
 図27は、第2の実施形態に係るエンコーダのインタ予測モードにおける、subCUレベルの動き探索処理の流れを示すフローチャートである。図10との相違点は、ステップS2701からステップS2702である。
 ステップS2701において、テンプレート領域判定部1401は、復号対象のsubCUが実行条件情報2600に示す実行条件を満たすか否かを判定する。ステップS2701において、実行条件を満たすと判定した場合には(ステップS2701においてYESの場合には)、ステップS2702に進む。
 ステップS2702において、予測画像取得部2501は、予測画像生成部708より、復号対象のsubCUに隣接する上側のsubCU及び左側のsubCUの予測画像を取得する。なお、復号対象のsubCUに隣接する上側のsubCUまたは左側のsubCUについて、既に復号画像が生成されている場合には、復号中画面取得部704が復号対象のsubCUに隣接する上側のsubCUまたは左側のsubCUの復号画像を取得してもよい。また、テンプレート領域選択部1402は、復号対象のsubCUに隣接するsubCUの予測画像または復号画像の一部を、テンプレート領域の画像として選択する。
 (5)subCUごとの処理のタイミングチャート
 続いて、第2の実施形態に係るエンコーダのインタ予測モードにおける、subCUごとの処理内容と処理タイミングとについて説明する。図28は、第2の実施形態に係るエンコーダのインタ予測モードにおける、subCUごとの処理内容及び処理タイミングを示す図である。
 このうち、図28(a)は、復号対象の各subCUが含まれるCUのブロックの一例を示している。図28(a)の例は、復号対象のsubCUが含まれるCUのブロックが、"CU"であり、当該CUのブロックには、4つのsubCU("sub0"、"sub1"、"sub2"、"sub3")の領域が含まれることを示している。また、図28(a)の例は、"CU"に隣接する上側のCUのブロック及び左側のCUのブロックについては、いずれも、復号画像が生成されていることを示している。また、図28(a)の例は、当該隣接するCUのブロックの復号画像の一部が、テンプレート領域1101~1112として設定されていることを示している。
 図28(b)は、"CU"に含まれる4つのsubCUについて、イントラ/インタ予測部409が処理を実行する際の処理タイミングを示した図である。図11(b)同様、図28(b)の例では、イントラ/インタ予測部409が実行する処理を、
・CUレベルの動きベクトル候補の設定と基点となる1の動きベクトル候補の決定、
・CUレベルの動きベクトルの決定、
・subCUレベルの動きベクトル候補の設定と基点となる1の動きベクトル候補の決定、
・subCUレベルの動きベクトルの決定、
・subCUレベルの予測画像の生成、
・subCUレベルの復号画像の取得、
に分けて示している。なお、図28(b)の例では、紙面の都合上、処理タイミング="T"~"Tm+7"までを示している。また、ここでは、復号対象のsubCUが実行条件情報2600に定義された実行条件を満たしているものとして説明する。
 図28(b)に示すように、処理タイミング="T"において、"CU"について、CUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、CUレベルの基点となる1の動きベクトル候補が決定される。続いて、処理タイミング="Tm+1"において、"CU"について、CUレベルの動きベクトルが決定される。
 続いて、処理タイミング"Tm+2"において、"subCU0"について、subCUレベルの動きベクトル候補が設定され、subCUレベルの基点となる1の動きベクトル候補が決定される。
 続いて、処理タイミング"Tm+3"において、"subCU0"について、subCUレベルの動きベクトルが決定される。なお、"subCU0"の動きベクトルの決定に際しては、テンプレート領域1101、1111の復号画像が用いられる。ここで、"subCU0"について、subCUレベルの動きベクトルが決定されると、"subCU1"及び"subCU2"について、subCUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域を設定することが可能となる。
 そこで、処理タイミング="Tm+4"において、"subCU1"及び"subCU2"について、subCUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、subCUレベルの基点となる1の動きベクトル候補が決定される。また、処理タイミング="Tm+4"では、並行して、"subCU0"について予測画像が生成され、出力される。
 ここで、"subCU0"について、予測画像が生成されると、"subCU1"及び"subCU2"について、subCUレベルの動きベクトルを決定することが可能となる。
 そこで、処理タイミング="Tm+5"において、"subCU1"及び"subCU2"について、subCUレベルの動きベクトルが決定される。なお、"subCU1"の動きベクトルの決定に際しては、テンプレート領域1102の復号画像とテンプレート領域2801の予測画像とが用いられる。また、"subCU2"の動きベクトルの決定に際しては、テンプレート領域2802の予測画像と、テンプレート領域1112の復号画像とが用いられる。
 また、予測画像が出力されたことで復号画像が生成されているため、処理タイミング="Tm+5"では、並行して、"subCU0"について生成された復号画像が取得される。
 なお、"subCU1"及び"subCU2"について、subCUレベルの動きベクトルが決定されると、"subCU3"について、subCUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域を設定することが可能となる。
 そこで、処理タイミング="Tm+6"において、"subCU3"について、subCUレベルの動きベクトル候補に応じた位置それぞれにテンプレート領域が設定され、subCUレベルの基点となる1の動きベクトル候補が決定される。また、処理タイミング="Tm+6"では、並行して、"subCU1"及び"subCU2"について予測画像が生成され、出力される。
 ここで、"subCU1"及び"subCU2"について、予測画像が生成されると、"subCU3"について、subCUレベルの動きベクトルを決定することが可能となる。
 そこで、処理タイミング="Tm+7"において、"subCU3"について、subCUレベルの動きベクトルが決定される。"subCU3"の動きベクトルの決定に際しては、テンプレート領域2803の予測画像と、テンプレート領域2804の予測画像とが用いられる。
 また、予測画像が出力されたことで復号画像が生成されるため、処理タイミング="Tm+7"では、並行して、"subCU1"及び"subCU2"について生成された復号画像が取得される。
 このように、第2の実施形態に係るエンコーダによれば、複数のsubCUについて並列処理が実行可能となり、処理効率を向上させることができる。この結果、処理タイミング="T"~"Tm+9"の間に、"CU"に含まれる4つのsubCUについて復号画像を生成することができる。
 (6)並列処理の具体例(その1)
 続いて、第2の実施形態に係るエンコーダのインタ予測モードにおいて、複数のsubCUについて実行される並列処理の具体例について説明する。図29は、第2の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第1の図である。図29の例は、128画素×128画素のCTU510を分割することで生成された、8画素×8画素のCUのブロック1800に含まれるsubCUについて実行される並列処理を示している(subCUのサイズが4画素×4画素であるため、並列処理が実行される)。
 図29の例では、CUのブロック1800を4つのsubCUに分けている。また、図29の例では、4つのsubCU2901~2904それぞれについて、下記のようにテンプレート領域を設定する。
・subCU2901:subCU2901に隣接する上側のsubCUの復号画像の一部と、subCU2901に隣接する左側のsubCUの復号画像の一部とを、テンプレート領域1801、1811として設定する。
・subCU2902:subCU2902に隣接する上側のsubCUの復号画像の一部と、subCU2902に隣接する左側のsubCU2901の予測画像の一部とをテンプレート領域1802、2911として設定する。
・subCU2903:subCU2903に隣接する上側のsubCU2901の予測画像の一部と、subCU2903に隣接する左側のsubCUの復号画像の一部とを、テンプレート領域2912、1812として設定する。
・subCU2904:subCU2904に隣接する上側のsubCU2902の予測画像の一部と、subCU2904に隣接する左側のsubCU2903の予測画像の一部とを、テンプレート領域2913、2914として設定する。
 これにより、CUのブロック1800に含まれる4つのsubCU2901~2904のうち、例えば、subCU2902及びsubCU2903のテンプレートマッチングを、subCU2901の処理と並列して実行することが可能となる。
 (7)並列処理の具体例(その2)
 図30は、第2の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第2の図である。図30の例は、128画素×128画素のCTU510を分割することで生成された、64画素×64画素のCUのブロック1900に含まれるsubCUについて実行される並列処理を示している(例えば、CUのブロック1900の量子化パラメータが30以下であることで、並列処理が実行されるものとする)。
 図30の例では、CUのブロック1900を16個のsubCUに分けている。また、図30の例では、16個のsubCUそれぞれについて、subCUに隣接する上側のsubCUの復号画像または予測画像の一部、左側のsubCUの復号画像または予測画像の一部をそれぞれテンプレート領域として設定する。
 例えば、subCU3001の場合、subCU3001に隣接する上側のsubCUの復号画像の一部を、テンプレート領域1901として設定し、subCU3001に隣接する左側のsubCUの復号画像の一部を、テンプレート領域1911として設定する。
 これにより、例えば、subCU3002及びsubCU3005のテンプレートマッチングを、subCU3001の処理と並列して実行することが可能となる。更に、subCU3002及びsubCU3005の処理と並列して、例えば、subCU3003、3006、3009のテンプレートマッチングを実行することが可能となる。
 (8)並列処理の具体例(その3)
 図31は、第2の実施形態に係るエンコーダのインタ予測モードにおける、並列処理の具体例を示す第3の図である。図31の例は、128画素×128画素のCTU510を分割することで生成された8画素×4画素のCUのブロック2001~2004を処理する場合を示している。
 図31の例では、CUのブロック2001~2004それぞれを、2つのsubCUに分けている。このため、subCUのサイズが4画素×4画素となり、2つのsubCUについて並列処理が実行される。
 符号3110は、CUのブロック2001~2004に含まれる各subCUについて、テンプレート領域を設定していく様子を時系列で示したものであり、下から上に向かって時間軸が進むことを示している。
 符号3110に示すように、CUのブロック2001に含まれる2つのsubCUのうち、左側のsubCUの上側に隣接するsubCUの復号画像の一部、及び、左側に隣接するsubCUの復号画像の一部を、テンプレート領域2011、2021として設定する。また、CUのブロック2001に含まれる2つのsubCUのうち、右側のsubCUの上側に隣接するsubCUの復号画像の一部、及び、左側に隣接するsubCUの予測画像の一部を、テンプレート領域2012、3121として設定する。
 これにより、CUのブロック2001に含まれる2つのsubCUのうち、右側のsubCUのテンプレートマッチングを、左側のsubCUの処理と並列して実行することが可能となる。
 CUのブロック2001に含まれる2つのsubCUが並列処理されることで、当該subCUについて復号画像が生成されると、続いて、CUのブロック2002の処理に移行する。具体的には、CUのブロック2002に含まれる2つのsubCUのうち、左側のsubCUの上側に隣接するsubCUの復号画像の一部、及び、左側に隣接するsubCUの復号画像の一部を、テンプレート領域2013、2022として設定する。また、CUのブロック2002に含まれる2つのsubCUのうち、右側のsubCUの上側に隣接するsubCUの復号画像の一部、及び、左側に隣接するsubCUの予測画像の一部を、テンプレート領域2014、3122として設定する。
 これにより、CUのブロック2002に含まれる2つのsubCUのうち、右側のsubCUのテンプレートマッチングを、左側のsubCUの処理と並列して実行することが可能となる。
 CUのブロック2002に含まれる2つのsubCUが並列処理されることで、当該subCUについて復号画像が生成されると、続いて、CUのブロック2003の処理に移行する。具体的には、CUのブロック2003に含まれる2つのsubCUのうち、左側のsubCUの上側に隣接するsubCUの復号画像の一部、及び、左側に隣接するsubCUの復号画像の一部を、テンプレート領域2015、2023として設定する。また、CUのブロック2003に含まれる2つのsubCUのうち、右側のsubCUの上側に隣接するsubCUの復号画像の一部、及び、左側に隣接するsubCUの予測画像の一部を、テンプレート領域2016、3123として設定する。
 これにより、CUのブロック2003に含まれる2つのsubCUのうち、右側のsubCUのテンプレートマッチングを、左側のsubCUの処理と並列して実行することが可能となる。
 CUのブロック2003に含まれる2つのsubCUが並列処理されることで、当該subCUについて復号画像が生成されると、続いて、CUのブロック2004の処理に移行する。具体的には、CUのブロック2004に含まれる2つのsubCUのうち、左側のsubCUの上側に隣接するsubCUの復号画像の一部、及び、左側に隣接するsubCUの復号画像の一部を、テンプレート領域2017、2024として設定する。また、CUのブロック2004に含まれる2つのsubCUのうち、右側のsubCUの上側に隣接するsubCUの復号画像の一部、及び、左側に隣接するsubCUの予測画像の一部を、テンプレート領域2018、3124として設定する。
 これにより、CUのブロック2004に含まれる2つのsubCUのうち、右側のsubCUのテンプレートマッチングを、左側のsubCUの処理と並列して実行することが可能となる。
 <2.第2の実施形態に係るデコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するためのイントラ/インタ予測部の機能構成>
 続いて、第2の実施形態に係るデコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成について説明する。図32は、第2の実施形態に係るデコーダのインタ予測モードで、テンプレートマッチングによるインタ予測処理を実現するための機能構成の一例を示す図である。
 図23との相違点は、図32の場合、予測画像取得部3201を有する点である。以下、図23との相違点を中心に説明する。
 予測画像取得部3201は、予測画像生成部2207により生成された、復号対象のsubCUに隣接するsubCUの予測画像を取得する。具体的には、予測画像取得部3201は、テンプレート領域設定部2201より設定されたテンプレート領域(復号対象のsubCUに隣接するsubCUの位置に設定されたテンプレート領域)の予測画像を取得する。また、予測画像取得部3201は、取得したテンプレート領域の予測画像を、テンプレート領域選択部2302に通知する。
 なお、テンプレート領域設定部2201は、テンプレート領域判定部2301から、所定の実行条件を満たす旨の判定結果が通知された場合には、予測画像取得部3201に対して、図24を用いて説明したテンプレート領域を設定する。
 具体的には、テンプレート領域設定部2201は、復号対象のsubCUの上側に隣接するsubCUの予測画像の一部と、左側に隣接するsubCUの予測画像の一部とを、テンプレート領域として設定する。この場合、予測画像取得部3201は、予測画像生成部2207により生成された予測画像のうち、テンプレート領域設定部2201により設定されたテンプレート領域の予測画像(隣接するsubCUの予測画像の一部)をテンプレート領域選択部2302に通知する。
 テンプレート領域選択部2302は、所定の実行条件を満たさない旨の判定結果が通知されると、復号中画面取得部2202より通知されたテンプレート領域の復号画像(隣接するsubCUの復号画像の一部)を選択する。また、テンプレート領域選択部2302は、選択したテンプレート領域の復号画像を、マッチング部2204に通知する。これにより、マッチング部2204では、復号対象のsubCUについて、テンプレート領域判定部2301より通知された判定結果に応じたテンプレート領域の復号画像を用いて、参照画面内においてテンプレートマッチングを行うことができる。
 また、テンプレート領域選択部2302は、所定の実行条件を満たす旨の判定結果が通知されると、予測画像取得部3201より通知されたテンプレート領域の予測画像(隣接するsubCUの予測画像の一部)を選択する。また、テンプレート領域選択部2302は、選択したテンプレート領域の予測画像を、マッチング部2204に通知する。これにより、マッチング部2204では、復号対象のsubCUについて、テンプレート領域判定部2301より通知された判定結果に応じたテンプレート領域の予測画像を用いて、参照画面内においてテンプレートマッチングを行うことができる。
 <3.まとめ>
 以上の説明から明らかなように、第2の実施形態に係るエンコーダのイントラ/インタ予測部では、インタ予測モードにおいてテンプレートマッチングによるインタ予測処理を実行する際、
・復号単位のブロック(CU)を複数の矩形領域(subCU)に分ける。
・復号対象の矩形領域が所定の実行条件を満たすか否かを判定し、所定の実行条件を満たすと判定した場合には、当該矩形領域に隣接する矩形領域の予測画像の一部をテンプレート領域として設定する。
・設定したテンプレート領域を用いて、復号単位のブロックに含まれる一部の矩形領域について、並列処理によりテンプレートマッチングを行い、各矩形領域の予測画像を出力する。
 これにより、第2の実施形態に係るエンコーダによれば、テンプレートマッチングによるインタ予測において、処理効率を向上させることができる。
 また、第2の実施形態に係るデコーダのイントラ/インタ予測部では、インタ予測モードにおいてテンプレートマッチングによるインタ予測処理を実行する際、
・復号単位のブロック(CU)を複数の矩形領域(subCU)に分ける。
・復号対象の矩形領域が所定の実行条件を満たすか否かを判定し、所定の実行条件を満たすと判定した場合には、当該矩形領域に隣接する矩形領域の予測画像の一部を、テンプレート領域として設定する。
・設定したテンプレート領域を用いて、復号単位のブロックに含まれる一部の矩形領域について、並列処理によりテンプレートマッチングを行い、各矩形領域の予測画像を出力する。
 これにより、第2の実施形態に係るデコーダによれば、テンプレートマッチングによるインタ予測において、処理効率を向上させることができる。
 [第3の実施形態]
 上記第1の実施形態では、テンプレートマッチングによるインタ予測処理において、所定の実行条件を満たす場合に、復号対象のsubCUが含まれるCUのブロックに隣接するCUのブロックの復号画像の一部をテンプレート領域として設定する機能について説明した。
 また、上記第2の実施形態では、テンプレートマッチングによるインタ予測処理を実行する際、所定の実行条件を満たす場合に、復号対象のsubCUに隣接するsubCUの予測画像の一部をテンプレート領域として設定する機能について説明した。
 これに対して、第3の実施形態では、上記第1の実施形態において説明した機能と、上記第2の実施形態において説明した機能とをエンコーダ及びデコーダにそれぞれ配し、両機能を切り替えて実行する構成について説明する。以下、第3の実施形態について、上記第2の実施形態との相違点を中心に説明する。
 <1.インタ予測処理の流れ(subCUレベルの動き探索処理の流れ)>
 図33は、第3の実施形態に係るエンコーダのインタ予測モードにおける、subCUレベルの動き探索処理の流れを示すフローチャートである。図27との相違点は、ステップS3301、S3302、S1602、S2702、S1603である。
 ステップS3301において、テンプレート領域判定部1401は、復号対象のsubCUが第1の実行条件を満たすか否かを判定する。なお、第1の実行条件とは、例えば、実行条件情報1500に規定された実行条件のいずれかを指すものとする。
 ステップS3301において、第1の実行条件を満たすと判定した場合には(ステップS3301においてYESの場合には)、ステップS1602に進む。
 ステップS1602において、テンプレート領域設定部703は、復号対象のsubCUが含まれるCUのブロックに隣接するCUのブロックの復号画像の一部を、テンプレート領域として設定する。
 一方、ステップS3301において、第1の実行条件を満たさないと判定した場合には(ステップS3301においてNOの場合には)、ステップS3302に進む。ステップS3302において、テンプレート領域判定部1401は、復号対象のsubCUが第2の実行条件を満たすか否かを判定する。なお、第2の実行条件とは、例えば、実行条件情報2700に規定された実行条件のうち、実行条件情報1500と重複しない実行条件のいずれかを指すものとする。
 ステップS3302において、第2の実行条件を満たすと判定した場合には(ステップS3302においてYESの場合には)、ステップS2702に進む。ステップS2702において、予測画像取得部2501は、予測画像生成部708より、復号対象のsubCUに隣接する上側のsubCU及び左側のsubCUの予測画像または復号画像を取得する。また、テンプレート領域選択部1402は、復号対象のsubCUに隣接するsubCUの予測画像または復号画像の一部を、テンプレート領域として設定する。
 一方、ステップS3302において、第2の実行条件を満たさないと判定した場合には(ステップS3302においてNOの場合には)、ステップS1603に進む。ステップS1603において、テンプレート領域設定部703は、復号対象のsubCUに隣接するsubCUの復号画像の一部を、テンプレート領域として設定する。
 <2.まとめ>
 以上の説明から明らかなように、第3の実施形態に係るエンコーダ及びデコーダのイントラ/インタ予測部は、インタ予測モードにおいてテンプレートマッチングによるインタ予測処理を実行する際、
・復号画像の矩形領域が第1の実行条件を満たすか否かを判定し、第1の実行条件を満たすと判定した場合には、当該矩形領域が含まれる復号単位のブロックに隣接するブロックの復号画像の一部を、テンプレート領域として設定する。
・復号画像の矩形領域が第2の実行条件を満たすか否かを判定し、第2の実行条件を満たすと判定した場合には、当該矩形領域に隣接する矩形領域の予測画像の一部を、テンプレート領域として設定する。
 これにより、第3の実施形態に係るエンコーダ及びデコーダによれば、復号対象のsubCUの属性に応じたテンプレート領域を設定して、テンプレートマッチングによるインタ予測処理を実行することが可能となる。
 この結果、第3の実施形態に係るエンコーダ及びデコーダによれば、テンプレートマッチングによるインタ予測において、処理効率を向上させることができる。
 [その他の実施形態]
 上記第1の実施形態では、所定のブロックが、復号対象のsubCUが含まれる復号単位(CU)のブロックであるとして説明した。しかしながら、所定のブロックはCUのブロックに限定されない。復号対象のsubCUが含まれるブロックであれば、CUより小さいブロックであっても、CUより大きいブロックであってもよい。
 ただし、復号対象のsubCUについて処理を開始するにあたっては、所定のブロックの上側に隣接するブロック及び左側に隣接するブロックについて復号画像の生成が完了していることが前提となる。
 また、エンコーダ110において予め所定のブロックを定義しておき、データストリームを出力する際、付帯情報に、所定のブロックを示す情報を含めるように構成することが前提となる。これにより、デコーダ120では、付帯情報に基づいて、所定のブロックを認識することが可能となるからである。
 また、上記第1乃至第3の実施形態では、図15の実行条件情報1500または図26の実行条件情報2600に規定された実行条件に基づいて判定を行うものとして説明した。しかしながら、判定に用いる実行条件は、これに限定されず、実行条件情報1500または実行条件情報2600に規定されていない他の所定の実行条件に基づいて判定を行ってもよいことはいうまでもない。
 また、上記第1乃至第3の実施形態では、エンコーダ110及びデコーダ120それぞれにおいて、図15の実行条件情報1500または図26の実行条件情報2600に規定された全ての実行条件に基づいて判定を行うものとして説明した。
 しかしながら、エンコーダ110及びデコーダ120では、いずれかの実行条件に基づいて判定を行うように構成してもよい。この場合、デコーダ120は、エンコーダ110において判定に用いた実行条件を認識する必要があるため、エンコーダ110は、判定に用いた実行条件をシンタクスとして付帯情報に含めてデコーダ120に送信する。
 例えば、エンコーダ110では、実行条件の判定項目="ピクチャタイプ"の場合、シーケンスレベルシンタクスとして、
・fruc_parallel_merge_tid_minus1:0~5
を付帯情報に含めてデコーダ120に送信する。なお、"0~5"は、ピクチャの階層レベルを表しており、"0"の場合は、"OFF"を表している。
 また、エンコーダ110では、実行条件の判定項目="subCUのサイズ"の場合、ピクチャレベルシンタクスとして、
・log2_fruc_parallel_merge_size_minus2:0~5
を付帯情報に含めてデコーダ120に送信する。なお、"0"は4画素×4画素以下を、"1"は8画素×8画素以下を、"2"は16画素×16画素以下を、"3"は32画素×32画素以下を、"4"は64画素×64画素以下を、"5"は128画素×128画素以下をそれぞれ表している。
 また、エンコーダ110では、実行条件の判定項目="CUの量子化パラメータ"の場合、ピクチャレベルシンタクスとして、
・fruc_parallel_merge_qp_minus1:0~64
を付帯情報に含めてデコーダ120に送信する。なお、"0"の場合は、"OFF"を表している。
 更に、エンコーダ110では、実行条件の判定項目="CUレベルの動きベクトル"の場合、ピクチャレベルシンタクスとして、
・fruc_parallel_merge_cu_mv_minus1:0~511
を付帯情報に含めてデコーダ120に送信する。
 また、上記第3の実施形態では、第1の実行条件を満たす場合には、隣接するCUの復号画像の一部をテンプレート領域として設定し、第2の実行条件を満たす場合には、隣接するsubCUの予測画像の一部をテンプレート領域として設定するものとした。つまり、テンプレート領域は、隣接するCUの復号画像の一部または隣接するsubCUの予測画像の一部のいずれかを設定するものとした。
 しかしながら、テンプレート領域の設定方法はこれに限定されず、例えば、隣接するCUの予測画像の一部を設定するように構成してもよい。
 なお、上記実施形態に挙げた構成等に、その他の要素との組み合わせ等、ここで示した構成に本発明が限定されるものではない。これらの点に関しては、本発明の趣旨を逸脱しない範囲で変更することが可能であり、その応用形態に応じて適切に定めることができる。
100       :画像処理システム
110       :エンコーダ
120       :デコーダ
409       :イントラ/インタ予測部
520       :CUのブロック
530~550   :subCU
541、542   :テンプレート領域
610       :画面
620       :画面
701       :動き探索処理部
702       :コスト判定部
703       :テンプレート領域設定部
704       :復号中画面取得部
705       :参照画面取得部
706       :マッチング部
707       :動きベクトル算出部
708       :予測画像生成部
709       :動きベクトル格納部
710       :テンプレート探索点設定部
1101、1102 :テンプレート領域
1111、1112 :テンプレート領域
1131      :テンプレート領域
1201、1202 :テンプレート領域
1211~1213 :テンプレート領域
1401      :テンプレート領域判定部
1402      :テンプレート領域選択部
1500      :実行条件情報
2106      :イントラ/インタ予測部
2201      :テンプレート領域設定部
2202      :復号中画面取得部
2203      :参照画面取得部
2204      :マッチング部
2205      :動きベクトル算出部
2207      :予測画像生成部
2208      :動きベクトル格納部
2209      :テンプレート探索点設定部
2301      :テンプレート領域判定部
2302      :テンプレート領域選択部
2401、2402 :テンプレート領域
2501      :予測画像取得部
2600      :実行条件情報
2801~2804 :テンプレート領域
3201      :予測画像取得部

Claims (16)

  1.  画面間予測を用いて画像を復号する復号方法であって、
     復号中の画面内より復号対象の矩形領域を取得するステップと、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定するステップと、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定するステップと、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出するステップと、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定するステップと、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行うステップと、を有し、
     前記第1のテンプレート領域を設定するステップは、
     前記復号対象の矩形領域のサイズが所定の閾値以下であった場合、または、前記復号対象の矩形領域が含まれる画面が、時間的に異なる他の画面を復号する際に参照されることのない参照画面に該当する場合に、符号化装置において決定された、前記復号対象の矩形領域が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定することを特徴とする復号方法。
  2.  前記第2のテンプレート領域を設定するステップは、
     前記ブロックに含まれる複数の矩形領域それぞれの前記第1のテンプレート領域に相当する第2のテンプレート領域を、並列して設定することを特徴とする請求項1に記載の復号方法。
  3.  前記ブロックは、前記復号対象の矩形領域が含まれる復号単位のブロックであることを特徴とする請求項1または2に記載の復号方法。
  4.  画面間予測を用いて画像を復号する復号方法であって、
     復号中の画面内より復号対象の矩形領域を取得するステップと、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定するステップと、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定するステップと、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出するステップと、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定するステップと、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行うステップと、を有し、
     前記相関値を算出するステップは、前記第1のテンプレート領域の予測画像を用いて前記相関値を算出することを特徴とする復号方法。
  5.  前記相関値を算出するステップは、前記復号対象の矩形領域のサイズが所定の閾値以下であった場合、または、前記復号対象の矩形領域が含まれる画面が、時間的に異なる他の画面を復号する際に参照されることのない非参照画面に該当する場合、または、前記復号対象の矩形領域が含まれる復号単位のブロックの量子化パラメータが所定の閾値以下であった場合、または、前記復号対象の矩形領域が含まれる復号単位のブロックの動きベクトルの絶対値が、所定の画素数以下であった場合に、前記第1のテンプレート領域の予測画像を用いて前記相関値を算出することを特徴とする請求項4に記載の復号方法。
  6.  前記第2のテンプレート領域を設定するステップは、
     前記ブロックに含まれる複数の矩形領域それぞれの前記第1のテンプレート領域に相当する第2のテンプレート領域を、並列して設定することを特徴とする請求項5に記載の復号方法。
  7.  画面間予測を用いて画像を復号する復号方法であって、
     復号中の画面内より復号対象の矩形領域を取得するステップと、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定するステップと、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定するステップと、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出するステップと、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定するステップと、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行うステップと、を有し、
     前記復号対象の矩形領域が第1の実行条件を満たす場合、前記第1のテンプレート領域を設定するステップは、符号化装置において決定された、前記復号対象の矩形領域が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定し、
     前記復号対象の矩形領域が第2の実行条件を満たす場合、前記相関値を算出するステップは、前記第1のテンプレート領域の予測画像を用いて前記相関値を算出することを特徴とする復号方法。
  8.  画面間予測を用いて画像を復号する復号装置であって、
     復号中の画面内より復号対象の矩形領域を取得する取得手段と、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定する第1の設定手段と、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定する第2の設定手段と、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出する算出手段と、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定する決定手段と、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行う生成手段と、を有し、
     前記第1の設定手段は、
     前記復号対象の矩形領域のサイズが所定の閾値以下であった場合、または、前記復号対象の矩形領域が含まれる画面が、時間的に異なる他の画面を復号する際に参照されることのない参照画面に該当する場合に、符号化装置において決定された、前記復号対象の矩形領域が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定することを特徴とする復号装置。
  9.  画面間予測を用いて画像を復号する復号装置であって、
     復号中の画面内より復号対象の矩形領域を取得する取得手段と、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定する第1の設定手段と、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定する第2の設定手段と、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出する算出手段と、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定する決定手段と、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行う生成手段と、を有し、
     前記算出手段は、
     前記第1のテンプレート領域の予測画像を用いて前記相関値を算出することを特徴とする復号装置。
  10.  画面間予測を用いて画像を復号する復号装置であって、
     復号中の画面内より復号対象の矩形領域を取得する取得手段と、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定する第1の設定手段と、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定する第2の設定手段と、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出する算出手段と、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定する決定手段と、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行う生成手段と、を有し、
     前記復号対象の矩形領域が第1の実行条件を満たす場合、前記第1の設定手段は、符号化装置において決定された、前記復号対象の矩形領域が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定し、
     前記復号対象の矩形領域が第2の実行条件を満たす場合、前記算出手段は、前記第1のテンプレート領域の予測画像を用いて前記相関値を算出することを特徴とする復号装置。
  11.  画面間予測を用いて画像を復号する符号化装置であって、
     復号中の画面内より復号対象の矩形領域を取得する取得手段と、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定する第1の設定手段と、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定する第2の設定手段と、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出する算出手段と、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定する決定手段と、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行う生成手段と、を有し、
     前記第1の設定手段は、
     前記復号対象の矩形領域のサイズが所定の閾値以下であった場合、または、前記復号対象の矩形領域が含まれる画面が、時間的に異なる他の画面を復号する際に参照されることのない参照画面に該当する場合に、前記符号化装置において決定された、前記復号対象の矩形領域が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定することを特徴とする符号化装置。
  12.  画面間予測を用いて画像を復号する符号化装置であって、
     復号中の画面内より復号対象の矩形領域を取得する取得手段と、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定する第1の設定手段と、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定する第2の設定手段と、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で相関値を算出する算出手段と、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定する決定手段と、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行う生成手段と、を有し、
     前記算出手段は、
     前記第1のテンプレート領域の予測画像を用いて前記相関値を算出することを特徴とする符号化装置。
  13.  画面間予測を用いて画像を復号する符号化装置であって、
     復号中の画面内より復号対象の矩形領域を取得する取得手段と、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定する第1の設定手段と、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定する第2の設定手段と、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出する算出手段と、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定する決定手段と、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行う生成手段と、を有し、
     前記復号対象の矩形領域が第1の実行条件を満たす場合、前記第1の設定手段は、前記符号化装置において決定された、前記復号対象の矩形領域が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定し、
     前記復号対象の矩形領域が第2の実行条件を満たす場合、前記算出手段は、前記第1のテンプレート領域の予測画像を用いて前記相関値を算出することを特徴とする符号化装置。
  14.  画面間予測を用いて画像を復号する装置のコンピュータに、
     復号中の画面内より復号対象の矩形領域を取得するステップと、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定するステップと、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定するステップと、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出するステップと、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定するステップと、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行うステップと、を実行させるためのプログラムであって、
     前記第1のテンプレート領域を設定するステップは、
     前記復号対象の矩形領域のサイズが所定の閾値以下であった場合、または、前記復号対象の矩形領域が含まれる画面が、時間的に異なる他の画面を復号する際に参照されることのない参照画面に該当する場合に、符号化装置において決定された、前記復号対象の矩形領域が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定することを特徴とするプログラム。
  15.  画面間予測を用いて画像を復号する装置のコンピュータに、
     復号中の画面内より復号対象の矩形領域を取得するステップと、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定するステップと、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定するステップと、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出するステップと、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定するステップと、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行うステップと、を実行させるためのプログラムであって、
     前記相関値を算出するステップは、前記第1のテンプレート領域の予測画像を用いて前記相関値を算出することを特徴とするプログラム。
  16.  画面間予測を用いて画像を復号する装置のコンピュータに、
     復号中の画面内より復号対象の矩形領域を取得するステップと、
     前記復号中の画面内において、前記復号対象の矩形領域の位置に応じて第1のテンプレート領域を設定するステップと、
     前記復号中の画面とは時間的に異なる参照画面内において、前記第1のテンプレート領域に相当する第2のテンプレート領域を設定するステップと、
     前記第2のテンプレート領域を、前記参照画面内で所定のベクトル分移動することで、第3のテンプレート領域を設定し、前記第3のテンプレート領域と前記第1のテンプレート領域との間で画像の相関値を算出するステップと、
     複数の前記所定のベクトルに対応する複数の前記相関値に基づいて、複数の前記所定のベクトルの中から1つのベクトルを選択することで、前記復号対象の矩形領域の動きベクトルを決定するステップと、
     前記動きベクトルに基づいて、前記復号対象の矩形領域の予測画像を生成することで動き補償を行うステップと、を実行させるためのプログラムであって、
     前記復号対象の矩形領域が第1の実行条件を満たす場合、前記第1のテンプレート領域を設定するステップは、符号化装置において決定された、前記復号対象の矩形領域が含まれる所定のブロックに隣接する領域を、前記第1のテンプレート領域として設定し、
     前記復号対象の矩形領域が第2の実行条件を満たす場合、前記相関値を算出するステップは、前記第1のテンプレート領域の予測画像を用いて前記相関値を算出することを特徴とするプログラム。
PCT/JP2018/013856 2018-03-30 2018-03-30 復号方法、復号装置、符号化装置及びプログラム Ceased WO2019187096A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2018/013856 WO2019187096A1 (ja) 2018-03-30 2018-03-30 復号方法、復号装置、符号化装置及びプログラム
JP2020508865A JP7248013B2 (ja) 2018-03-30 2018-03-30 復号方法、復号装置、符号化装置及びプログラム
US17/032,446 US11197011B2 (en) 2018-03-30 2020-09-25 Decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/013856 WO2019187096A1 (ja) 2018-03-30 2018-03-30 復号方法、復号装置、符号化装置及びプログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/032,446 Continuation US11197011B2 (en) 2018-03-30 2020-09-25 Decoding method

Publications (1)

Publication Number Publication Date
WO2019187096A1 true WO2019187096A1 (ja) 2019-10-03

Family

ID=68061044

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/013856 Ceased WO2019187096A1 (ja) 2018-03-30 2018-03-30 復号方法、復号装置、符号化装置及びプログラム

Country Status (3)

Country Link
US (1) US11197011B2 (ja)
JP (1) JP7248013B2 (ja)
WO (1) WO2019187096A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021072795A1 (zh) * 2019-10-17 2021-04-22 北京大学深圳研究生院 一种基于帧间预测的编解码方法及装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113508422A (zh) * 2019-03-08 2021-10-15 松下电器(美国)知识产权公司 三维数据编码方法、三维数据解码方法、三维数据编码装置、以及三维数据解码装置
WO2023055167A1 (ko) * 2021-10-01 2023-04-06 엘지전자 주식회사 인트라 예측 모드 도출 기반 인트라 예측 방법 및 장치
US12105767B2 (en) * 2022-05-03 2024-10-01 Adobe Inc. Digital content layout encoding for search

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010095560A1 (ja) * 2009-02-20 2010-08-26 ソニー株式会社 画像処理装置および方法
WO2011099468A1 (ja) * 2010-02-09 2011-08-18 日本電信電話株式会社 動きベクトル予測符号化方法,動きベクトル予測復号方法,動画像符号化装置,動画像復号装置およびそれらのプログラム
US20160286232A1 (en) * 2015-03-27 2016-09-29 Qualcomm Incorporated Deriving motion information for sub-blocks in video coding

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5401071B2 (ja) * 2008-10-09 2014-01-29 株式会社Nttドコモ 動画像符号化装置、動画像復号装置、動画像符号化方法、動画像復号方法、動画像符号化プログラム、動画像復号プログラム、動画像処理システムおよび動画像処理方法
US9509999B2 (en) * 2013-06-11 2016-11-29 Qualcomm Incorporated Inter-layer prediction types in multi-layer video coding
CN105531999B (zh) * 2013-07-09 2019-08-09 诺基亚技术有限公司 涉及用于信号传输运动信息的语法的视频编码方法及装置
JP6147368B2 (ja) * 2014-02-03 2017-06-14 三菱電機株式会社 画像符号化装置、画像復号装置、符号化ストリーム変換装置、画像符号化方法、及び画像復号方法
JP2015173404A (ja) * 2014-03-12 2015-10-01 富士通株式会社 動画像符号化装置、動画像符号化方法及び動画像符号化用コンピュータプログラム
KR20180016348A (ko) * 2015-06-05 2018-02-14 소니 주식회사 화상 처리 장치 및 화상 처리 방법
US10834419B2 (en) * 2016-04-13 2020-11-10 Qualcomm Incorporated Conformance constraint for collocated reference index in video coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010095560A1 (ja) * 2009-02-20 2010-08-26 ソニー株式会社 画像処理装置および方法
WO2011099468A1 (ja) * 2010-02-09 2011-08-18 日本電信電話株式会社 動きベクトル予測符号化方法,動きベクトル予測復号方法,動画像符号化装置,動画像復号装置およびそれらのプログラム
US20160286232A1 (en) * 2015-03-27 2016-09-29 Qualcomm Incorporated Deriving motion information for sub-blocks in video coding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHEN, J. L. ET AL.: "Algorithm description of joint exploration test model 7 (JEM 7)", JOINT VIDEO EXPLORATION TEAM (JVET) 7TH MEETING, JVET-G1001- V1, 19 August 2017 (2017-08-19), XP030150980 *
XIU, X. Y. ET AL.: "On low-latency reduction for template-based inter prediction", JOINT VIDEO EXPERTS TEAM (JVET) 10TH MEETING, JVET-J0045-VL, 3 April 2018 (2018-04-03), pages 1 - 4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021072795A1 (zh) * 2019-10-17 2021-04-22 北京大学深圳研究生院 一种基于帧间预测的编解码方法及装置
US12206892B2 (en) 2019-10-17 2025-01-21 Peking University Shenzhen Graduate School Method and device for encoding or decoding based on inter-frame prediction

Also Published As

Publication number Publication date
US11197011B2 (en) 2021-12-07
JPWO2019187096A1 (ja) 2021-04-08
JP7248013B2 (ja) 2023-03-29
US20210014514A1 (en) 2021-01-14

Similar Documents

Publication Publication Date Title
KR102760093B1 (ko) 모션 벡터 리파인먼트 및 모션 보상을 위한 메모리 액세스 윈도우 및 패딩
CN113491124B (zh) 基于dmvr的帧间预测方法和设备
KR102731944B1 (ko) 다중 참조 예측을 위한 움직임 벡터 개선
US12069291B2 (en) Limited memory access window for motion vector refinement
US10200715B2 (en) Methods and devices for encoding and decoding video pictures
CN111567047B (zh) 进行子预测块运动矢量推导的存储器访问窗口
KR20200066737A (ko) 영상 코딩 시스템에서 인터 예측에 따른 영상 디코딩 방법 및 장치
WO2019075375A1 (en) MOTION VECTOR PREDICTORS USING MOTION MODELS AFFINED IN VIDEO CODING
CN111201795B (zh) 存储访问窗口和用于运动矢量修正的填充
CN111201792B (zh) 指向分数像素点位置的运动矢量的修正运动矢量
KR102701434B1 (ko) 디코더 측 모션 벡터 정제를 위한 에러 표면 기반 서브 픽셀 정밀 정제 방법
US11197011B2 (en) Decoding method
CN114342387B (zh) 基于运动预测的图像编译方法和装置
CN114270824B (zh) 用于基于帧间预测编译图像的方法和装置
CN114270833A (zh) 用于在视频/图像编译系统中移除重叠信令的方法和装置
WO2024255897A1 (en) System and method for intra prediction using fractional-pel block vector
CN118975245A (zh) 视频编解码中的帧间预测
CN120858573A (zh) 帧内模板匹配预测的方法和设备
CN119111073A (zh) 使用模板匹配的图像编码/解码方法、用于发送比特流的方法以及其中存储有比特流的记录介质
CN120836157A (zh) 帧内模板匹配预测的方法和设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18912717

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020508865

Country of ref document: JP

Kind code of ref document: A

122 Ep: pct application non-entry in european phase

Ref document number: 18912717

Country of ref document: EP

Kind code of ref document: A1