WO2017208549A1 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
WO2017208549A1
WO2017208549A1 PCT/JP2017/008270 JP2017008270W WO2017208549A1 WO 2017208549 A1 WO2017208549 A1 WO 2017208549A1 JP 2017008270 W JP2017008270 W JP 2017008270W WO 2017208549 A1 WO2017208549 A1 WO 2017208549A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
offset
unit
offset value
candidates
Prior art date
Application number
PCT/JP2017/008270
Other languages
French (fr)
Japanese (ja)
Inventor
義崇 森上
Original Assignee
ソニー株式会社
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 ソニー株式会社 filed Critical ソニー株式会社
Publication of WO2017208549A1 publication Critical patent/WO2017208549A1/en

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/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/117Filters, e.g. for pre-processing or post-processing
    • 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
    • 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/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
    • 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/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Definitions

  • the present disclosure relates to an image processing apparatus and an image processing method.
  • JVCVC Joint Collaboration Team-Video Coding
  • HEVC High Efficiency Video Coding
  • HEVC provides not only single-layer coding but also scalable coding as well as existing image coding schemes such as MPEG2 and AVC (Advanced Video Coding).
  • HEVC scalable coding technology is also referred to as SHVC (Scalable HEVC).
  • Scalable encoding generally refers to a technique for hierarchically encoding a layer that transmits a coarse image signal and a layer that transmits a fine image signal.
  • Non-Patent Document 3 a technique called a sample adaptive offset (SAO) filter is applied from HEVC.
  • SAO sample adaptive offset
  • coding efficiency is improved by selecting an optimum mode from among a plurality of modes based on a technique called band offset and edge offset.
  • Patent Document 1 discloses an example of an image processing apparatus to which a sample adaptive offset filter is applied.
  • the sample adaptive offset filter tends to increase the processing load for setting the optimum mode and offset value. Therefore, there is a demand for a mechanism that can further improve performance by setting the offset value more efficiently.
  • the present disclosure proposes an image processing apparatus and an image processing method that can set an offset value more efficiently.
  • a range of offset value candidates to be applied to pixels of a decoded decoded image is set based on a quantization parameter used when the image is quantized.
  • a filter processing unit that executes a filter process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image.
  • the processor applies an offset value to be applied to the decoded image pixel based on the quantization parameter used when the image is quantized according to the bit depth of the image. Setting a candidate range; and executing filtering processing for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image.
  • a setting unit for setting a range of candidates for the offset value to be performed, and a filtering process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image An image processing apparatus is provided.
  • the setting unit configured to set a range of offset value candidates to be applied to the decoded image pixels based on the image feature amount according to the image bit depth;
  • an image processing apparatus comprising: a filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to a pixel of a decoded image. .
  • the processor applies the decoded image pixel to the decoded image according to the offset value applied to the image pixel that has already been subjected to the encoding process according to the bit depth of the image.
  • a filter process for setting a range of candidates for the offset value to be applied to the pixel and applying the offset value selected from the candidates included in the set range to the pixels of the decoded image Performing an image processing method.
  • the processor sets a range of candidate offset values to be applied to the decoded pixel of the decoded image based on the feature amount of the image according to the bit depth of the image. And performing a filtering process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image. .
  • 14 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit in an image encoding device according to Modification 2-1.
  • 14 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit in an image encoding device according to a third embodiment of the present disclosure.
  • 16 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit in an image encoding device according to Modification 3-1.
  • 14 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit in an image encoding device according to a fourth embodiment of the present disclosure.
  • FIG. 16 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit 350 in an image encoding device according to Modification 4-1. It is a block diagram which shows an example of the hardware constitutions of an encoder. It is a block diagram which shows an example of a schematic structure of a mobile telephone. It is a block diagram which shows an example of a schematic structure of a recording / reproducing apparatus. It is a block diagram which shows an example of a schematic structure of an imaging device. It is a block diagram which shows an example of a schematic structure of a video set. It is a block diagram which shows an example of a schematic structure of a video processor. It is a block diagram which shows the other example of the schematic structure of a video processor.
  • a sample adaptive offset (hereinafter sometimes referred to as “SAO”) filter is an H.264 filter. It is a loop filter technology newly introduced in H.265 / HEVC, and is executed after deblocking filter processing. SAO is composed of two types of technologies called edge offset (EO: Edge Offset) and band offset (BO: Band Offset). The parameter is set to.
  • EO Edge Offset
  • BO Band Offset
  • the edge offset process is a process in which an offset value is added to or subtracted from the pixel value for each pixel in accordance with the relative relationship between the pixel to be processed and two adjacent pixels adjacent to the pixel.
  • FIG. 1 is an explanatory diagram for explaining an outline of the edge offset processing.
  • EO_0 to EO_3 shown in FIG. 1 indicate pixel array candidates (classes) in the edge offset processing.
  • a pixel indicated by reference numeral c indicates a pixel to be processed
  • pixels indicated by reference numerals a and b indicate pixels adjacent to the pixel c to be processed.
  • which of the classes EO_0 to EO_3 is to be used can be selected for each CTU for both luminance and color difference using the encoding parameters “sao_eo_class_luma” and “sao_eo_class_chroma”.
  • Category 1 to Category 4 classify the relationship of pixel values between the target pixel c and the adjacent pixels a and b.
  • category 1 shows a case where the pixel value of the target pixel c is smaller than any pixel value of the adjacent pixels a and b.
  • Category 2 shows a case where the pixel value of the target pixel c is smaller than one of the adjacent pixels a and b and equal to the other.
  • the pixel value is smoothed between the target pixel c and the adjacent pixels a and b by adding an offset to the target pixel c.
  • Category 3 shows a case where the pixel value of the target pixel c is larger than one of the adjacent pixels a and b and equal to the other.
  • Category 4 shows a case where the pixel value of the target pixel c is larger than any pixel value of the adjacent pixels a and b.
  • the pixel value is smoothed between the target pixel c and the adjacent pixels a and b by subtracting the offset from the target pixel c.
  • a category 0 indicating that the edge offset processing is not performed is provided.
  • any class is selected from the classes EO_0 to EO_3, and the relationship between the pixel value of the target pixel c and the pixel values of the adjacent pixels a and b is category 0 according to the selected class. Specify which of category 4 is applicable. Then, the pixel series is smoothed by adding or subtracting the offset according to the corresponding category.
  • the gradation of the pixel value (that is, the maximum value that can be expressed according to the bit depth from 0) is divided into 32 bands, and pixels belonging to four consecutive bands are among them.
  • the pixel value is changed (added or subtracted) according to the offset value set for each band.
  • FIG. 2 is an explanatory diagram for explaining the outline of the band offset processing, and shows a case where the bit depth is 8 bits.
  • H. In H.265 / HEVC 8 bits (pixel value is 0 to 255) and 10 bits (pixel value is 0 to 1023) can be used as the bit depth of the pixel. That is, in the example in which the bit depth shown in FIG. 2 is 8 bits, the pixel values 0 to 255 are divided into 32 bands, and among the divided 0 to 31 bands, This shows a case where a band is selected.
  • the sample adaptive offset filter for each CTU, one of the edge offset processing and the band offset processing described above is selected, and an offset is applied to the corresponding pixel value according to the selected processing. Smoothing is performed by adding and subtracting.
  • FIG. 3 is a block diagram showing an example of the configuration of the image encoding device 1 according to the first embodiment. As shown in FIG.
  • the image encoding device 1 includes a rearrangement buffer 11, a subtraction unit 13, an orthogonal transformation unit 14, a quantization unit 15, a lossless encoding unit 16, a storage buffer 17, a rate Control unit 18, inverse quantization unit 21, inverse orthogonal transform unit 22, addition unit 23, loop filter 24, frame memory 25, selection units 26 and 27, intra prediction unit 30, and inter prediction unit 35.
  • the rearrangement buffer 11 rearranges images included in a series of image data.
  • the rearrangement buffer 11 rearranges the images according to the GOP (Group of Pictures) structure related to the encoding process, and then subtracts the rearranged image data, the intra prediction unit 30, the inter prediction unit 35, and the loop. Output to the filter 24.
  • GOP Group of Pictures
  • the subtraction unit 13 is supplied with image data input from the rearrangement buffer 11 and predicted image data input from the intra prediction unit 30 or the inter prediction unit 35 described later.
  • the subtraction unit 13 calculates prediction error data that is a difference between the image data input from the rearrangement buffer 11 and the prediction image data, and outputs the calculated prediction error data to the orthogonal transformation unit 14.
  • the orthogonal transform unit 14 performs orthogonal transform on the prediction error data input from the subtraction unit 13.
  • the orthogonal transformation performed by the orthogonal transformation part 14 may be discrete cosine transformation (Discrete Cosine Transform: DCT) or Karoonen-Labe transformation, for example.
  • Orthogonal transformation is performed for each TU (transformation unit) formed by dividing a CU.
  • the size of the TU is adaptively selected from 4 ⁇ 4 pixels, 8 ⁇ 8 pixels, 16 ⁇ 16 pixels, and 32 ⁇ 32 pixels.
  • the orthogonal transform unit 14 outputs transform coefficient data acquired by the orthogonal transform process to the quantization unit 15.
  • the quantization unit 15 is supplied with transform coefficient data input from the orthogonal transform unit 14 and a rate control signal from the rate control unit 18 described later.
  • the quantization unit 15 quantizes the transform coefficient data in a quantization step determined according to the rate control signal.
  • the quantization unit 15 outputs the quantized transform coefficient data (hereinafter referred to as quantized data) to the lossless encoding unit 16 and the inverse quantization unit 21.
  • the quantized data corresponds to an example of “bit stream”.
  • the lossless encoding unit 16 generates an encoded stream by performing a lossless encoding process on the quantized data input from the quantization unit 15. Further, the lossless encoding unit 16 encodes various parameters referred to by the decoder, and inserts the encoded parameters into the header area of the encoded stream.
  • the parameters encoded by the lossless encoding unit 16 may include the above-described parameters that specify the Quad-Tree structure, and information related to intra prediction and information related to inter prediction, which will be described later. Then, the lossless encoding unit 16 outputs the generated encoded stream to the accumulation buffer 17.
  • the accumulation buffer 17 temporarily accumulates the encoded stream input from the lossless encoding unit 16 using a storage medium such as a semiconductor memory. Then, the accumulation buffer 17 outputs the accumulated encoded stream to a transmission unit (not shown) (for example, a communication interface or a connection interface with a peripheral device) at a rate corresponding to the bandwidth of the transmission path.
  • a transmission unit for example, a communication interface or a connection interface with a peripheral device
  • the rate control unit 18 monitors the free capacity of the accumulation buffer 17. Then, the rate control unit 18 generates a rate control signal according to the free capacity of the accumulation buffer 17 and outputs the generated rate control signal to the quantization unit 15. For example, the rate control unit 18 generates a rate control signal for reducing the bit rate of the quantized data when the free capacity of the storage buffer 17 is small. For example, when the free capacity of the accumulation buffer 17 is sufficiently large, the rate control unit 18 generates a rate control signal for increasing the bit rate of the quantized data.
  • the inverse quantization unit 21, the inverse orthogonal transform unit 22, and the addition unit 23 constitute a local decoder.
  • the local decoder corresponds to an example of a “composite unit” that restores quantized data and generates decoded image data.
  • the inverse quantization unit 21 inversely quantizes the quantized data in the same quantization step as that used by the quantization unit 15 and restores transform coefficient data. Then, the inverse quantization unit 21 outputs the restored transform coefficient data to the inverse orthogonal transform unit 22.
  • the inverse orthogonal transform unit 22 restores the prediction error data by performing an inverse orthogonal transform process on the transform coefficient data input from the inverse quantization unit 21. Similar to the orthogonal transform, the inverse orthogonal transform is performed for each TU. Then, the inverse orthogonal transform unit 22 outputs the restored prediction error data to the addition unit 23.
  • the adder 23 adds the decoded prediction error data input from the inverse orthogonal transform unit 22 and the predicted image data input from the intra prediction unit 30 or the inter prediction unit 35, thereby obtaining decoded image data (reconstruction). Image). Then, the adder 23 outputs the generated decoded image data to the loop filter 24 and the frame memory 25.
  • the loop filter 24 includes a filter group such as a deblocking filter (DF), a sample adaptive offset (SAO) filter, and an adaptive loop filter (ALF) for the purpose of improving image quality.
  • the loop filter 24 performs a filtering process on the decoded image data input from the adding unit 23 based on the original image data supplied from the rearrangement buffer 11 and outputs the decoded image data after filtering to the frame memory 25. The details of the loop filter 24 will be described later separately.
  • the frame memory 25 stores the decoded image data before filtering input from the adding unit 23 and the decoded image data after filtering input from the loop filter 24 using a storage medium.
  • the selection unit 26 reads out the decoded image data before filtering used for intra prediction from the frame memory 25, and supplies the read decoded image data to the intra prediction unit 30 as reference image data. Also, the selection unit 26 reads out the decoded image data after filtering used for inter prediction from the frame memory 25 and supplies the read out decoded image data to the inter prediction unit 35 as reference image data.
  • the selection unit 27 In the intra prediction mode, the selection unit 27 outputs predicted image data as a result of the intra prediction output from the intra prediction unit 30 to the subtraction unit 13 and outputs information related to the intra prediction to the lossless encoding unit 16. In addition, in the inter prediction mode, the selection unit 27 outputs prediction image data as a result of the inter prediction output from the inter prediction unit 35 to the subtraction unit 13 and outputs information related to the inter prediction to the lossless encoding unit 16. To do. The selection unit 27 switches between the intra prediction mode and the inter prediction mode according to the cost.
  • the intra prediction unit 30 performs an intra prediction process for each PU (prediction unit) formed by dividing a CU based on the original image data and the decoded image data. For example, the intra prediction unit 30 evaluates the prediction result of each candidate mode in the prediction mode set using a predetermined cost function. Next, the intra prediction unit 30 selects the prediction mode with the lowest cost, that is, the prediction mode with the highest compression rate, as the optimal prediction mode. Further, the intra prediction unit 30 generates predicted image data according to the optimal prediction mode. Then, the intra prediction unit 30 outputs information related to intra prediction including prediction mode information representing the selected optimal prediction mode, cost, and predicted image data to the selection unit 27.
  • prediction mode information representing the selected optimal prediction mode, cost, and predicted image data
  • the inter prediction unit 35 performs inter prediction processing for each PU formed by dividing the CU based on the original image data and the decoded image data. For example, the inter prediction unit 35 evaluates the prediction result of each candidate mode in the prediction mode set using a predetermined cost function. Next, the inter prediction unit 35 selects the prediction mode with the lowest cost, that is, the prediction mode with the highest compression rate, as the optimal prediction mode. Further, the inter prediction unit 35 generates predicted image data according to the optimal prediction mode. Then, the inter prediction unit 35 outputs to the selection unit 27 information, cost, and predicted image data regarding inter prediction including the prediction mode information representing the selected optimal prediction mode and motion information.
  • FIG. 4 is a block diagram showing an example of the configuration of the loop filter 24 according to the present embodiment.
  • the loop filter 24 includes an original image holding unit 100, a deblocking filter 200, a sample adaptive offset (SAO) filter 300, and an adaptive loop filter 400.
  • SAO sample adaptive offset
  • the original image holding unit 100 is a holding unit for holding original image data supplied from the rearrangement buffer 11 to the loop filter 24.
  • Each component in the loop filter 24 executes each filter process by appropriately referring to the original image data held in the original image holding unit 100.
  • the decoded image data (reconstructed image) decoded by the inverse quantization unit 21, the inverse orthogonal transform unit 22, and the addition unit 23 (that is, the local decoder) is first supplied to the deblock filter 200.
  • the deblocking filter 200 removes block distortion of the decoded image data by appropriately performing a deblocking filter process. In this description, a detailed description of the deblocking filter process is omitted.
  • the deblocking filter 200 outputs the filter processing result to the sample adaptive offset filter 300.
  • the sample adaptive offset filter 300 determines the SAO mode to be applied and the offset value to be applied to the decoded image data after the filtering by the deblocking filter 200 for each CTU.
  • the SAO mode indicates which of the edge offset and the band offset shown in FIGS. 1 and 2 is selected.
  • the SAO mode is selected from among the edge offset classes EO_0 to EO_3 shown in FIG. 1, and among the categories 0 to 4 corresponding to the class. It shows which category was selected.
  • the SAO mode indicates which band is selected from the bands of the band offset shown in FIG.
  • the sample adaptive offset filter 300 performs filter processing (hereinafter, may be referred to as “SAO processing”) for each CTU on the decoded image data based on the determined mode and offset value.
  • SAO processing filter processing
  • the sample adaptive offset filter 300 reduces the processing load of the SAO processing based on a quantization step (QP: Quantization Parameter) when generating quantized data that is a decoding source of the decoded image data.
  • QP Quantization Parameter
  • the acquisition source is not particularly limited as long as the sample adaptive offset filter 300 can acquire the quantization step of the quantized data that is the decoding source of the decoded image data.
  • the sample adaptive offset filter 300 may acquire the quantization step from the quantization unit 15. Details of the sample adaptive offset filter 300 according to this embodiment will be described later.
  • the sample adaptive offset filter 300 outputs the decoded image data after the SAO processing to the adaptive loop filter 400. Further, the sample adaptive offset filter 300 outputs the SAO mode and offset value determined for each CTU to the lossless encoding unit 16 as encoding parameters. Receiving this output, the lossless encoding unit 16 encodes the supplied SAO mode and offset value with respect to the generated encoded stream, and inserts it into the header area of the encoded stream.
  • the adaptive loop filter 400 performs an adaptive loop filter (ALF: Adaptive Loop Filter) process on the decoded image data after the SAO process supplied from the sample adaptive offset filter 300.
  • ALF Adaptive Loop Filter
  • a two-dimensional Wiener filter is used as a filter.
  • filters other than the Wiener filter may be used.
  • the adaptive loop filter 400 has a plurality of filters with different tap sizes, and performs adaptive loop filter processing.
  • the adaptive loop filter 400 outputs the filter processing result to the frame memory 25.
  • FIGS. 5 and 6 are explanatory diagrams for explaining a flow of a series of processes of the image encoding device according to the present embodiment.
  • FIG. 5 shows a flow of processing in which the image encoding apparatus divides the picture P1 into a plurality of blocks (CTU) and encodes the blocks.
  • the image encoding apparatus performs processing by dividing the picture P1 into a plurality of CTUs having a fixed block size by performing raster scan from the upper left to the lower right. That is, in the example shown in FIG. 5, the image encoding apparatus divides and processes the picture P1 in the order of blocks U11, U12,..., U1m, U21, U22, U23, and U24.
  • the blocks U11 to U1m, U21, and U22 are processed blocks, and among the processed blocks, the blocks U13 and U22 in particular are adjacent blocks to the processing target block U23.
  • FIG. 6 is a flowchart showing an example of a flow of a series of processes of the image encoding device according to the present embodiment.
  • decoded image data of one CTU in the picture P1 is generated, and the loop filter 24 performs filtering.
  • the flow of processing is shown until processing is performed. Note that in this description, attention is focused on the generation of decoded image data, and description of processing for generating and outputting an encoded stream by lossless encoding of quantized data is omitted.
  • Step S11 The rearrangement buffer 11 (see FIG. 3) rearranges the images included in the series of image data.
  • the rearrangement buffer 11 rearranges the images according to the GOP (Group of Pictures) structure related to the encoding process, and then subtracts the rearranged image data, the intra prediction unit 30, the inter prediction unit 35, and the loop. Output to the filter 24.
  • GOP Group of Pictures
  • the selection unit 26 reads decoded image data before filtering used for intra prediction from the frame memory 25 and supplies the read decoded image data to the intra prediction unit 30 as reference image data. Also, the selection unit 26 reads out the decoded image data after filtering used for inter prediction from the frame memory 25 and supplies the read out decoded image data to the inter prediction unit 35 as reference image data.
  • the intra prediction unit 30 performs an intra prediction process for each PU (prediction unit) formed by dividing a CU based on the supplied original image data and decoded image data.
  • the intra prediction unit 30 and the original image data of the block U23 and the decoded image data of the processed adjacent blocks U13 and U22 Intra prediction processing is executed based on the above.
  • the intra prediction unit 30 evaluates the prediction result of each candidate mode in the prediction mode set using a predetermined cost function, and selects the optimal prediction mode based on the evaluation result. Further, the intra prediction unit 30 generates predicted image data according to the optimal prediction mode. Then, the intra prediction unit 30 outputs information related to intra prediction including prediction mode information representing the selected optimal prediction mode, cost, and predicted image data to the selection unit 27.
  • the inter prediction unit 35 performs inter prediction processing for each PU formed by dividing the CU based on the original image data and the decoded image data.
  • the inter prediction unit 35 evaluates the prediction result of each candidate mode in the prediction mode set using a predetermined cost function, and selects the optimum prediction mode based on the evaluation result. Further, the inter prediction unit 35 generates predicted image data according to the optimal prediction mode. Then, the inter prediction unit 35 outputs to the selection unit 27 information, cost, and predicted image data regarding inter prediction including the prediction mode information representing the selected optimal prediction mode and motion information.
  • the selection unit 27 In the intra prediction mode, the selection unit 27 outputs predicted image data as a result of the intra prediction output from the intra prediction unit 30 to the subtraction unit 13 and outputs information related to the intra prediction to the lossless encoding unit 16. In addition, in the inter prediction mode, the selection unit 27 outputs prediction image data as a result of the inter prediction output from the inter prediction unit 35 to the subtraction unit 13 and outputs information related to the inter prediction to the lossless encoding unit 16. To do. The selection unit 27 switches between the intra prediction mode and the inter prediction mode according to the cost.
  • Step S12 The subtraction unit 13 is supplied with image data input from the rearrangement buffer 11 and predicted image data input from the intra prediction unit 30 or the inter prediction unit 35.
  • the subtraction unit 13 calculates prediction error data that is a difference between the image data input from the rearrangement buffer 11 and the prediction image data, and outputs the calculated prediction error data to the orthogonal transformation unit 14.
  • the orthogonal transform unit 14 performs orthogonal transform on the prediction error data input from the subtraction unit 13.
  • the orthogonal transform unit 14 outputs transform coefficient data acquired by the orthogonal transform process to the quantization unit 15.
  • the quantization unit 15 is supplied with transform coefficient data input from the orthogonal transform unit 14 and a rate control signal from the rate control unit 18.
  • the quantization unit 15 quantizes the transform coefficient data in a quantization step determined according to the rate control signal.
  • the quantization unit 15 outputs the quantized transform coefficient data (that is, quantized data) to the lossless encoding unit 16 and the inverse quantization unit 21.
  • Step S14 The inverse quantization unit 21 inversely quantizes the quantized data in the same quantization step as that used by the quantization unit 15 to restore transform coefficient data. Then, the inverse quantization unit 21 outputs the restored transform coefficient data to the inverse orthogonal transform unit 22.
  • the inverse orthogonal transform unit 22 restores the prediction error data by performing an inverse orthogonal transform process on the transform coefficient data input from the inverse quantization unit 21. Similar to the orthogonal transform, the inverse orthogonal transform is performed for each TU. Then, the inverse orthogonal transform unit 22 outputs the restored prediction error data to the addition unit 23.
  • Step S15 The adder 23 adds the decoded prediction error data input from the inverse orthogonal transform unit 22 and the predicted image data input from the intra prediction unit 30 or the inter prediction unit 35, thereby obtaining decoded image data (reconstruction). Image). Then, the adder 23 outputs the generated decoded image data to the loop filter 24 and the frame memory 25.
  • Step S16 The decoded image data output to the loop filter 24 is supplied to the deblock filter 200 (see FIG. 4).
  • the deblocking filter 200 removes block distortion of the decoded image data by appropriately performing a deblocking filter process.
  • the deblocking filter 200 outputs the filter processing result to the sample adaptive offset filter 300.
  • Step S17 The sample adaptive offset filter 300 determines, for each CTU, the SAO mode to be applied and the offset value to be applied to the decoded image data after filtering by the deblocking filter 200.
  • the sample adaptive offset filter 300 performs filter processing (that is, SAO processing) on the decoded image data for each CTU based on the determined mode and offset value. That is, at the opportunity shown in step S17, SAO processing is performed on the processing target block U23 shown in FIG.
  • the sample adaptive offset filter 300 outputs the decoded image data after the SAO processing to the adaptive loop filter 400. Further, the sample adaptive offset filter 300 outputs the SAO mode and the offset value determined for each CTU (that is, for each LCU) to the lossless encoding unit 16 as encoding parameters. Receiving this output, the lossless encoding unit 16 encodes the supplied SAO mode and offset value with respect to the generated encoded stream, and inserts it into the header area of the encoded stream.
  • the adaptive loop filter 400 performs an adaptive loop filter (ALF: Adaptive Loop Filter) process on the decoded image data after the SAO process supplied from the sample adaptive offset filter 300.
  • ALF Adaptive Loop Filter
  • Step S19 The adaptive loop filter 400 outputs the filter processing result to the frame memory 25.
  • the decoded image data of the block U 23 shown in FIG. 5 is generated and stored in the frame memory 25.
  • the decoded image data of the block U23 stored in the frame memory 25 is used, for example, for intra prediction and inter prediction of a block adjacent to the block U23 (for example, the block U24) among the unprocessed blocks shown in FIG. It is done.
  • FIG. 7 is a block diagram showing an example of the configuration of the sample adaptive offset filter 300 according to the first embodiment.
  • the sample adaptive offset filter 300 includes a control unit 310 and a filter processing unit 390.
  • Control unit 310 includes an analysis unit 320 and a switching determination unit 360.
  • the control unit 310 corresponds to an example of a “setting unit”.
  • the switching determination unit 360 determines whether or not the SAO process can be applied to each of the luminance and chromaticity for each slice of the decoded image data, and controls the operation of the analysis unit 320 based on the determination result.
  • the switching determination unit 360 instructs the analysis unit 320 to apply the SAO process to the slice.
  • the switching determination unit 360 counts the number of CTUs to which SAO processing has been applied (hereinafter, the I slice or the P slice) immediately before the B slice. , It may be referred to as “number of modes”), to determine whether or not the SAO processing can be applied to the B slice.
  • the switching determination unit 360 when the number of modes in the immediately preceding slice is equal to or greater than a predetermined threshold TH11 (for example, half or more), the switching determination unit 360 applies to the analysis unit 320 the application of SAO processing to the B slice to be processed. Instruct. On the other hand, when the number of modes in the immediately preceding slice is less than the threshold value TH11, the switching determination unit 360 analyzes the analysis unit 320 so as to limit the application of the SAO process to the processing target B slice (that is, do not apply). To instruct.
  • a predetermined threshold TH11 for example, half or more
  • the switching determination unit 360 outputs the applicability of SAO processing for each slice to the lossless encoding unit 16 as a parameter at the time of encoding.
  • parameters for controlling whether to apply SAO processing for each slice include “slice_sao_luma_flag” corresponding to luminance and “slice_sao_chroma_flag” corresponding to chromaticity.
  • the analysis unit 320 includes a statistic acquisition unit 330 and a mode determination unit 340.
  • the analysis unit 320 is based on the original image data held in the original image holding unit 100 (see FIG. 4) and the decoded image data output from the deblocking filter 200, and the SAO mode and offset for performing SAO processing.
  • a value is determined for each CTU (ie, for each LCU). Note that whether or not the analysis unit 320 can be applied is controlled in units of slices based on an instruction from the switching determination unit 360. Below, the detail of each structure of the analysis part 320 is demonstrated.
  • the statistic acquisition unit 330 calculates a statistic for specifying the SAO mode and offset based on the original image data and the decoded image data.
  • the statistic acquisition unit 330 analyzes the correspondence between the target pixel and adjacent pixels for each of the edge offset classes EO_0 to EO_3 illustrated in FIG. 1 in units of pixels in the decoded image data. The frequency of occurrence for each of categories 0 to 4 is counted. Further, at this time, the statistic acquisition unit 330 cumulatively counts the difference in pixel value between the decoded image data and the original image data for each of the counted categories. Then, the statistic acquisition unit 330 calculates the appearance frequency of each of the categories 0 to 4 counted for each of the classes EO_0 to EO_3 and the pixel value accumulated for each category as a statistic.
  • the statistic acquisition unit 330 counts the frequency of the corresponding pixel for each of the band offset bands 0 to 31 shown in FIG. 2, and calculates the pixel value between the decoded image data and the original image data at that pixel. Accumulate the difference for each band. Then, the statistic acquisition unit 330 calculates the frequency counted for each band and the difference between the pixel values accumulated for each band as the statistic.
  • Statistic acquisition unit 330 outputs the statistic calculated as described above to mode determination unit 340.
  • the mode determination unit 340 includes an offset determination unit 350. Based on the statistic supplied from the statistic acquisition unit 330, the mode determination unit 340 calculates an offset value and a cost corresponding to the offset value for each SAO mode in CTU units in the decoded image data. 350.
  • the mode determination unit 340 sends the offset value and the cost corresponding to the offset value to the offset determination unit 350 for each combination of the edge offset classes EO_0 to EO_3 and the categories 1 to 4. Let it be calculated. Similarly, the mode determination unit 340 causes the offset determination unit 350 to calculate an offset value and a cost corresponding to the offset value for each band of the band offset. The mode determination unit 340 also calculates a cost when the SAO process is not applied.
  • the offset determination unit 350 calculates a cost for each offset value candidate for the mode instructed by the mode determination unit 340. Then, the offset determination unit 350 compares the calculated costs to identify the offset value that can improve the coding efficiency most and the cost corresponding to the offset value. Details of the offset determination unit 350 will be described later.
  • the mode determination unit 340 compares the costs calculated for each mode of SAO, and based on the comparison result, the mode of SAO that can improve the coding efficiency most, and the offset value corresponding to the mode. Is specified for each CTU (ie, for each LCU). And the mode determination part 340 outputs the mode specified for every CTU and the offset value corresponding to the said mode to the filter process part 390 mentioned later. At this time, if it is determined that the SAO processing is not applied as a result of the cost comparison, the mode determination unit 340 instructs the filter processing unit 390 not to apply the SAO processing to the target CTU. .
  • the mode determination unit 340 outputs the SAO mode and offset value specified for each CTU to the lossless encoding unit 16 as parameters at the time of encoding.
  • the parameters at the time of encoding include “sao_type_idx_luma” corresponding to luminance and “sao_typ_idx_chroma” corresponding to chromaticity as parameters indicating either edge offset or band offset.
  • edge offset when edge offset is applied, “sao_eo_class_luma” corresponding to luminance and “sao_eo_class_chroma” corresponding to chromaticity can be cited as parameters indicating the class of edge offset.
  • “sao_band_position” can be cited as a parameter indicating the position of the band.
  • “sao_offset_abs” indicating the absolute value of the offset value and “sao_offset_sign” indicating the positive / negative of the offset value can be cited as parameters for notifying the offset value.
  • the filter processing unit 390 performs SAO processing on each CTU of the decoded image data based on the SAO mode and the offset value supplied from the mode determination unit 340.
  • the filter processing unit 390 does not perform the SAO processing on the target CTU.
  • the filter processing unit 390 should not perform SAO processing on the corresponding slice based on the determination result. Needless to say.
  • the filter processing unit 390 outputs the decoded image data subjected to the SAO process to the adaptive loop filter 400 (see FIG. 4).
  • FIG. 8 is a flowchart illustrating an example of a flow of a series of processes of the sample adaptive offset filter according to the present embodiment.
  • Step S100 the switching determination unit 360 determines whether or not the SAO process can be applied to each of the luminance and chromaticity for each slice of the decoded image data, and controls the operation of the analysis unit 320 based on the determination result.
  • the operation related to the determination of whether or not the SAO process can be applied by the switching determination unit 360 will be described later in detail.
  • Step S500 When it is determined that the SAO process is applied to the slice (step S200, YES), the analysis unit 320 performs the SAO process based on the original image data and the decoded image data (after the deblocking filter process). The SAO mode and the offset value for performing the above are determined for each CTU.
  • the statistic acquisition unit 330 calculates a statistic for specifying the SAO mode and offset based on the original image data and the decoded image data, and sends the calculated statistic to the mode determination unit 340. Output.
  • the mode determination unit 340 Based on the statistic supplied from the statistic acquisition unit 330, the mode determination unit 340 provides the offset determination unit 350 with the cost of each value that can be taken as an offset value for each mode of SAO in the decoded image data. Let it be calculated.
  • the mode determination unit 340 compares the costs calculated for each mode of SAO, and selects the SAO mode that can improve the coding efficiency most based on the comparison result for each CTU (ie, for each LCU). To be specific. And the mode determination part 340 outputs the mode specified for every CTU and the offset value corresponding to the said mode to the filter process part 390 mentioned later. Also, the mode determination unit 340 outputs the SAO mode and offset value specified for each CTU to the lossless encoding unit 16 as encoding parameters.
  • Step S600 The filter processing unit 390 performs SAO processing on each CTU of the decoded image data based on the SAO mode and the offset value supplied from the mode determination unit 340.
  • Step S700 The above process is executed for a series of CTUs in the target slice (step S700, NO), and upon completion of the process for the series of CTUs (step S700, YES), the application of the SAO process to the target slice is completed. To do.
  • Step S200 When the SAO process is not applied to the target slice (step S200, NO), the processes shown in steps S300 to S700 are not executed for the slice.
  • FIG. 9 is a flowchart illustrating an example of processing related to determination of whether or not to apply SAO processing for each slice by the switching determination unit according to the present embodiment.
  • Step S101 and S104 If the slice to be processed is not a B slice, that is, if it is either an I slice or a P slice (step S101, NO), the switching determination unit 360 analyzes the application of the SAO process to the slice. (Step S104).
  • Step S101 and S102 In addition, when the slice to be processed is a B slice (YES in step S101), the switching determination unit 360 applies the SAO process to the slice immediately before the B slice (that is, the I slice or the P slice). The number of CTUs (number of modes) is acquired (step S102).
  • Step S103 and S104 If the acquired mode number is equal to or greater than the predetermined threshold TH11 (step S103, NO), the switching determination unit 360 instructs the analysis unit 320 to apply the SAO process to the slice (step S104).
  • Step S103 and S105 On the other hand, when the acquired mode number is less than the predetermined threshold value TH11 (step S103, YES), the switching determination unit 360 restricts the application of the SAO process to the slice (that is, does not apply). To the analysis unit 320 (step S105).
  • the switching determination unit 360 determines whether the SAO process can be applied for each slice, and controls the operation of the analysis unit 320 based on the determination result.
  • Offset judgment unit 350 calculates the cost for each possible value as an offset value based on the statistic generated by the statistic acquisition unit 330, and compares the calculated costs to improve the coding efficiency most. Identify possible offset values.
  • the bit depth of the pixel is 10 bits
  • the number of offset value candidates is four times that in the case where the bit depth is 8 bits, so the amount of processing for cost calculation increases, It may cause an increase in circuit scale and power consumption. Therefore, in this description, in order to make the characteristics of the offset determination unit 350 according to the present embodiment easier to understand, first, an overview of the offset determination unit based on the conventional method is described as a comparative example, and then, according to the present embodiment.
  • the offset determination unit 350 will be described.
  • FIG. 10 is a block diagram illustrating an example of the configuration of the offset determination unit 350a according to the comparative example.
  • the offset determination unit 350 a includes one or more offset measurement units 351 and an offset determination unit 353.
  • the offset measurement unit 351 is based on the statistic generated by the statistic acquisition unit 330 (for example, the appearance frequency of the pixel to be processed or the difference in pixel value between the decoded image data and the original image data). For each offset value, the cost when the offset value is applied is calculated. Note that the cost calculated at this time means, for example, each offset value in order to reduce an error (for example, quantization error) between the original image data generated in the decoded image data and bring it closer to the original image data. The amount of data required for the offset processing based on that (that is, the amount of data transmitted to the decoder side) and the like. Detailed description of the cost calculation is omitted in this specification.
  • the Offset [0] measuring unit to Offset [31] measurement are performed. Is provided.
  • the table indicated by the reference sign d40 in FIG. 11 corresponds to each offset measurement unit 351 shown in FIG. 10 (ie, Offset [0] measurement unit to Offset [31] measurement unit) and each offset value. Showing the relationship. As illustrated in FIG. 11, the Offset [0] measurement unit calculates the cost when the offset value is 0. Similarly, Offset [1] measurement unit to Offset [31] measurement unit are associated with offset values 1 to 31, respectively.
  • the Offset [0] measurement unit indicated by reference numeral 351a among the Offset [0] measurement unit to Offset [31] measurement unit Offset [7] measurement part is used. Further, when the bit depth is 10 bits, all of the Offset [0] measurement unit to the Offset [31] measurement unit indicated by reference numeral 351b are used.
  • the offset determination unit 353 compares the costs calculated by the respective offset measurement units 351, and determines the offset value with the lowest cost from the offset value candidates based on the comparison result. Then, the offset determination unit 353 outputs the determined offset value and the cost corresponding to the offset value. Upon receiving this output, the mode determination unit 340 (see FIG. 7) compares the costs calculated for each mode of the SAO, and based on the comparison result, the SAO that can improve the coding efficiency most. The mode and the offset value corresponding to the mode are specified for each CTU (that is, for each LCU).
  • FIG. 12 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350a according to the comparative example.
  • Step S611 to S614 the offset determination unit 350a initializes Count, which is a counter value, with 0 (step S611). Then, the cost is calculated for the offset value candidate indicated by the counter value Count. For example, when the counter value Count is 0, the offset determination unit 350a calculates the cost of the offset value “0”. At this time, in the case of the example shown in FIG. 10, the Offset [0] measurement unit among the offset measurement units 351 calculates the cost of the offset value “0”. Similarly, when the counter value Count is 1, the offset determination unit 350a calculates the cost of the offset value “1” (step S613). When the calculation of the cost is completed, the offset determination unit 350a increments the counter value Count (step S614).
  • Count is a counter value
  • the offset determination unit 350a calculates the cost at each offset value according to the bit depth of the pixel (step S612, NO). For example, when the bit depth is 8 bits, the offset determination unit 350a calculates the cost for each of the offset values “0” to “7”. When the bit depth is 10 bits, the offset determination unit 350a calculates the cost for each of the offset values “0” to “31”.
  • Step S615 When the calculation of the cost of each counter value is completed according to the bit depth (step S612, YES), the offset determination unit 350a compares the cost of each calculated offset value, and based on the comparison result, the offset with the lowest cost Determine the value.
  • the offset determination unit 350a uses the offset values 0 to 7 For each of these, a total of eight cost calculations are performed.
  • the offset value can be 0 to 31, so that the offset determination unit 350a performs the cost calculation a total of 32 times for each of the offset values 0 to 31.
  • the number of offset value candidates is four times that of the case where the bit depth is 8 bits.
  • the amount of processing is four times that of the case. Therefore, when processing an image with a bit depth of 10 bits, as described with reference to FIG. 12, the number of cost calculations (processing amount) for each offset value is smaller than when the bit depth is 8 bits. 4 times, which may increase power consumption.
  • the number of offset measurement units 351 that is, Offset [ 0] measuring unit to Offset [31] measuring unit
  • the circuit scale is often increased.
  • a circuit for calculating the cost of offset values 8 to 31 that is additionally required that is, Offset [8] measurement unit to Offset [31]
  • the measurement unit is not used when the pixel bit depth is 8 bits. In other words, as long as an image with a pixel bit depth of 8 bits is processed, the Offset [8] measurement unit to the Offset [31] measurement unit can have a redundant configuration.
  • the offset determination unit 350 limits the offset value candidates from the values that can be taken as offset values (that is, 0 to 31).
  • the offset value to be applied is specified from the candidates.
  • the offset determination unit 350 according to the present embodiment shares the processing amount for cost calculation of each offset value between the case where the bit depth is 8 bits and the case where the bit depth is 10 bits. And reduce power consumption. Therefore, details of the offset determination unit 350 according to the present embodiment will be described below.
  • FIG. 13 is a block diagram illustrating an example of the configuration of the offset determination unit 350 according to the first embodiment.
  • the offset determination unit 350 includes a candidate control unit 355, and includes only an Offset [0] measurement unit to an Offset [7] measurement unit as the offset measurement unit 351.
  • the offset determination unit 350a Different from the offset determination unit 350a according to the comparative example shown in FIG. Therefore, in this description, each configuration of the offset determination unit 350 according to the present embodiment will be described mainly by focusing on a different part from the offset determination unit 350a.
  • the candidate control unit 355 determines offset value candidates based on the bit depth of the pixels and the quantization step (QP) when generating the quantized data that is the decoding source of the decoded image data, and each of the determined candidates Each is assigned to the Offset [0] measurement unit to the Offset [7] measurement unit.
  • the acquisition source of the quantization step is not particularly limited as described above.
  • the candidate control unit 355 acquires, from the quantization unit 15, the quantization step applied when the quantization unit 15 generates the quantization data that is the decoding source of the decoded image data. Also good.
  • the candidate control unit 355 selects the offset value candidate from the values that can be taken as the offset value (that is, 0 to 31) when the bit depth of the pixel is 10 bits. Limit based on quantization step. Then, the candidate control unit 355 assigns each of the limited offset value candidates to the Offset [0] measurement unit to the Offset [7] measurement unit.
  • FIG. 14 to FIG. 16 are explanatory diagrams for explaining an example of a control table showing the correspondence between each offset value candidate and the Offset [0] measurement unit to Offset [7] measurement unit.
  • N is an integer of 0 ⁇ N
  • N + 1 is This corresponds to the number of offset value candidates.
  • the pixel bit depth is 8 bits
  • the pixel bit depth is 10 bits
  • the quantization step is less than the first threshold TH21 (QP ⁇ TH21).
  • the control table d52 shown in FIG. 15 corresponds to the case where the bit depth of the pixel is 10 bits and the quantization step is greater than the first threshold TH21 and less than or equal to the second threshold TH22 (TH21 ⁇ QP ⁇ TH22). Needless to say, the second threshold value TH22 is larger than the first threshold value TH21.
  • the control table d53 shown in FIG. 16 corresponds to the case where the bit depth of the pixel is 10 bits and the quantization step is larger than the second threshold value TH22 (TH22 ⁇ QP).
  • the candidate control unit 355 selects any one of the control tables d51 to d53 based on the bit depth of the pixel and the acquired quantization step, and the Offset [0] measurement unit according to the selected control table.
  • Offset [7] Offset value candidates are assigned to each measurement unit.
  • the candidate control unit 355 sets the offset value candidate so that the maximum value of the offset value is smaller as the quantization step is smaller. Is set to be smaller (ie, the difference between adjacent candidates).
  • the candidate control unit 355 sets the maximum offset value candidate to be larger as the quantization step is larger, and the interval between adjacent candidates ( That is, it is set so that the difference between adjacent candidates) becomes larger.
  • the candidate control unit 355 determines the number of offset value candidates when the pixel bit depth is 10 bits as the number of offset value candidates when the pixel bit depth is 8 bits (in other words, the offset value in the case of 8 bits). Range of possible values).
  • the values of the first threshold value TH21 and the second threshold value TH22 are determined in advance by performing an experiment in advance according to the configuration of the image encoding device and various parameters (for example, the resolution of the original image data). do it.
  • the configuration described above is merely an example, and the number of offset measurement units 351 and the number of control tables for specifying offset value candidates may be changed as appropriate.
  • the candidates for offset values set in each control table and the threshold value for switching each control table are determined in advance experiments or the like. An appropriate value determined based on this may be set in advance.
  • each offset measurement unit 351 calculates a cost for the assigned offset value candidate and outputs the cost to the offset determination unit 353.
  • the offset determination unit 353 compares the costs calculated by the respective offset measurement units 351, and determines the offset value with the lowest cost from the offset value candidates based on the comparison result. Then, the offset determination unit 353 outputs the determined offset value and the cost corresponding to the offset value. Upon receiving this output, the mode determination unit 340 (see FIG. 7) compares the costs calculated for each mode of the SAO, and based on the comparison result, the SAO that can improve the coding efficiency most. The mode and the offset value corresponding to the mode are specified for each CTU (that is, for each LCU).
  • the offset determination unit 350 according to the present embodiment can limit the processing amount of the cost calculation when the bit depth of the pixel is 10 bits to the processing amount equivalent to the case of 8 bits. It becomes. Therefore, even when the bit depth is 10 bits, the offset determination unit 350 according to the present embodiment has the same configuration as that of the 8-bit offset measurement unit 351 (that is, Offset [0] measurement unit to Offset [7]
  • the offset value can be determined using the measurement unit. That is, according to the offset determination unit 350 according to the present embodiment, the circuit scale can be reduced as compared with the offset determination unit 350a according to the comparative example.
  • the offset determination unit 350 according to the present embodiment can reduce power consumption as compared with the offset determination unit 350a according to the comparative example as the processing amount of the cost calculation is reduced.
  • the configuration of the offset determination unit 350 described above with reference to FIG. 13 is merely an example, and is not necessarily limited to the configuration illustrated in FIG.
  • the offset determination unit 350 according to the present embodiment is provided with Offset [0] measurement unit to Offset [31] measurement unit as the offset measurement unit 351, and a mode in which only part is used and a mode in which all are used.
  • the offset determination unit 350 may be configured to be switched.
  • the offset measurement unit 351 when it is necessary to limit power consumption as in battery driving, as described above, only the Offset [0] measurement unit to the Offset [7] measurement unit may be used as the offset measurement unit 351. Good. Further, when the processing amount can be further improved as in the case of power supply driving, all of the Offset [0] measurement unit to the Offset [31] measurement unit are used as the offset measurement unit 351, and the comparison described above.
  • the offset determination unit 350a according to the example may operate similarly.
  • the offset measurement unit 351 according to the present embodiment switches to a mode in which only a part of the offset measurement units 351 is used according to a predetermined condition, such as a situation in which the image coding apparatus operates. Thus, the configuration may be such that the processing amount of the cost calculation can be reduced.
  • FIG. 17 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 according to the present embodiment.
  • the constant N (N is an integer of 0 ⁇ N) is a value determined according to the number of offset value candidates (in other words, the number of offset measuring units 351), as described above.
  • N + 1 corresponds to the number of offset value candidates.
  • Step S621 First, the offset determination unit 350 initializes Count, which is a counter value, with 0 (step S611). Then, the cost is calculated for the offset value candidate indicated by the counter value Count. At this time, the offset determination unit 350 restricts offset value candidates based on the bit depth of the pixel and the quantization step (QP) when generating the quantized data that is the decoding source of the decoded image data.
  • Count is a counter value
  • QP quantization step
  • Steps S623 and S624 Specifically, one of a case where the bit depth of the pixel is 8 bits and a case where the bit depth of the pixel is 10 bits and the quantization step is equal to or less than the first threshold TH21 (QP ⁇ TH21). In such a case (step S623, NO), the offset determination unit 350 selects the table 1 corresponding to the condition.
  • a specific example of the table 1 is a control table d51 shown in FIG.
  • the offset determination unit 350 specifies offset value candidates indicated by the counter value Count based on the selected table 1, and calculates a cost for the specified candidates.
  • the counter value Count i (i is an integer of 0 ⁇ i ⁇ N)
  • i is specified as a candidate offset value.
  • Step S625 when the bit depth of the pixel is 10 bits and the quantization step is larger than the first threshold value TH21 (step S624, YES), the offset determination unit 350 determines that the quantization step is the second threshold value. It is determined whether it is greater than TH22 (TH22> TH21).
  • Step S626 When the quantization step is equal to or smaller than the second threshold TH22 (step S625, NO), the offset determination unit 350 selects the table 2 corresponding to the condition.
  • a specific example of the table 2 is a control table d52 shown in FIG.
  • the offset determination unit 350 specifies offset value candidates indicated by the counter value Count based on the selected table 2, and calculates a cost for the specified candidates.
  • the counter value Count i (i is an integer of 0 ⁇ i ⁇ N)
  • 2 ⁇ i is specified as a candidate offset value.
  • Step S627 When the quantization step is larger than the second threshold TH22 (step S625, YES), the offset determination unit 350 selects the table 3 corresponding to the condition.
  • a specific example of the table 3 is a control table d53 shown in FIG.
  • the offset determination unit 350 identifies offset value candidates indicated by the counter value Count based on the selected table 3, and calculates a cost for the identified candidates.
  • the counter value Count i (i is an integer satisfying 0 ⁇ i ⁇ N)
  • 4 ⁇ i is specified as a candidate offset value.
  • Step S628 The offset determination unit 350 identifies an offset value candidate indicated by the counter value Count, and increments the counter value Count when cost calculation is completed for the identified candidate.
  • Step S622 the offset determination unit 350 specifies offset value candidates until the counter value Count exceeds a predetermined constant N, and calculates the cost for the specified candidates (NO in step S622).
  • Step S629) For each of the counter values Count from 0 to N, an offset value candidate is specified, and when cost calculation is completed for the specified candidate (YES in step S622), the offset determination unit 350 calculates each offset value candidate. Compare costs. And the offset determination part 350 determines a candidate with the lowest cost as an offset value based on the said comparison result.
  • the offset determination unit 350 generates a bit depth of a pixel and a quantization step when generating quantized data that is a decoding source of the decoded image data ( QP) and limit offset value candidates for SAO processing.
  • the offset determination unit 350 can limit the processing amount of the cost calculation when the bit depth of the pixel is 10 bits to a processing amount equivalent to the case of 8 bits. Become. Therefore, according to the offset determination unit 350 according to the present embodiment, even when the bit depth is 10 bits, the same configuration as in the case of 8 bits is used as the configuration for calculating the cost of each candidate offset value. Thus, the offset value can be determined. That is, according to the image coding apparatus according to the present embodiment, the circuit scale of the offset determination unit 350 is reduced as compared with the case where the cost is calculated for each offset value that can be taken when the bit depth of the pixel is 10 bits. It becomes possible. In addition, the image coding apparatus according to the present embodiment can further reduce power consumption as the amount of cost calculation decreases when the bit depth of a pixel is 10 bits.
  • the offset determination unit 350 may limit offset value candidates based on the feature amount of the original image data.
  • the feature amount of the original image data for example, there is a variance value that serves as an index of the amount of change in the pixel value in the original image data.
  • the offset determination unit 350 may limit the offset candidates so that the offset value becomes smaller as in the control table d51 illustrated in FIG. .
  • the offset determination unit 350 sets the offset candidates so that the offset value becomes larger as in the control tables d52 and d53 shown in FIGS. You may restrict.
  • the feature amount of the original image data may be calculated as the feature amount by the statistic acquisition unit 330 based on the acquired original image data, for example.
  • a determination criterion for limiting the offset value candidates Is not particularly limited.
  • parameters other than the variance value may be used as the feature amount of the original image data.
  • Second Embodiment >> ⁇ 3-1. Overview> Subsequently, an image encoding device according to the second embodiment will be described.
  • the description has been made mainly focusing on the case where an image having a bit depth of 10 bits or less is encoded as an input image.
  • an image having a bit depth exceeding 10 bits is encoded as an input image, and the range of values that can be taken by the offset value becomes wider as the bit depth increases. The number of candidates tends to increase.
  • the bit depth is 12 bits, possible values of the offset value are 0 to 124.
  • Log2OffsetScale parameters such as “log2_sao_offset_scale_luma” and “log2_sao_offset_scale_chroma”.
  • the Log2OffsetScale parameter is a parameter for scaling (ie, enlarging or reducing) the offset value when the bit depth is 10 bits as necessary when the bit depth of the pixel of the input image exceeds 10 bits. It is possible to set in units of pictures.
  • log2_sao_offset_scale_luma is a Log2OffsetScale parameter for scaling the offset value with respect to luminance
  • log2_sao_offset_scale_chroma is a Log2OffsetScale parameter for scaling the offset value with respect to color difference
  • any value of 0, 1, and 2 can be set as the Log2OffsetScale parameter.
  • the offset value candidates from 0 to 31 when the bit depth is 10 bits are scaled according to the situation to select the offset value when exceeding 10 bits. Can be set automatically.
  • the Log2OffsetScale parameter it is not necessary to transmit data for all offset value candidates, so that it is possible to suppress a decrease in data transmission efficiency accompanying an increase in bit depth.
  • the offset value can be applied with higher resolution according to the difference between the original image data and the decoded image data.
  • FIG. 18 is an explanatory diagram for describing an overview of the image coding apparatus according to the present embodiment, and illustrates an example of a relationship between a quantized value and a quantized value.
  • the horizontal axis indicates the quantized value
  • the vertical axis indicates the quantized value.
  • a graph indicated by a broken line corresponds to before quantization
  • a graph indicated by a solid line corresponds to after quantization.
  • SAO is a mechanism for improving the difference between an original image and a restored image by an offset value.
  • a value quantized by applying an offset value is encoded.
  • the quantized value that is, the quantization step (QP)
  • the quantized value that is, the data before quantization.
  • the quantized bits ie, the quantized data
  • the image encoding apparatus according to the present embodiment is applied in the SAO processing by setting the Log2OffsetScale parameter according to the QP when the input image (original image) is quantized by using the above-described characteristics. Control the offset value.
  • the image encoding device controls so that a larger value is set as the Log2OffsetScale parameter when the QP is equal to or greater than the threshold value.
  • the range of offset value candidates becomes wider and the interval between adjacent candidates is controlled to be larger. Therefore, the image encoding apparatus can apply a larger value as the offset value even under a situation where the error before and after the quantization becomes larger by setting a larger value as the QP. It is possible to eliminate a larger error.
  • the image coding apparatus when the QP is less than the threshold value, the image coding apparatus performs control so that a smaller value is set as the Log2OffsetScale parameter. Accordingly, the range of offset value candidates is narrowed, and the interval between adjacent candidates is controlled to be smaller. Therefore, the image coding apparatus can set the interval between offset value candidates to be smaller in a situation where an error before and after quantization becomes smaller by setting a smaller value as QP. As a result, the image can be restored more precisely.
  • the image coding apparatus adapts the Log2OffsetScale parameter (and thus the range of offset value candidates and the interval between the candidates) in units of pictures according to the characteristics (ie, QP) of the picture. To set. Therefore, the image encoding apparatus according to the present embodiment performs processing related to the setting of the offset value by setting the offset value more efficiently even in a situation where the bit depth of the pixel of the input image becomes larger. Further, it is possible to further reduce the data transmission efficiency accompanying the increase in bit depth.
  • FIG. 19 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the present embodiment.
  • Steps S711, S713, S717) As shown in FIG. 19, first, the offset determination unit 350 obtains a quantization step (QP) when generating quantized data that is a decoding source of a target picture (decoded image data) (S711). The acquired QP is sequentially compared with each of predetermined threshold values TH30 and TH31. Note that the magnitude relationship between the thresholds TH30 and TH31 is TH30 ⁇ TH31.
  • Step S715 When the acquired QP is less than the threshold value TH30 (S713, YES), the offset determination unit 350 sets 0 as the Log2OffsetScale parameter.
  • offset value candidates are ⁇ 0, 1, 2, 3,..., 31 ⁇ as described above.
  • Step S719) On the other hand, when the acquired QP is greater than or equal to the threshold TH30 (S713, NO) and less than the threshold TH31 (S717, YES), the offset determination unit 350 sets 1 as the Log2OffsetScale parameter. In this case, as described above, the offset value candidates are scaled based on the Log2OffsetScale parameter and become ⁇ 0, 2, 4, 6,..., 62 ⁇ .
  • Step S721 If the acquired QP is equal to or greater than the threshold TH31 (S717, NO), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. In this case, as described above, the offset value candidates are scaled based on the Log2OffsetScale parameter and become ⁇ 0, 4, 8, 12,..., 124 ⁇ .
  • an appropriate value determined based on a prior experiment or the like may be set in advance for the thresholds HT30 and TH31 for switching the setting of the Log2OffsetScale parameter based on QP.
  • the offset determination unit 350 corresponds to an example of a “setting unit” that sets a range of offset value candidates.
  • the image coding apparatus according to the present embodiment is the same as the image coding apparatus according to the first embodiment described above.
  • the image encoding device according to the modified example 2-1 sets the Log2OffsetScale parameter according to the QP when the input image (original image) is quantized, and sets the offset value candidate as the candidate. Set the number within a limited range.
  • FIG. 20 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the modified example 2-1.
  • the image encoding device according to the modification 2-1 is described assuming that, for example, one of the following settings is applied as a Log2OffsetScale parameter and an offset value candidate.
  • Steps S731, S733, S737, S741 As shown in FIG. 20, first, the offset determination unit 350 obtains a quantization step (QP) when generating quantized data that is a decoding source of a target picture (decoded image data) (S731). The acquired QP is sequentially compared with predetermined threshold values TH35, TH36, and TH37 (S733, S737, S741). It is assumed that the threshold values TH35, TH36, and TH37 have a magnitude relationship of TH35 ⁇ TH36 ⁇ TH37.
  • QP quantization step
  • Step S735 If the acquired QP is less than the threshold TH35 (S713, YES), the offset determination unit 350 sets 0 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets ⁇ 0, 1, 2, 3, 4, 5, 6, 7 ⁇ as offset value candidates.
  • Step S739) On the other hand, when the acquired QP is greater than or equal to the threshold TH35 (S733, NO) and less than the threshold TH36 (S737, YES), the offset determination unit 350 sets 1 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets ⁇ 0, 2, 4, 6, 8, 10, 12, 14 ⁇ as offset value candidates.
  • Step S743 When the acquired QP is equal to or greater than the threshold TH36 (S735, NO) and is less than the threshold TH37 (S741, YES), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets ⁇ 0, 4, 8, 12, 16, 20, 24, 28 ⁇ as offset value candidates.
  • Step S745 When the acquired QP is equal to or greater than the threshold TH37 (S741, NO), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets ⁇ 0, 8, 16, 24, 32, 40, 48, 56 ⁇ as offset value candidates.
  • the image coding apparatus has the feature (that is, QP) of the picture in units of pictures as in the image coding apparatus according to the second embodiment described above. Accordingly, it is possible to adaptively set the Log2OffsetScale parameter (and thus the range of offset value candidates and the interval between the candidates).
  • the image encoding device uses the same configuration as the 8-bit configuration as the configuration for calculating the cost of each candidate offset value even when the bit depth exceeds 10 bits. Thus, the offset value can be determined.
  • the circuit scale of the offset determination unit 350 is reduced and the offset value is reduced as in the image encoding device according to the first embodiment described above. It becomes possible to reduce the processing amount concerning each cost calculation.
  • the maximum number of offset candidates is 56, which is different from the image encoding device according to the second embodiment described above.
  • the ratio at which a value greater than 56 is selected as the offset value tends to be small.
  • the coefficient (lambda) used in the cost calculation for selecting the offset value to be applied tends to increase. is there. Therefore, it is known from experimental data that the ratio of selecting a value larger than 56 as the offset value is small. Therefore, the maximum value of offset value candidates is set to 56 in the image encoding device according to Modification 2-1.
  • the setting shown above is only an example, and it is needless to say that the setting may be appropriately changed according to the system characteristics, use case, and the like.
  • the input image is quantized according to the parameter (that is, QP) for quantizing the input image.
  • QP the parameter for quantizing the input image.
  • the range of offset value candidates is narrowed, and the interval between adjacent candidates is controlled to be smaller. For this reason, in a situation where the error before and after quantization becomes smaller, the interval between offset value candidates can be made smaller, and as a result, the image can be restored more precisely.
  • the image coding apparatus can perform the Log2OffsetScale parameter (as a result, the range of offset value candidates and the interval between the candidates in accordance with the feature (ie, QP) of the picture in units of pictures. ) Is set adaptively.
  • the Log2OffsetScale parameter (as a result, the range of offset value candidates and the interval between the candidates in accordance with the feature (ie, QP) of the picture in units of pictures. )
  • QP feature
  • Is set adaptively Is set adaptively.
  • an encoder or camcorder there is a case where control is performed such that an encoded stream (hereinafter also referred to as “bit”) is included in a bit rate at the time of data transfer by changing QP.
  • bit an encoded stream
  • the image encoding apparatus performs processing related to the setting of the offset value by setting the offset value more efficiently even in a situation where the bit depth of the pixel of the input image becomes larger. Further, it is possible to further reduce the data transmission efficiency accompanying the increase in bit depth.
  • the Log2OffsetScale parameter is set in units of pictures in accordance with the parameter (QP) for quantizing the input image.
  • the encoding apparatus sets the Log2OffsetScale parameter and offset value candidates for each picture in accordance with the result of applying the offset value to the encoded picture (frequency of using the offset value).
  • the image coding apparatus uses such characteristics and adaptively switches the Log2OffsetScale parameter and offset value candidates in units of pictures according to the frequency of use of the offset value for the encoded picture. .
  • the image encoding apparatus in a picture encoded immediately before, attention is paid to a case where a lower offset value (for example, an offset value smaller than a threshold) is frequently applied among offset value candidates set based on a certain mode.
  • the above description focuses on the case where the Log2OffsetScale parameter and the offset value candidate are switched in the same manner as in the image encoding device according to the modified example 2-1, depending on the application result of the offset value to the encoded picture.
  • the Log2OffsetScale parameter may be switched in the same manner as in the image encoding device (see FIG. 19) according to the second embodiment described above, depending on the application result of the offset value to the encoded picture.
  • the image coding apparatus can efficiently set the offset value in a situation where the correlation between adjacent pictures is high, such as when similar scenes continue. It is possible to control the range of offset value candidates (that is, to set offset value candidates) so as to be set (that is, the frequency of use of each offset value candidate is further improved).
  • FIG. 21 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the present embodiment.
  • Steps S751, S753, S757 As shown in FIG. 21, first, the offset determination unit 350 acquires the application result of the offset value for the encoded picture (S751), and evaluates the application frequency of each offset value (S753, S757).
  • Step S755 For example, attention is paid to a case where the frequency of applying an offset value smaller than a predetermined threshold is higher (S753, YES).
  • the offset determination unit 350 sets a mode one level lower than the mode corresponding to the picture encoded immediately before as a mode for setting a candidate offset value of a picture to be encoded next.
  • Step S759 As another example, when the application frequency of the offset value smaller than the predetermined threshold is lower (S753, NO) and the application frequency of the offset value larger than the predetermined threshold is higher (S757, YES). Pay attention.
  • the offset determination unit 350 sets a mode that is one step higher than the mode corresponding to the picture encoded immediately before, as a mode for setting a candidate offset value of the picture to be encoded next.
  • the threshold value used for each determination of step S753 and S757 does not necessarily need to be the same value.
  • the application frequency of the offset value smaller than the predetermined threshold is lower (S753, NO), and the application frequency of the offset value larger than the predetermined threshold is also low (S757, NO).
  • the offset determination unit 350 may maintain the mode corresponding to the picture encoded immediately before and apply the same to the picture to be encoded next.
  • Modification 3-1 As a modification of the present embodiment (hereinafter referred to as “Modification 3-1”), the image coding apparatus according to the present embodiment and the image coding apparatus according to the second embodiment described above are included. An example of control when combined will be described. Specifically, the image encoding device according to the modified example 3-1 quantizes the input image in the same manner as the encoding device according to the second embodiment described above (for example, FIGS. 19 and 20). The Log2OffsetScale parameter and offset value candidates are set according to the parameters (ie, QP).
  • the image coding apparatus is the second implementation in that the threshold for evaluating the QP is dynamically controlled according to the application result of the offset value to the encoded picture. Different from form. Therefore, the image encoding device according to the modified example 3-1 will be described by focusing attention on differences from the image encoding device according to the second embodiment.
  • FIG. 22 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the modified example 3-1, for controlling a threshold for evaluating the QP. An example of processing is shown.
  • Steps S761, S763, S767) As shown in FIG. 22, first, the offset determination unit 350 acquires the application result of the offset value to the encoded picture (S761), and evaluates the application frequency of each offset value (S763, S767).
  • Step S765 For example, attention is paid to a case where the frequency of applying an offset value smaller than a predetermined threshold is higher (S753, YES).
  • the offset determination unit 350 adds the offset to at least a part (particularly, a threshold having a smaller value) of the thresholds for evaluating the QP, so that the threshold becomes a larger value.
  • the offset determination unit 350 may add an offset to each of the threshold values TH30 to TH37. Such control facilitates selection of a setting in which the range of offset value candidates is narrow and the offset value candidate value is smaller (that is, a setting in which the value of the Log2OffsetScale parameter is smaller).
  • Step S769) As another example, when the application frequency of the offset value smaller than the predetermined threshold is lower (S763, NO) and the application frequency of the offset value larger than the predetermined threshold is higher (S767, YES). Pay attention.
  • the offset determination unit 350 subtracts the offset from at least a part (particularly, a threshold having a larger value) of the thresholds for evaluating the QP so that the threshold becomes a smaller value. Control.
  • the offset determination unit 350 may subtract the offset from each of the threshold values TH30 to TH37. Such control makes it easy to select a setting in which the range of offset value candidates is wide and a larger value can be selected as the offset value (that is, a setting in which the value of the Log2OffsetScale parameter is larger).
  • the threshold value used for each determination of step S763 and S767 does not necessarily need to be the same value. Under such circumstances, for example, when the application frequency of the offset value smaller than the predetermined threshold is lower (S763, NO), and the application frequency of the offset value larger than the predetermined threshold is low (S767, NO). ) Can be envisaged. In such a case, the offset determination unit 350 may not control the threshold value for evaluating the QP.
  • the image encoding device can set the offset value efficiently (that is, the offset value in a situation where the correlation between adjacent pictures is high).
  • Log2OffsetScale parameter and offset value candidates can be set (so that the frequency of use of each candidate is improved).
  • the image encoding device since the Log2OffsetScale parameter is set according to the QP, even when a prediction error shifts due to a rapid variation of the QP, the prediction error It becomes possible to mitigate the influence accompanying the deviation.
  • the image coding apparatus determines the Log2OffsetScale parameter and the offset value candidates for each picture according to the application result of the offset value to the encoded picture (frequency of use of the offset value). Set.
  • the image encoding apparatus can set the offset value efficiently in a situation where the correlation between adjacent pictures is high (that is, the frequency of use of each candidate offset value). It is possible to set Log2OffsetScale parameter and offset value candidates.
  • the stream (bit) after encoding is transferred by changing the QP in accordance with the accuracy of various predictions such as intra prediction and inter prediction (in other words, whether or not the prediction is successful).
  • various predictions such as intra prediction and inter prediction (in other words, whether or not the prediction is successful).
  • control is performed so as to be within the bit rate of the hour.
  • the difference between the original image and the restored image becomes larger, and the target bit There may be more bits that do not fit in the rate.
  • Log2OffsetScale is adaptively adapted in a more preferable manner according to the characteristics of the scene (for example, whether or not the scene is likely to generate bits). Parameters and offset value candidates can be set.
  • an image including a complex texture or a noisy image has a large change in the screen (in a picture), so the accuracy of various predictions such as intra prediction and inter prediction is low. There is a tendency that the difference between them also becomes larger (in other words, bits tend to occur). Therefore, in such a case, for example, it is desirable to scale the offset value by setting a larger value as the Log2OffsetScale parameter so that a larger value can be set as the offset value.
  • the image encoding apparatus uses the characteristics as described above, and the Log2OffsetScale parameter and offset value candidates according to the feature amount (for example, variance) of the target input image (picture). Are switched adaptively in units of pictures.
  • the variance of the input image is evaluated as the feature amount of the input image.
  • An image including a complex texture, a noisy image, or the like has a large change in the image (in the picture) (that is, a low correlation in the screen) and tends to have a higher variance.
  • an image having a small change in the screen (in the picture) that is, an image having a high correlation in the screen
  • the image coding apparatus regards an image with higher variance (for example, an image with variance equal to or greater than a threshold value), for example, as having low correlation within the screen and low accuracy of various predictions.
  • an image with higher variance for example, an image with variance equal to or greater than a threshold value
  • the image coding apparatus for an image with lower variance (for example, an image with variance less than a threshold)
  • has high correlation in the screen for example, and accuracy of various predictions. Is assumed to be high, and a smaller value is set as the Log2OffsetScale parameter.
  • the parameter used as the feature amount is not necessarily limited to “distribution”.
  • “variance”, “Hadamard”, “DCT”, “Tv norm”, and the like may be used as image feature amounts.
  • the image coding apparatus can adjust the characteristics of the target input image (picture) (for example, whether or not the difference between the original image and the restored image becomes larger). Accordingly, the Log2OffsetScale parameter and offset value candidates can be adaptively switched on a picture-by-picture basis. That is, according to the image coding apparatus according to the present embodiment, the offset value is efficiently set according to the characteristics of the target input image (that is, the frequency of use of each candidate offset value is more As a result, offset value candidates can be set.
  • FIG. 23 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the present embodiment.
  • Steps S771, S773, S777, S781 As shown in FIG. 23, first, the offset determination unit 350 acquires the feature amount of the target picture (S751), and sequentially compares the acquired feature amount with each of predetermined threshold values TH40, TH41, and TH42 ( S773, S777, S781). It is assumed that the threshold values TH40, TH41, and TH42 have a magnitude relationship of TH40 ⁇ TH41 ⁇ TH42.
  • Step S775 When the acquired feature amount is less than the threshold value TH40 (S773, YES), the offset determination unit 350 sets 0 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets ⁇ 0, 1, 2, 3, 4, 5, 6, 7 ⁇ as offset value candidates.
  • Step S779 On the other hand, when the acquired feature amount is equal to or greater than the threshold value TH40 (S773, NO) and less than the threshold value TH41 (S777, YES), the offset determination unit 350 sets 1 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets ⁇ 0, 2, 4, 6, 8, 10, 12, 14 ⁇ as offset value candidates.
  • Step S783 When the acquired feature amount is equal to or greater than the threshold value TH41 (S775, NO) and less than the threshold value TH42 (S781, YES), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets ⁇ 0, 4, 8, 12, 16, 20, 24, 28 ⁇ as offset value candidates.
  • Step S785 When the acquired feature amount is equal to or greater than the threshold TH42 (S781, NO), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets ⁇ 0, 8, 16, 24, 32, 40, 48, 56 ⁇ as offset value candidates.
  • Modification 4-1 the image coding apparatus according to the present embodiment and the image coding apparatus according to the second embodiment described above are included. An example of control when combined will be described.
  • the image encoding device according to the modified example 4-1 is for quantizing an input image in the same manner as the encoding device according to the second embodiment described above (for example, FIGS. 19 and 20).
  • the Log2OffsetScale parameter and offset value candidates are set according to the parameters (ie, QP).
  • the image coding apparatus has the second feature in that the threshold for evaluating the QP is dynamically controlled according to the feature amount of the target input image (picture). Different from the embodiment. Therefore, the image encoding device according to the modified example 4-1 will be described by focusing attention on differences from the image encoding device according to the second embodiment.
  • FIG. 24 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the modified example 4-1, for controlling a threshold for evaluating the QP. An example of processing is shown.
  • Steps S791, S793, S797 As shown in FIG. 24, first, the offset determination unit 350 acquires a feature amount of a target picture (S791), and sequentially compares the acquired feature amount with predetermined threshold values TH45 and TH46, respectively (S793, S797). ).
  • Step S795 For example, attention is paid to a case where the acquired feature amount is less than the threshold value TH45 (S793, YES).
  • This example corresponds to a case where the correlation of the target picture is high within the screen and the difference between the original image and the restored image is smaller.
  • the offset determination unit 350 adds the offset to at least a part (particularly, a threshold having a smaller value) of the thresholds for evaluating the QP, so that the threshold becomes a larger value.
  • the offset determination unit 350 may add an offset to each of the threshold values TH30 to TH37. Such control facilitates selection of a setting in which the range of offset value candidates is narrow and the offset value candidate value is smaller (that is, a setting in which the value of the Log2OffsetScale parameter is smaller).
  • Step S769) attention is focused on a case where the acquired feature amount is equal to or greater than the threshold value TH45 (S793, NO) and the feature amount exceeds the threshold value TH46 (S797, YES).
  • This example corresponds to a case where the correlation of the target picture in the screen is low and the difference between the original image and the restored image becomes larger.
  • the offset determination unit 350 subtracts the offset from at least a part (particularly, a threshold having a larger value) of the thresholds for evaluating the QP so that the threshold becomes a smaller value. Control.
  • the offset determination unit 350 may subtract the offset from each of the threshold values TH30 to TH37. Such control makes it easy to select a setting in which the range of offset value candidates is wide and a larger value can be selected as the offset value (that is, a setting in which the value of the Log2OffsetScale parameter is larger).
  • the offset determination unit 350 uses the threshold value for evaluating the QP. Need not be controlled.
  • threshold values TH45 and TH46 used for the determinations in steps S793 and S797 appropriate values determined based on prior experiments or the like may be set in advance.
  • the image coding apparatus can set the offset value efficiently according to the characteristics of the target input image (that is, each offset value candidate). It is possible to set offset value candidates so that the frequency of use is further improved. Further, according to the image encoding device according to the modified example 4-1, since the Log2OffsetScale parameter is set according to the QP, even when the prediction error is deviated due to a rapid fluctuation of the QP, the prediction error It becomes possible to mitigate the influence accompanying the deviation.
  • the image coding apparatus sets the Log2OffsetScale parameter and offset value candidates in units of pictures according to the feature amount of the target input image (picture).
  • the image encoding apparatus can more efficiently set the offset value according to the characteristics of the target input image (that is, the frequency of use of each candidate offset value is further improved).
  • the offset value candidates can be set. That is, according to the image encoding device according to the present embodiment, the Log2OffsetScale parameter and the offset value are adaptively adapted in a more preferable manner according to the scene characteristics (for example, whether the scene is likely to generate bits). Candidates can be set.
  • Hardware configuration example may be realized using any of software, hardware, and a combination of software and hardware.
  • a program constituting the software is stored in advance in a storage medium (non-transitory media) provided inside or outside the device, for example.
  • Each program is read into a RAM (Random Access Memory) at the time of execution and executed by a processor such as a CPU (Central Processing Unit).
  • a processor such as a CPU (Central Processing Unit).
  • FIG. 25 is a block diagram illustrating an example of a hardware configuration of an encoder to which the above-described embodiment can be applied.
  • the encoder 800 includes a system bus 810, an image processing chip 820, and an off-chip memory 890.
  • the image processing chip 820 includes n (n is 1 or more) processing circuits 830-1, 830-2,..., 830-n, a reference buffer 840, a system bus interface 850, and a local bus interface 860.
  • the system bus 810 provides a communication path between the image processing chip 820 and an external module (for example, a central control function, an application function, a communication interface, or a user interface).
  • the processing circuits 830-1, 830-2,..., 830-n are connected to the system bus 810 via the system bus interface 850 and to the off-chip memory 890 via the local bus interface 860.
  • the processing circuits 830-1, 830-2,..., 830-n can also access a reference buffer 840 that may correspond to an on-chip memory (eg, SRAM).
  • the off-chip memory 890 may be a frame memory that stores image data processed by the image processing chip 820, for example.
  • the processing circuit 830-1 is the intra prediction unit 30
  • the processing circuit 830-2 is the inter prediction unit 35
  • the other processing circuits are the orthogonal transform unit 14, and the other processing circuit is a lossless code. It can correspond to the conversion unit 16.
  • Another processing circuit may correspond to the loop filter 24.
  • each of the deblock filter 200, the sample adaptive offset filter 300, and the adaptive loop filter 400 constituting the loop filter 24 may be configured as a separate processing circuit. Note that these processing circuits may be formed not on the same image processing chip 820 but on separate chips.
  • a transmission device that transmits an encoded video stream using a satellite line, a cable TV line, the Internet, a cellular communication network, or the like
  • the present invention can be applied to various electronic devices such as a recording device for recording on a medium.
  • three application examples will be described.
  • FIG. 26 illustrates an example of a schematic configuration of a mobile phone to which the above-described embodiment is applied.
  • a cellular phone 920 includes an antenna 921, a communication unit 922, an audio codec 923, a speaker 924, a microphone 925, a camera unit 926, an image processing unit 927, a demultiplexing unit 928, a recording / reproducing unit 929, a display unit 930, a control unit 931, an operation Part 932, sensor part 933, bus 934, and battery 935.
  • the antenna 921 is connected to the communication unit 922.
  • the speaker 924 and the microphone 925 are connected to the audio codec 923.
  • the operation unit 932 is connected to the control unit 931.
  • the bus 934 connects the communication unit 922, the audio codec 923, the camera unit 926, the image processing unit 927, the demultiplexing unit 928, the recording / reproducing unit 929, the display unit 930, the control unit 931, and the sensor unit 933 to each other.
  • the mobile phone 920 has various operation modes including a voice call mode, a data communication mode, a shooting mode, and a videophone mode, and is used for sending and receiving voice signals, sending and receiving e-mail or image data, taking images, and recording data. Perform the action.
  • the analog voice signal generated by the microphone 925 is supplied to the voice codec 923.
  • the audio codec 923 converts an analog audio signal into audio data, A / D converts the compressed audio data, and compresses it. Then, the audio codec 923 outputs the compressed audio data to the communication unit 922.
  • the communication unit 922 encodes and modulates the audio data and generates a transmission signal. Then, the communication unit 922 transmits the generated transmission signal to a base station (not shown) via the antenna 921. In addition, the communication unit 922 amplifies a radio signal received via the antenna 921 and performs frequency conversion to acquire a received signal.
  • the communication unit 922 demodulates and decodes the received signal to generate audio data, and outputs the generated audio data to the audio codec 923.
  • the audio codec 923 expands the audio data and performs D / A conversion to generate an analog audio signal. Then, the audio codec 923 supplies the generated audio signal to the speaker 924 to output audio.
  • the control unit 931 generates character data constituting the e-mail in response to an operation by the user via the operation unit 932.
  • the control unit 931 causes the display unit 930 to display characters.
  • the control unit 931 generates e-mail data in response to a transmission instruction from the user via the operation unit 932, and outputs the generated e-mail data to the communication unit 922.
  • the communication unit 922 encodes and modulates email data and generates a transmission signal. Then, the communication unit 922 transmits the generated transmission signal to a base station (not shown) via the antenna 921.
  • the communication unit 922 amplifies a radio signal received via the antenna 921 and performs frequency conversion to acquire a received signal.
  • the communication unit 922 demodulates and decodes the received signal to restore the email data, and outputs the restored email data to the control unit 931.
  • the control unit 931 displays the content of the electronic mail on the display unit 930 and stores the electronic mail data in the storage medium of the recording / reproducing unit 929.
  • the recording / reproducing unit 929 has an arbitrary readable / writable storage medium.
  • the storage medium may be a built-in storage medium such as a RAM or a flash memory, or an externally mounted storage medium such as a hard disk, a magnetic disk, a magneto-optical disk, an optical disk, a USB memory, or a memory card. May be.
  • the camera unit 926 images a subject to generate image data, and outputs the generated image data to the image processing unit 927.
  • the image processing unit 927 encodes the image data input from the camera unit 926 and stores the encoded stream in the storage medium of the recording / playback unit 929.
  • the demultiplexing unit 928 multiplexes the video stream encoded by the image processing unit 927 and the audio stream input from the audio codec 923, and the multiplexed stream is the communication unit 922. Output to.
  • the communication unit 922 encodes and modulates the stream and generates a transmission signal. Then, the communication unit 922 transmits the generated transmission signal to a base station (not shown) via the antenna 921.
  • the communication unit 922 amplifies a radio signal received via the antenna 921 and performs frequency conversion to acquire a received signal.
  • These transmission signal and reception signal may include an encoded bit stream.
  • the communication unit 922 demodulates and decodes the received signal to restore the stream, and outputs the restored stream to the demultiplexing unit 928.
  • the demultiplexing unit 928 separates the video stream and the audio stream from the input stream, and outputs the video stream to the image processing unit 927 and the audio stream to the audio codec 923.
  • the image processing unit 927 decodes the video stream and generates video data.
  • the video data is supplied to the display unit 930, and a series of images is displayed on the display unit 930.
  • the audio codec 923 decompresses the audio stream and performs D / A conversion to generate an analog audio signal. Then, the audio codec 923 supplies the generated audio signal to the speaker 924 to output audio.
  • Sensor unit 933 includes a sensor group such as an acceleration sensor and a gyro sensor, and outputs an index representing the movement of mobile phone 920.
  • the battery 935 includes a communication unit 922, an audio codec 923, a camera unit 926, an image processing unit 927, a demultiplexing unit 928, a recording / reproducing unit 929, a display unit 930, and a control via a power supply line which is omitted in the drawing. Power is supplied to the unit 931 and the sensor unit 933.
  • the image processing unit 927 has the function of the image encoding device 10 according to the above-described embodiment. Therefore, in the mobile phone 920, the amount of cost calculation for determining the SAO mode to be applied and the offset value to be applied can be reduced, and consequently the power consumption and circuit scale of the mobile phone 920 can be reduced. It becomes possible.
  • FIG. 27 shows an example of a schematic configuration of a recording / reproducing apparatus to which the above-described embodiment is applied.
  • the recording / reproducing device 940 encodes audio data and video data of a received broadcast program and records the encoded data on a recording medium.
  • the recording / reproducing device 940 may encode audio data and video data acquired from another device and record them on a recording medium, for example.
  • the recording / reproducing device 940 reproduces data recorded on the recording medium on a monitor and a speaker, for example, in accordance with a user instruction. At this time, the recording / reproducing device 940 decodes the audio data and the video data.
  • the recording / reproducing apparatus 940 includes a tuner 941, an external interface 942, an encoder 943, an HDD (Hard Disk Drive) 944, a disk drive 945, a selector 946, a decoder 947, an OSD (On-Screen Display) 948, a control unit 949, and a user interface. 950.
  • Tuner 941 extracts a signal of a desired channel from a broadcast signal received via an antenna (not shown), and demodulates the extracted signal. Then, the tuner 941 outputs the encoded bit stream obtained by the demodulation to the selector 946. That is, the tuner 941 has a role as a transmission unit in the recording / reproducing apparatus 940.
  • the external interface 942 is an interface for connecting the recording / reproducing apparatus 940 to an external device or a network.
  • the external interface 942 may be, for example, an IEEE 1394 interface, a network interface, a USB interface, or a flash memory interface.
  • video data and audio data received via the external interface 942 are input to the encoder 943. That is, the external interface 942 serves as a transmission unit in the recording / reproducing device 940.
  • the encoder 943 encodes video data and audio data when the video data and audio data input from the external interface 942 are not encoded. Then, the encoder 943 outputs the encoded bit stream to the selector 946.
  • the HDD 944 records an encoded bit stream in which content data such as video and audio is compressed, various programs, and other data on an internal hard disk. Also, the HDD 944 reads out these data from the hard disk when playing back video and audio.
  • the disk drive 945 performs recording and reading of data to and from the mounted recording medium.
  • the recording medium loaded in the disk drive 945 may be, for example, a DVD disk (DVD-Video, DVD-RAM, DVD-R, DVD-RW, DVD + R, DVD + RW, etc.) or a Blu-ray (registered trademark) disk. .
  • the selector 946 selects an encoded bit stream input from the tuner 941 or the encoder 943 when recording video and audio, and outputs the selected encoded bit stream to the HDD 944 or the disk drive 945. In addition, the selector 946 outputs the encoded bit stream input from the HDD 944 or the disk drive 945 to the decoder 947 during video and audio reproduction.
  • the decoder 947 decodes the encoded bit stream and generates video data and audio data. Then, the decoder 947 outputs the generated video data to the OSD 948. The decoder 904 outputs the generated audio data to an external speaker.
  • the OSD 948 reproduces the video data input from the decoder 947 and displays the video. Further, the OSD 948 may superimpose a GUI image such as a menu, a button, or a cursor on the video to be displayed.
  • a GUI image such as a menu, a button, or a cursor
  • the control unit 949 includes a processor such as a CPU and memories such as a RAM and a ROM.
  • the memory stores a program executed by the CPU, program data, and the like.
  • the program stored in the memory is read and executed by the CPU when the recording / reproducing apparatus 940 is activated, for example.
  • the CPU controls the operation of the recording / reproducing device 940 according to an operation signal input from the user interface 950, for example, by executing the program.
  • the user interface 950 is connected to the control unit 949.
  • the user interface 950 includes, for example, buttons and switches for the user to operate the recording / reproducing device 940, a remote control signal receiving unit, and the like.
  • the user interface 950 detects an operation by the user via these components, generates an operation signal, and outputs the generated operation signal to the control unit 949.
  • the encoder 943 has the function of the image encoding apparatus 10 according to the above-described embodiment. Therefore, in the recording / reproducing apparatus 940, the processing amount of the cost calculation for determining the SAO mode to be applied and the offset value to be applied is reduced, and consequently, the power consumption and circuit scale of the recording / reproducing apparatus 940 are reduced. It becomes possible.
  • FIG. 28 illustrates an example of a schematic configuration of an imaging apparatus to which the above-described embodiment is applied.
  • the imaging device 960 images a subject to generate an image, encodes the image data, and records it on a recording medium.
  • the imaging device 960 includes an optical block 961, an imaging unit 962, a signal processing unit 963, an image processing unit 964, a display unit 965, an external interface 966, a memory 967, a media drive 968, an OSD 969, a control unit 970, a user interface 971, and a sensor 972. , A bus 973 and a battery 974.
  • the optical block 961 is connected to the imaging unit 962.
  • the imaging unit 962 is connected to the signal processing unit 963.
  • the display unit 965 is connected to the image processing unit 964.
  • the user interface 971 is connected to the control unit 970.
  • the bus 973 connects the image processing unit 964, the external interface 966, the memory 967, the media drive 968, the OSD 969, the control unit 970, and the sensor 972 to each other.
  • the optical block 961 includes a focus lens and a diaphragm mechanism.
  • the optical block 961 forms an optical image of the subject on the imaging surface of the imaging unit 962.
  • the imaging unit 962 includes an image sensor such as a CCD or a CMOS, and converts an optical image formed on the imaging surface into an image signal as an electrical signal by photoelectric conversion. Then, the imaging unit 962 outputs the image signal to the signal processing unit 963.
  • the signal processing unit 963 performs various camera signal processing such as knee correction, gamma correction, and color correction on the image signal input from the imaging unit 962.
  • the signal processing unit 963 outputs the image data after the camera signal processing to the image processing unit 964.
  • the image processing unit 964 encodes the image data input from the signal processing unit 963 and generates encoded data. Then, the image processing unit 964 outputs the generated encoded data to the external interface 966 or the media drive 968. The image processing unit 964 also decodes encoded data input from the external interface 966 or the media drive 968 to generate image data. Then, the image processing unit 964 outputs the generated image data to the display unit 965. In addition, the image processing unit 964 may display the image by outputting the image data input from the signal processing unit 963 to the display unit 965. Further, the image processing unit 964 may superimpose display data acquired from the OSD 969 on an image output to the display unit 965.
  • the OSD 969 generates a GUI image such as a menu, a button, or a cursor, for example, and outputs the generated image to the image processing unit 964.
  • the external interface 966 is configured as a USB input / output terminal, for example.
  • the external interface 966 connects the imaging device 960 and a printer, for example, when printing an image.
  • a drive is connected to the external interface 966 as necessary.
  • a removable medium such as a magnetic disk or an optical disk is attached to the drive, and a program read from the removable medium can be installed in the imaging device 960.
  • the external interface 966 may be configured as a network interface connected to a network such as a LAN or the Internet. That is, the external interface 966 has a role as a transmission unit in the imaging device 960.
  • the recording medium mounted on the media drive 968 may be any readable / writable removable medium such as a magnetic disk, a magneto-optical disk, an optical disk, or a semiconductor memory. Further, a recording medium may be fixedly attached to the media drive 968, and a non-portable storage unit such as an internal hard disk drive or an SSD (Solid State Drive) may be configured.
  • a non-portable storage unit such as an internal hard disk drive or an SSD (Solid State Drive) may be configured.
  • the control unit 970 includes a processor such as a CPU and memories such as a RAM and a ROM.
  • the memory stores a program executed by the CPU, program data, and the like.
  • the program stored in the memory is read and executed by the CPU when the imaging device 960 is activated, for example.
  • the CPU controls the operation of the imaging device 960 according to an operation signal input from the user interface 971, for example, by executing the program.
  • the user interface 971 is connected to the control unit 970.
  • the user interface 971 includes, for example, buttons and switches for the user to operate the imaging device 960.
  • the user interface 971 detects an operation by the user via these components, generates an operation signal, and outputs the generated operation signal to the control unit 970.
  • the sensor 972 includes a sensor group such as an acceleration sensor and a gyro sensor, and outputs an index representing the movement of the imaging device 960.
  • the battery 974 supplies power to the imaging unit 962, the signal processing unit 963, the image processing unit 964, the display unit 965, the media drive 968, the OSD 969, the control unit 970, and the sensor 972 via a power supply line that is omitted in the drawing. Supply.
  • the image processing unit 964 has the function of the image encoding device 10 according to the above-described embodiment. Therefore, in the imaging device 960, it is possible to reduce the amount of cost calculation processing for determining the SAO mode to be applied and the offset value to be applied, and thus reduce the power consumption and circuit scale of the imaging device 960. It becomes possible.
  • the technology according to the present disclosure includes various implementation levels such as, for example, a processor such as a system LSI (Large Scale Integration), a module using a plurality of processors, a unit using a plurality of modules, and a set in which other functions are further added to the unit. May be implemented.
  • a processor such as a system LSI (Large Scale Integration)
  • a module using a plurality of processors a module using a plurality of processors
  • a unit using a plurality of modules and a set in which other functions are further added to the unit. May be implemented.
  • FIG. 29 is a block diagram illustrating an example of a schematic configuration of a video set.
  • the operator provides a component having a single function or a plurality of functions related to each other, or provides a set having an integrated function group.
  • the video set 1300 shown in FIG. 29 is a set that includes components for encoding and / or decoding images (which may be either) and components having other functions related to these functions. is there.
  • the video set 1300 includes a module group including a video module 1311, an external memory 1312, a power management module 1313, and a front end module 1314, and a related function including a connectivity module 1321, a camera 1322, and a sensor 1323.
  • a device group including a video module 1311, an external memory 1312, a power management module 1313, and a front end module 1314, and a related function including a connectivity module 1321, a camera 1322, and a sensor 1323.
  • a module is a component formed by aggregating parts for several functions related to each other.
  • the module may have any physical configuration.
  • the module may be formed by integrally arranging a plurality of processors having the same or different functions, electronic circuit elements such as resistors and capacitors, and other devices on a circuit board.
  • Another module may be formed by combining another module or a processor with the module.
  • the video module 1311 includes an application processor 1331, a video processor 1332, a broadband modem 1333, and a baseband module 1334.
  • the processor may be, for example, an SOC (System On a Chip) or a system LSI (Large Scale Integration).
  • the SoC or the system LSI may include hardware that implements predetermined logic.
  • the SoC or the system LSI may include a CPU and a non-transitory tangible medium that stores a program for causing the CPU to execute a predetermined function.
  • the program is stored in, for example, a ROM, and can be executed by the CPU after being read into a RAM (Random Access Memory) at the time of execution.
  • Application processor 1331 is a processor that executes an application related to image processing.
  • An application executed in the application processor 1331 may control, for example, the video processor 1332 and other components in addition to some calculation for image processing.
  • the video processor 1332 is a processor having functions relating to image encoding and decoding. Note that the application processor 1331 and the video processor 1332 may be integrated into one processor (see a dotted line 1341 in the figure).
  • the broadband modem 1333 is a module that performs processing related to communication via a network such as the Internet or a public switched telephone network.
  • the broadband modem 1333 performs digital modulation for converting a digital signal including transmission data into an analog signal, and digital demodulation for converting an analog signal including reception data into a digital signal.
  • Transmission data and reception data processed by the broadband modem 1333 may include arbitrary information such as image data, an encoded stream of image data, application data, an application program, and setting data, for example.
  • the baseband module 1334 is a module that performs baseband processing for an RF (Radio Frequency) signal transmitted / received via the front end module 1314. For example, the baseband module 1334 modulates a transmission baseband signal including transmission data, converts the frequency into an RF signal, and outputs the RF signal to the front end module 1314. In addition, the baseband module 1334 frequency-converts and demodulates the RF signal input from the front end module 1314 to generate a reception baseband signal including reception data.
  • RF Radio Frequency
  • the external memory 1312 is a memory device provided outside the video module 1311 and accessible from the video module 1311.
  • the external memory 1312 includes a relatively inexpensive and large-capacity semiconductor memory such as a DRAM (Dynamic Random Access Memory). obtain.
  • DRAM Dynamic Random Access Memory
  • the power management module 1313 is a module that controls power supply to the video module 1311 and the front end module 1314.
  • the front end module 1314 is a module that is connected to the baseband module 1334 and provides a front end function.
  • the front end module 1314 includes an antenna unit 1351, a filter 1352, and an amplification unit 1353.
  • the antenna unit 1351 includes one or more antenna elements that transmit or receive radio signals and related components such as an antenna switch.
  • the antenna unit 1351 transmits the RF signal amplified by the amplification unit 1353 as a radio signal. Further, the antenna unit 1351 outputs an RF signal received as a radio signal to the filter 1352 and causes the filter 1352 to filter the RF signal.
  • the connectivity module 1321 is a module having a function related to the external connection of the video set 1300.
  • the connectivity module 1321 may support any external connection protocol.
  • the connectivity module 1321 is a sub-module that supports a wireless connection protocol such as Bluetooth (registered trademark), IEEE 802.11 (for example, Wi-Fi (registered trademark)), NFC (Near Field Communication), or IrDA (InfraRed Data Association). And a corresponding antenna.
  • the connectivity module 1321 may include a sub module that supports a wired connection protocol such as USB (Universal Serial Bus) or HDMI (registered trademark) (High-Definition Multimedia Interface) and a corresponding connection terminal. .
  • the connectivity module 1321 writes and stores data to a storage medium such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, or a storage device such as an SSD (Solid State Drive) or NAS (Network Attached Storage). A drive for reading data from the medium may be included.
  • the connectivity module 1321 may include these storage media or storage devices.
  • the connectivity module 1321 may provide connectivity to a display that outputs an image or a speaker that outputs sound.
  • the camera 1322 is a module that acquires a captured image by imaging a subject. A series of captured images acquired by the camera 1322 constitutes video data. Video data generated by the camera 1322 may be encoded by the video processor 1332 as necessary and stored by the external memory 1312 or a storage medium connected to the connectivity module 1321, for example.
  • the sensor 1323 is, for example, a GPS sensor, an audio sensor, an ultrasonic sensor, an optical sensor, an illuminance sensor, an infrared sensor, an angular velocity sensor, an angular acceleration sensor, a velocity sensor, an acceleration sensor, a gyro sensor, a geomagnetic sensor, an impact sensor, or a temperature sensor.
  • a module that may include one or more of them.
  • the sensor data generated by the sensor 1323 can be used by the application processor 1331 to execute an application, for example.
  • the technology according to the present disclosure can be used in the video processor 1332, for example.
  • the video set 1300 is a set to which the technology according to the present disclosure is applied.
  • the video set 1300 may be realized as various types of devices that process image data.
  • the video set 1300 may correspond to the mobile phone 920, the recording / reproducing device 940, or the imaging device 960 described with reference to FIGS.
  • FIG. 30 is a block diagram illustrating an example of a schematic configuration of the video processor 1332.
  • the video processor 1332 encodes an input video signal and an input audio signal to generate video data and audio data, and decodes the encoded video data and audio data to generate an output video signal and an output audio signal. And a function to perform.
  • the video processor 1332 includes a video input processing unit 1401, a first scaling unit 1402, a second scaling unit 1403, a video output processing unit 1404, a frame memory 1405, a memory control unit 1406, an encoding / decoding engine 1407, Video ES (Elementary Stream) buffers 1408A and 1408B, audio ES buffers 1409A and 1409B, an audio encoder 1410, an audio decoder 1411, a multiplexing unit (MUX) 1412, a demultiplexing unit (DEMUX) 1413, and a stream buffer 1414 .
  • MUX multiplexing unit
  • DEMUX demultiplexing unit
  • the video input processing unit 1401 converts, for example, a video signal input from the connectivity module 1321 into digital image data.
  • the first scaling unit 1402 performs format conversion and scaling (enlargement / reduction) on the image data input from the video input processing unit 1401.
  • the second scaling unit 1403 performs format conversion and scaling (enlargement / reduction) on the image data output to the video output processing unit 1404.
  • the format conversion in the first scaling unit 1402 and the second scaling unit 1403 is, for example, conversion between 4: 2: 2 / Y-Cb-Cr system and 4: 2: 0 / Y-Cb-Cr system. It may be.
  • the video output processing unit 1404 converts the digital image data into an output video signal and outputs the output video signal to, for example, the connectivity module 1321.
  • the frame memory 1405 is a memory device that stores image data shared by the video input processing unit 1401, the first scaling unit 1402, the second scaling unit 1403, the video output processing unit 1404, and the encoding / decoding engine 1407.
  • the frame memory 1405 may be realized using a semiconductor memory such as a DRAM, for example.
  • the memory control unit 1406 controls access to the frame memory 1405 according to the access schedule for the frame memory 1405 stored in the access management table 1406A based on the synchronization signal input from the encode / decode engine 1407.
  • the access management table 1406A is updated by the memory control unit 1406 depending on processing executed in the encoding / decoding engine 1407, the first scaling unit 1402, the second scaling unit 1403, and the like.
  • the encoding / decoding engine 1407 performs an encoding process for encoding image data to generate an encoded video stream, and a decoding process for decoding image data from the encoded video stream. For example, the encoding / decoding engine 1407 encodes the image data read from the frame memory 1405 and sequentially writes the encoded video stream to the video ES buffer 1408A. Also, for example, the encoded video stream is sequentially read from the video ES buffer 1408B, and the decoded image data is written in the frame memory 1405.
  • the encoding / decoding engine 1407 can use the frame memory 1405 as a work area in these processes. For example, the encoding / decoding engine 1407 outputs a synchronization signal to the memory control unit 1406 at the timing of starting processing of each LCU (Largest Coding Unit).
  • the video ES buffer 1408A buffers the encoded video stream generated by the encoding / decoding engine 1407.
  • the encoded video stream buffered by the video ES buffer 1408A is output to the multiplexing unit 1412.
  • the video ES buffer 1408B buffers the encoded video stream input from the demultiplexer 1413.
  • the encoded video stream buffered by the video ES buffer 1408B is output to the encoding / decoding engine 1407.
  • the audio ES buffer 1409A buffers the encoded audio stream generated by the audio encoder 1410.
  • the encoded audio stream buffered by the audio ES buffer 1409A is output to the multiplexing unit 1412.
  • the audio ES buffer 1409B buffers the encoded audio stream input from the demultiplexer 1413.
  • the encoded audio stream buffered by the audio ES buffer 1409B is output to the audio decoder 1411.
  • the audio encoder 1410 digitally converts the input audio signal input from the connectivity module 1321, for example, and encodes the input audio signal according to an audio encoding method such as an MPEG audio method or an AC3 (Audio Code number 3) method.
  • the audio encoder 1410 sequentially writes the encoded audio stream to the audio ES buffer 1409A.
  • the audio decoder 1411 decodes audio data from the encoded audio stream input from the audio ES buffer 1409B and converts it into an analog signal.
  • the audio decoder 1411 outputs an audio signal to the connectivity module 1321, for example, as a reproduced analog audio signal.
  • the multiplexing unit 1412 multiplexes the encoded video stream and the encoded audio stream to generate a multiplexed bit stream.
  • the format of the multiplexed bit stream may be any format.
  • the multiplexing unit 1412 may add predetermined header information to the bit stream. Further, the multiplexing unit 1412 may convert the stream format. For example, the multiplexing unit 1412 can generate a transport stream (a bit stream in a transfer format) in which an encoded video stream and an encoded audio stream are multiplexed. Further, the multiplexing unit 1412 can generate file data (recording format data) in which the encoded video stream and the encoded audio stream are multiplexed.
  • the demultiplexing unit 1413 demultiplexes the encoded video stream and the encoded audio stream from the multiplexed bit stream by a method reverse to the multiplexing performed by the multiplexing unit 1412. That is, the demultiplexer 1413 extracts (or separates) the video stream and the audio stream from the bit stream read from the stream buffer 1414.
  • the demultiplexer 1413 may convert the stream format (inverse conversion). For example, the demultiplexing unit 1413 may acquire a transport stream that can be input from the connectivity module 1321 or the broadband modem 1333 via the stream buffer 1414, and convert the transport stream into a video stream and an audio stream. . Further, the demultiplexing unit 1413 may acquire file data read from the storage medium by the connectivity module 1321 via the stream buffer 1414 and convert the file data into a video stream and an audio stream.
  • Stream buffer 1414 buffers the bit stream.
  • the stream buffer 1414 buffers the transport stream input from the multiplexing unit 1412 and outputs the transport stream to, for example, the connectivity module 1321 or the broadband modem 1333 at a predetermined timing or in response to an external request.
  • the stream buffer 1414 buffers the file data input from the multiplexing unit 1412 and records the file data to the connectivity module 1321, for example, at a predetermined timing or in response to an external request. Output to.
  • the stream buffer 1414 buffers a transport stream acquired through, for example, the connectivity module 1321 or the broadband modem 1333, and demultiplexes the transport stream at a predetermined timing or in response to an external request.
  • the stream buffer 1414 buffers file data read from the storage medium by the connectivity module 1321, for example, and outputs the file data to the demultiplexing unit 1413 at a predetermined timing or in response to an external request. To do.
  • the technology according to the present disclosure can be used in the encode / decode engine 1407, for example.
  • the video processor 1332 is a chip or a module to which the technology according to the present disclosure is applied.
  • FIG. 31 is a block diagram showing another example of a schematic configuration of the video processor 1332.
  • the video processor 1332 has a function of encoding and decoding video data by a predetermined method.
  • the video processor 1332 includes a control unit 1511, a display interface 1512, a display engine 1513, an image processing engine 1514, an internal memory 1515, a codec engine 1516, a memory interface 1517, a multiplexing / demultiplexing unit 1518, a network.
  • An interface 1519 and a video interface 1520 are included.
  • the control unit 1511 controls operations of various processing units in the video processor 1332 such as the display interface 1512, the display engine 1513, the image processing engine 1514, and the codec engine 1516.
  • the control unit 1511 includes, for example, a main CPU 1531, a sub CPU 1532, and a system controller 1533.
  • the main CPU 1531 executes a program for controlling the operation of each processing unit in the video processor 1332.
  • the main CPU 1531 supplies a control signal generated through execution of the program to each processing unit.
  • the sub CPU 1532 plays an auxiliary role of the main CPU 1531. For example, the sub CPU 1532 executes a child process and a subroutine of a program executed by the main CPU 1531.
  • the system controller 1533 manages execution of programs by the main CPU 1531 and the sub CPU 1532.
  • the display interface 1512 outputs the image data to, for example, the connectivity module 1321 under the control of the control unit 1511.
  • the display interface 1512 outputs an analog image signal converted from digital image data or the digital image data itself to a display connected to the connectivity module 1321.
  • the display engine 1513 executes format conversion, size conversion, color gamut conversion, and the like for the image data so that the attributes of the image data match the specifications of the output display.
  • the image processing engine 1514 performs image processing that may include filtering processing having an object such as image quality improvement on the image data under the control of the control unit 1511.
  • the internal memory 1515 is a memory device provided inside the video processor 1332 that is shared by the display engine 1513, the image processing engine 1514, and the codec engine 1516.
  • the internal memory 1515 is used when inputting / outputting image data among the display engine 1513, the image processing engine 1514, and the codec engine 1516, for example.
  • the internal memory 1515 may be any type of memory device.
  • the internal memory 1515 may have a relatively small memory size for storing block unit image data and associated parameters.
  • the internal memory 1515 may be a memory having a small capacity but a fast response speed such as SRAM (Static Random Access Memory) (for example, relative to the external memory 1312).
  • SRAM Static Random Access Memory
  • the codec engine 1516 performs an encoding process for encoding image data to generate an encoded video stream, and a decoding process for decoding image data from the encoded video stream.
  • the image encoding scheme supported by the codec engine 1516 may be any one or a plurality of schemes.
  • the codec engine 1516 includes an MPEG-2 Video block 1541, an AVC / H. H.264 block 1542, HEVC / H. H.265 block 1543, HEVC / H. 265 (scalable) block 1544, HEVC / H. 265 (multi-view) block 1545 and MPEG-DASH block 1551.
  • Each of these functional blocks encodes and decodes image data according to a corresponding image encoding method.
  • the MPEG-DASH block 1551 is a functional block that enables image data to be transmitted according to the MPEG-DASH system.
  • the MPEG-DASH block 1551 executes generation of a stream conforming to the standard specification and control of transmission of the generated stream.
  • the encoding and decoding of the image data to be transmitted may be performed by other functional blocks included in the codec engine 1516.
  • the memory interface 1517 is an interface for connecting the video processor 1332 to the external memory 1312. Data generated by the image processing engine 1514 or the codec engine 1516 is output to the external memory 1312 via the memory interface 1517. Data input from the external memory 1312 is supplied to the image processing engine 1514 or the codec engine 1516 via the memory interface 1517.
  • the multiplexing / demultiplexing unit 1518 multiplexes and demultiplexes the encoded video stream and the related bit stream. At the time of multiplexing, the multiplexing / demultiplexing unit 1518 may add predetermined header information to the multiplexed stream. Also, at the time of demultiplexing, the multiplexing / demultiplexing unit 1518 may add predetermined header information to each separated stream. That is, the multiplexing / demultiplexing unit 1518 can perform format conversion together with multiplexing or demultiplexing.
  • the multiplexing / demultiplexing unit 1518 performs conversion and inverse conversion between a plurality of bit streams and a transport stream, which is a multiplexed stream having a transfer format, and a plurality of bit streams and a recording format. You may support conversion and reverse conversion to and from file data.
  • the network interface 1519 is an interface for connecting the video processor 1332 to the broadband modem 1333 or the connectivity module 1321, for example.
  • the video interface 1520 is an interface for connecting the video processor 1332 to the connectivity module 1321 or the camera 1322, for example.
  • the technology according to the present disclosure may be used in, for example, the codec engine 1516.
  • the video processor 1332 is a chip or a module to which the technology according to the present disclosure is applied.
  • the configuration of the video processor 1332 is not limited to the two examples described above.
  • the video processor 1332 may be realized as a single semiconductor chip, or may be realized as a plurality of semiconductor chips.
  • the video processor 1332 may be realized as a three-dimensional stacked LSI formed by stacking a plurality of semiconductors, or a combination of a plurality of LSIs.
  • HEVC scalable coding technology is also referred to as SHVC (Scalable HEVC).
  • SHVC Scalable HEVC
  • the above-described embodiments can be applied to individual layers (base layer and enhancement layer) included in a multi-layer encoded stream. Information regarding the determined SAO mode and offset value may be generated and encoded for each layer, or may be reused between layers.
  • the technology according to the present disclosure may be applied to a multi-view encoding technology.
  • the above-described embodiments can be applied to individual views (base view and non-base view) included in a multi-view encoded stream. Information regarding the determined SAO mode and offset value may be generated and encoded for each view, or may be reused between views.
  • CU, PU, and TU described in this specification mean a logical unit that also includes syntax associated with individual blocks in HEVC. When focusing only on individual blocks as a part of an image, these may be replaced by the terms CB (Coding Block), PB (Prediction Block), and TB (Transform Block), respectively.
  • the CB is formed by hierarchically dividing a CTB (Coding Tree Block) into a quad-tree shape. An entire quadtree corresponds to CTB, and a logical unit corresponding to CTB is called CTU (Coding Tree Unit).
  • the method for transmitting such information is not limited to such an example.
  • these pieces of information may be transmitted or recorded as separate data associated with the encoded bitstream without being multiplexed into the encoded bitstream.
  • the term “associate” means that an image (which may be a part of an image such as a slice or a block) included in the bitstream and information corresponding to the image can be linked at the time of decoding. Means. That is, information may be transmitted on a transmission path different from that of the image (or bit stream).
  • Information may be recorded on a recording medium (or another recording area of the same recording medium) different from the image (or bit stream). Furthermore, the information and the image (or bit stream) may be associated with each other in an arbitrary unit such as a plurality of frames, one frame, or a part of the frame.
  • a setting unit that sets a range of candidate offset values to be applied to pixels of a decoded image based on a quantization parameter used when the image bit depth is quantized according to a threshold value; , A filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image;
  • An image processing apparatus comprising: (2) The image processing apparatus according to (1), wherein the setting unit controls an interval between the adjacent candidates according to the quantization parameter.
  • the setting unit sets a range of candidates for the offset value by setting a parameter for enlarging or reducing the offset value according to the bit depth of the image based on the quantization parameter.
  • the image processing apparatus according to 1) or (2).
  • (4) The image according to any one of (1) to (3), wherein the setting unit sets the range such that the range of the candidate offset value is wider as the quantization parameter is larger. Processing equipment.
  • the setting unit restricts the number of offset value candidates according to the bit depth of the image, and sets the offset value candidates based on the quantization parameter, any of (1) to (4) An image processing apparatus according to claim 1.
  • the setting unit sets the number of offset value candidates in the case of a first bit depth that is the bit depth of the image to the offset value in the case of a second bit depth that is smaller than the first bit depth.
  • the image processing apparatus according to (5), wherein the number is limited to the number of candidates.
  • the setting unit sets a range of candidates for the offset value based on the quantization parameter when the bit depth of the image is larger than a threshold, according to any one of (1) to (6), The image processing apparatus described.
  • the said setting part is an image processing apparatus as described in said (7) which sets the range of the said candidate of an offset value based on the said quantization parameter, when the bit depth of the said image is larger than 10 bits.
  • the setting unit sets a range of candidates for the offset value applied to the pixel of the decoded image according to the offset value applied to the pixel of the image that has already been subjected to the encoding process.
  • the image processing apparatus according to any one of (1) to (8).
  • the setting unit applies to the pixel of the decoded image as the application frequency of the offset value that is smaller than the threshold is higher.
  • (11) The image processing apparatus according to any one of (1) to (10), wherein the setting unit sets a range of candidates for the offset value applied to the image based on a feature amount of the image.
  • (12) The image processing apparatus according to (11), wherein the setting unit sets the range such that the larger the feature amount of the image is, the wider the range of candidates for the offset value applied to the image is. .
  • Processor According to the bit depth of the image, based on the quantization parameter used when quantizing the image, setting a range of candidate offset values to be applied to the decoded image pixels; Executing a filtering process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image; Including an image processing method. (14) The range of candidate offset values to be applied to the decoded image pixels in accordance with the offset value applied to the image pixels that have already been encoded according to the image bit depth.
  • An image processing apparatus comprising: (15) A setting unit that sets a range of candidate offset values to be applied to the decoded pixels of the decoded image based on the feature amount of the image according to the bit depth of the image;
  • a filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image;
  • An image processing apparatus comprising: (16) Processor The range of candidate offset values to be applied to the decoded image pixels in accordance with the offset value applied to the image pixels that have already been encoded according to the image bit depth.

Landscapes

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

Abstract

[Problem] To set an offset value more efficiently. [Solution] An image processing apparatus is provided with: a setting unit that sets the range of candidates for an offset value to be applied to a pixel of a decoding image that has been decoded, in accordance with a bit depth of an image on the basis of a quantization parameter used when the image is quantized; and a filter processing unit that executes filter processing for applying the offset value selected from among the candidates included in the set range to the pixel of the decoding image.

Description

画像処理装置及び画像処理方法Image processing apparatus and image processing method
 本開示は、画像処理装置及び画像処理方法に関する。 The present disclosure relates to an image processing apparatus and an image processing method.
 H.264/AVCよりも符号化効率をさらに向上することを目的として、ITU-TとISO/IECとの共同の標準化団体であるJCTVC(Joint Collaboration Team-Video Coding)により、HEVC(High Efficiency Video Coding)と呼ばれる画像符号化方式の標準化が進められている。 H. For the purpose of further improving the encoding efficiency over H.264 / AVC, JVCVC (Joint Collaboration Team-Video Coding), a joint standardization organization of ITU-T and ISO / IEC, has made HEVC (High Efficiency Video Coding) The standardization of an image encoding method called “N” is underway.
 HEVCは、MPEG2及びAVC(Advanced Video Coding)などの既存の画像符号化方式と同様、シングルレイヤの符号化のみならず、スケーラブル符号化をも提供する。HEVCのスケーラブル符号化技術を、SHVC(Scalable HEVC)ともいう。スケーラブル符号化とは、一般には、粗い画像信号を伝送するレイヤと精細な画像信号を伝送するレイヤとを階層的に符号化する技術をいう。 HEVC provides not only single-layer coding but also scalable coding as well as existing image coding schemes such as MPEG2 and AVC (Advanced Video Coding). HEVC scalable coding technology is also referred to as SHVC (Scalable HEVC). Scalable encoding generally refers to a technique for hierarchically encoding a layer that transmits a coarse image signal and a layer that transmits a fine image signal.
 HEVCの標準仕様の初版は2013年の年初に公表されたが、上述したSHVC以外にも、符号化ツールの充実化などの様々な観点での仕様の拡張が継続的に行われている(例えば、非特許文献3参照)。特に、HEVCから、サンプル適応オフセット(SAO:Sample Adaptive Offset)フィルタと呼ばれる技術を適用されている。このサンプル適応オフセットフィルタでは、バンドオフセットとエッジオフセットと呼ばれる技術に基づく複数のモードのうち、最適なモードを選択することで、符号化効率の向上が図られている。例えば、特許文献1には、サンプル適応オフセットフィルタを適用した画像処理装置の一例が開示されている。 The first edition of the standard specification of HEVC was announced at the beginning of 2013. However, in addition to the above-mentioned SHVC, the specification is continuously expanded from various viewpoints such as enhancement of encoding tools (for example, Non-Patent Document 3). In particular, a technique called a sample adaptive offset (SAO) filter is applied from HEVC. In this sample adaptive offset filter, coding efficiency is improved by selecting an optimum mode from among a plurality of modes based on a technique called band offset and edge offset. For example, Patent Document 1 discloses an example of an image processing apparatus to which a sample adaptive offset filter is applied.
特開2015-216627号公報JP2015-216627A
 一方で、サンプル適応オフセットフィルタは、最適なモード及びオフセット値を設定するための処理の負荷が大きくなる傾向にある。そのため、オフセット値をより効率よく設定することで、性能をより向上させることが可能な仕組みが求められている。 On the other hand, the sample adaptive offset filter tends to increase the processing load for setting the optimum mode and offset value. Therefore, there is a demand for a mechanism that can further improve performance by setting the offset value more efficiently.
 そこで、本開示では、オフセット値をより効率よく設定することが可能な、画像処理装置及び画像処理方法を提案する。 Therefore, the present disclosure proposes an image processing apparatus and an image processing method that can set an offset value more efficiently.
 本開示によれば、画像のビット深度に応じて、当該画像を量子化する際に用いられる量子化パラメタに基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定する設定部と、前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行するフィルタ処理部と、を備える、画像処理装置が提供される。 According to the present disclosure, according to the bit depth of an image, a range of offset value candidates to be applied to pixels of a decoded decoded image is set based on a quantization parameter used when the image is quantized. And a filter processing unit that executes a filter process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image. A processing device is provided.
 また、本開示によれば、プロセッサが、画像のビット深度に応じて、当該画像を量子化する際に用いられる量子化パラメタに基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定することと、前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行することと、を含む、画像処理方法が提供される。 Further, according to the present disclosure, the processor applies an offset value to be applied to the decoded image pixel based on the quantization parameter used when the image is quantized according to the bit depth of the image. Setting a candidate range; and executing filtering processing for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image. An image processing method is provided.
 また、本開示によれば、画像のビット深度に応じて、既に符号化処理が施された画像の画素に対して適用されたオフセット値に応じて、復号された復号画像の画素に対して適用する前記オフセット値の候補の範囲を設定する設定部と、前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行するフィルタ処理部と、を備える、画像処理装置が提供される。 Further, according to the present disclosure, applied to the decoded image pixel according to the offset value applied to the image pixel that has already been subjected to the encoding process according to the bit depth of the image. A setting unit for setting a range of candidates for the offset value to be performed, and a filtering process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image An image processing apparatus is provided.
 また、本開示によれば、画像のビット深度に応じて、前記画像の特徴量に基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定する設定部と、前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行するフィルタ処理部と、を備える、画像処理装置が提供される。 Further, according to the present disclosure, the setting unit configured to set a range of offset value candidates to be applied to the decoded image pixels based on the image feature amount according to the image bit depth; There is provided an image processing apparatus comprising: a filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to a pixel of a decoded image. .
 また、本開示によれば、プロセッサが、画像のビット深度に応じて、既に符号化処理が施された画像の画素に対して適用されたオフセット値に応じて、復号された復号画像の画素に対して適用する前記オフセット値の候補の範囲を設定することと、前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行することと、を含む、画像処理方法が提供される。 Further, according to the present disclosure, the processor applies the decoded image pixel to the decoded image according to the offset value applied to the image pixel that has already been subjected to the encoding process according to the bit depth of the image. A filter process for setting a range of candidates for the offset value to be applied to the pixel and applying the offset value selected from the candidates included in the set range to the pixels of the decoded image Performing an image processing method.
 また、本開示によれば、プロセッサが、画像のビット深度に応じて、前記画像の特徴量に基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定することと、前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行することと、を含む、画像処理方法が提供される。 According to the present disclosure, the processor sets a range of candidate offset values to be applied to the decoded pixel of the decoded image based on the feature amount of the image according to the bit depth of the image. And performing a filtering process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image. .
 以上説明したように本開示によれば、オフセット値の設定に係る性能をより向上させることが可能な、画像処理装置及び画像処理方法が提供される。 As described above, according to the present disclosure, it is possible to provide an image processing apparatus and an image processing method capable of further improving performance related to setting of an offset value.
 なお、上記の効果は必ずしも限定的なものではなく、上記の効果とともに、または上記の効果に代えて、本明細書に示されたいずれかの効果、または本明細書から把握され得る他の効果が奏されてもよい。 Note that the above effects are not necessarily limited, and any of the effects shown in the present specification, or other effects that can be grasped from the present specification, together with or in place of the above effects. May be played.
エッジオフセット処理の概要について説明するための説明図である。It is explanatory drawing for demonstrating the outline | summary of an edge offset process. バンドオフセット処理の概要について説明するための説明図である。It is explanatory drawing for demonstrating the outline | summary of a band offset process. 本開示の第1の実施形態に係る画像符号化装置の構成の一例を示したブロック図である。It is the block diagram which showed an example of the structure of the image coding apparatus which concerns on 1st Embodiment of this indication. 同実施形態に係るループフィルタの構成の一例を示したブロック図である。It is the block diagram which showed an example of the structure of the loop filter which concerns on the same embodiment. 同実施形態に係る画像符号化装置の一連の処理の流れについて説明するための説明図である。It is explanatory drawing for demonstrating the flow of a series of processes of the image coding apparatus which concerns on the same embodiment. 同実施形態に係る画像符号化装置の一連の処理の流れの一例を示したフローチャートである。It is the flowchart which showed an example of the flow of a series of processes of the image coding apparatus which concerns on the same embodiment. 同実施形態に係るサンプル適応オフセットフィルタの構成の一例を示したブロック図である。It is the block diagram which showed an example of the structure of the sample adaptive offset filter which concerns on the same embodiment. 同実施形態に係るサンプル適応オフセットフィルタの一連の処理の流れの一例を示したフローチャートである。It is the flowchart which showed an example of the flow of a series of processes of the sample adaptive offset filter concerning the embodiment. 同実施形態に係る切り替え判定部による、スライスごとのSAO処理の適用の可否の判定に係る処理の一例について示したフローチャートである。It is the flowchart shown about an example of the process which concerns on the determination of the applicability of the SAO process for every slice by the switching determination part which concerns on the same embodiment. 比較例に係るオフセット判定部の構成の一例を示したブロック図である。It is the block diagram which showed an example of the structure of the offset determination part which concerns on a comparative example. 比較例に係る各オフセット測定部と各オフセット値との対応関係の一例を示したテーブルである。It is the table which showed an example of the correspondence of each offset measurement part which concerns on a comparative example, and each offset value. 比較例に係るオフセット判定部の一連の処理の流れの一例を示したフローチャートである。It is the flowchart which showed an example of the flow of a series of processes of the offset determination part which concerns on a comparative example. 同実施形態に係るオフセット判定部の構成の一例について示したブロック図である。It is the block diagram shown about an example of the structure of the offset determination part which concerns on the same embodiment. 同実施形態に係る各オフセット測定部と各オフセット値との対応関係の一例を示したテーブルである。It is the table which showed an example of the correspondence of each offset measurement part and each offset value concerning the embodiment. 同実施形態に係る各オフセット測定部と各オフセット値との対応関係の一例を示したテーブルである。It is the table which showed an example of the correspondence of each offset measurement part and each offset value concerning the embodiment. 同実施形態に係る各オフセット測定部と各オフセット値との対応関係の一例を示したテーブルである。It is the table which showed an example of the correspondence of each offset measurement part and each offset value concerning the embodiment. 同本実施形態に係るオフセット判定部の一連の処理の流れの一例を示したフローチャートである。It is the flowchart which showed an example of the flow of a series of processes of the offset determination part which concerns on this embodiment. 本開示の第2の実施形態に係る画像符号化装置の概要について説明するための説明図である。It is an explanatory view for explaining an outline of an image coding device concerning a 2nd embodiment of this indication. 同実施形態に係る画像符号化装置における、オフセット判定部の一連の処理の流れの一例を示したフローチャートである。5 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit in the image encoding device according to the embodiment. 変形例2-1に係る画像符号化装置における、オフセット判定部の一連の処理の流れの一例を示したフローチャートである。14 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit in an image encoding device according to Modification 2-1. 本開示の第3の実施形態に係る画像符号化装置における、オフセット判定部の一連の処理の流れの一例を示したフローチャートである。14 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit in an image encoding device according to a third embodiment of the present disclosure. 変形例3-1に係る画像符号化装置における、オフセット判定部の一連の処理の流れの一例を示したフローチャートである。16 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit in an image encoding device according to Modification 3-1. 本開示の第4の実施形態に係る画像符号化装置における、オフセット判定部の一連の処理の流れの一例を示したフローチャートである。14 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit in an image encoding device according to a fourth embodiment of the present disclosure. 変形例4-1に係る画像符号化装置における、オフセット判定部350の一連の処理の流れの一例を示したフローチャートである。16 is a flowchart illustrating an example of a flow of a series of processes of an offset determination unit 350 in an image encoding device according to Modification 4-1. エンコーダのハードウェア構成の一例を示すブロック図である。It is a block diagram which shows an example of the hardware constitutions of an encoder. 携帯電話機の概略的な構成の一例を示すブロック図である。It is a block diagram which shows an example of a schematic structure of a mobile telephone. 記録再生装置の概略的な構成の一例を示すブロック図である。It is a block diagram which shows an example of a schematic structure of a recording / reproducing apparatus. 撮像装置の概略的な構成の一例を示すブロック図である。It is a block diagram which shows an example of a schematic structure of an imaging device. ビデオセットの概略的な構成の一例を示すブロック図である。It is a block diagram which shows an example of a schematic structure of a video set. ビデオプロセッサの概略的な構成の一例を示すブロック図である。It is a block diagram which shows an example of a schematic structure of a video processor. ビデオプロセッサの概略的な構成の他の例を示すブロック図である。It is a block diagram which shows the other example of the schematic structure of a video processor.
 以下に添付図面を参照しながら、本開示の好適な実施の形態について詳細に説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。 Hereinafter, preferred embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In addition, in this specification and drawing, about the component which has the substantially same function structure, duplication description is abbreviate | omitted by attaching | subjecting the same code | symbol.
 なお、説明は以下の順序で行うものとする。
 1.サンプル適応オフセットフィルタの概要
 2.第1の実施形態
  2-1.画像符号化装置の全体的な構成例
  2-2.ループフィルタの構成例
  2-3.一連の処理の流れ
  2-4.サンプル適応オフセットフィルタ
   2-4-1.サンプル適応オフセットフィルタの構成例
   2-4-2.サンプル適応オフセットフィルタの処理の流れ
  2-5.オフセット判定部
   2-5-1.オフセット判定部の比較例
   2-5-2.オフセット判定部の構成例
   2-5-3.オフセット判定部の処理の流れ
  2-6.まとめ
 3.第2の実施形態
  3-1.概要
  3-2.処理
  3-3.変形例
  3-4.まとめ
 4.第3の実施形態
  4-1.概要
  4-2.処理
  4-3.変形例
  4-4.まとめ
 5.第4の実施形態
  5-1.概要
  5-2.処理
  5-3.変形例
  5-4.まとめ
 6.ハードウェア構成例
 7.応用例
  7-1.様々な製品への応用
  7-2.様々な実装レベル
 8.むすび
The description will be made in the following order.
1. 1. Overview of sample adaptive offset filter First embodiment 2-1. Example of overall configuration of image encoding device 2-2. Configuration example of loop filter 2-3. Flow of a series of processes 2-4. Sample adaptive offset filter 2-4-1. Configuration example of sample adaptive offset filter 2-4-2. Sample adaptive offset filter processing flow 2-5. Offset determination unit 2-5-1. Comparative example of offset determination unit 2-5-2. Configuration example of offset determination unit 2-5-3. Process flow of offset determination unit 2-6. Summary 3. Second embodiment 3-1. Outline 3-2. Processing 3-3. Modification 3-4. Summary 4. Third embodiment 4-1. Outline 4-2. Processing 4-3. Modification 4-4. Summary 5. Fourth embodiment 5-1. Outline 5-2. Processing 5-3. Modification 5-4. Summary 6. 6. Hardware configuration example Application example 7-1. Application to various products 7-2. Various implementation levels Conclusion
 <<1.サンプル適応オフセットフィルタの概要>>
 まず、サンプル適応オフセットフィルタの概要について説明する。サンプル適応オフセット(以下、「SAO」と呼ぶ場合がある)フィルタは、H.265/HEVCで新たに導入されたループフィルタ技術であり、デブロッキングフィルタ処理の後に実行される。SAOは、エッジオフセット(EO:Edge Offset)とバンドオフセット(BO:Band Offset)と呼ばれる2種類の技術から構成されており、CTU(Coding Tree Unit)ごと(即ち、LCU(Largest Coding Unit)ごと)にパラメタが設定される。
<< 1. Overview of sample adaptive offset filter >>
First, an outline of the sample adaptive offset filter will be described. A sample adaptive offset (hereinafter sometimes referred to as “SAO”) filter is an H.264 filter. It is a loop filter technology newly introduced in H.265 / HEVC, and is executed after deblocking filter processing. SAO is composed of two types of technologies called edge offset (EO: Edge Offset) and band offset (BO: Band Offset). The parameter is set to.
 まず、エッジオフセット処理の概要について説明する。エッジオフセット処理は、処理対象となる画素と、当該画素に隣接する2つの隣接画素の相対関係に応じて、画素ごとに画素値に対してオフセット値の加減算を行う処理である。 First, the outline of edge offset processing will be described. The edge offset process is a process in which an offset value is added to or subtracted from the pixel value for each pixel in accordance with the relative relationship between the pixel to be processed and two adjacent pixels adjacent to the pixel.
 例えば、図1は、エッジオフセット処理の概要について説明するための説明図である。図1に示すEO_0~EO_3は、エッジオフセット処理における画素配列の候補(クラス)を示している。図1において、参照符号cで示された画素が処理対象となる画素を示しており、参照符号a及びbで示された画素が、処理対象となる画素cの隣接画素を示している。なお、クラスEO_0~EO_3のうち、どのクラスを用いるかについては、符号化パラメタ「sao_eo_class_luma」及び「sao_eo_class_chroma」により、輝度と色差との双方についてCTUごとに選択できる。 For example, FIG. 1 is an explanatory diagram for explaining an outline of the edge offset processing. EO_0 to EO_3 shown in FIG. 1 indicate pixel array candidates (classes) in the edge offset processing. In FIG. 1, a pixel indicated by reference numeral c indicates a pixel to be processed, and pixels indicated by reference numerals a and b indicate pixels adjacent to the pixel c to be processed. Note that which of the classes EO_0 to EO_3 is to be used can be selected for each CTU for both luminance and color difference using the encoding parameters “sao_eo_class_luma” and “sao_eo_class_chroma”.
 また、カテゴリ1~カテゴリ4は、対象画素cと隣接画素a及びbとの間の画素値の関係を分類したものである。例えば、カテゴリ1は、対象画素cの画素値が、隣接画素a及びbのいずれの画素値よりも小さい場合を示している。また、カテゴリ2は、対象画素cの画素値が、隣接画素a及びbのいずれか一方よりも小さく、他方と等しい場合を示している。カテゴリ1及び2の場合には、対象画素cに対してオフセットを加算することで、対象画素cと隣接画素a及びbとの間で画素値の平滑化が行われる。 Further, Category 1 to Category 4 classify the relationship of pixel values between the target pixel c and the adjacent pixels a and b. For example, category 1 shows a case where the pixel value of the target pixel c is smaller than any pixel value of the adjacent pixels a and b. Category 2 shows a case where the pixel value of the target pixel c is smaller than one of the adjacent pixels a and b and equal to the other. In the case of categories 1 and 2, the pixel value is smoothed between the target pixel c and the adjacent pixels a and b by adding an offset to the target pixel c.
 カテゴリ3は、対象画素cの画素値が、隣接画素a及びbのいずれか一方よりも大きく、他方と等しい場合を示している。また、カテゴリ4は、対象画素cの画素値が、隣接画素a及びbのいずれの画素値よりも大きい場合を示している。カテゴリ3及び4の場合には、対象画素cに対してオフセットが減算することで、対象画素cと隣接画素a及びbとの間で画素値の平滑化が行われる。 Category 3 shows a case where the pixel value of the target pixel c is larger than one of the adjacent pixels a and b and equal to the other. Category 4 shows a case where the pixel value of the target pixel c is larger than any pixel value of the adjacent pixels a and b. In the case of categories 3 and 4, the pixel value is smoothed between the target pixel c and the adjacent pixels a and b by subtracting the offset from the target pixel c.
 なお、エッジオフセットでは、上記に説明したカテゴリ1~カテゴリ4に加えて、エッジオフセット処理を行わないことを示すカテゴリ0が設けられている。 In addition, in the edge offset, in addition to the categories 1 to 4 described above, a category 0 indicating that the edge offset processing is not performed is provided.
 このように、エッジオフセット処理では、クラスEO_0~EO_3からいずれかのクラスを選択し、選択されたクラスに応じて対象画素cの画素値と隣接画素a及びbの画素値との関係がカテゴリ0~カテゴリ4のいずれに該当するかを特定する。そして、該当するカテゴリに応じて、オフセットを加減算することで、画素系列の平滑化処理を行う。 As described above, in the edge offset processing, any class is selected from the classes EO_0 to EO_3, and the relationship between the pixel value of the target pixel c and the pixel values of the adjacent pixels a and b is category 0 according to the selected class. Specify which of category 4 is applicable. Then, the pixel series is smoothed by adding or subtracting the offset according to the corresponding category.
 次に、バンドオフセット処理の概要について説明する。バンドオフセット処理では、画素値の階調(即ち、0からビット深度に応じて表現可能な最大値)を32個のバンドに分割し、その中から連続する4個のバンドに属する画素に対して、バンドごとに設定したオフセット値によって画素値を変更(加減算)する。 Next, the outline of the band offset process will be described. In the band offset processing, the gradation of the pixel value (that is, the maximum value that can be expressed according to the bit depth from 0) is divided into 32 bands, and pixels belonging to four consecutive bands are among them. The pixel value is changed (added or subtracted) according to the offset value set for each band.
 例えば、図2は、バンドオフセット処理の概要について説明するための説明図であり、ビット深度が8ビットの場合を示している。なお、H.265/HEVCでは、画素のビット深度として、8ビット(画素値が0~255)と10ビット(画素値が0~1023)とを利用できる。即ち、図2に示すビット深度が8ビットの場合の例では、画素値0~255を32のバンドに分割しており、分割された0~31のバンドのうち、バンド3~6の4つのバンドが選択された場合を示している。 For example, FIG. 2 is an explanatory diagram for explaining the outline of the band offset processing, and shows a case where the bit depth is 8 bits. H. In H.265 / HEVC, 8 bits (pixel value is 0 to 255) and 10 bits (pixel value is 0 to 1023) can be used as the bit depth of the pixel. That is, in the example in which the bit depth shown in FIG. 2 is 8 bits, the pixel values 0 to 255 are divided into 32 bands, and among the divided 0 to 31 bands, This shows a case where a band is selected.
 以上のように、サンプル適応オフセットフィルタでは、CTUごとに、上記に説明したエッジオフセット処理とバンドオフセット処理とのうちいずれかを選択し、選択した処理に応じて該当する画素値に対してオフセットを加減算することで平滑化処理を施す。 As described above, in the sample adaptive offset filter, for each CTU, one of the edge offset processing and the band offset processing described above is selected, and an offset is applied to the corresponding pixel value according to the selected processing. Smoothing is performed by adding and subtracting.
 <<2.第1の実施形態>>
  <2-1.画像符号化装置の全体的な構成例>
 以下に、本開示の第1の実施形態に係る画像符号化装置について説明する。まず、図3を参照して、本実施形態に係る画像符号化装置1の構成の一例について説明する。図3は、第1の実施形態に係る画像符号化装置1の構成の一例を示したブロック図である。図1に示すように、画像符号化装置1は、並び替えバッファ11と、減算部13と、直交変換部14と、量子化部15と、可逆符号化部16と、蓄積バッファ17と、レート制御部18と、逆量子化部21と、逆直交変換部22と、加算部23と、ループフィルタ24と、フレームメモリ25と、選択部26及び27と、イントラ予測部30と、インター予測部35とを含む。
<< 2. First Embodiment >>
<2-1. Overall Configuration Example of Image Encoding Device>
The image encoding device according to the first embodiment of the present disclosure will be described below. First, an example of the configuration of the image encoding device 1 according to the present embodiment will be described with reference to FIG. FIG. 3 is a block diagram showing an example of the configuration of the image encoding device 1 according to the first embodiment. As shown in FIG. 1, the image encoding device 1 includes a rearrangement buffer 11, a subtraction unit 13, an orthogonal transformation unit 14, a quantization unit 15, a lossless encoding unit 16, a storage buffer 17, a rate Control unit 18, inverse quantization unit 21, inverse orthogonal transform unit 22, addition unit 23, loop filter 24, frame memory 25, selection units 26 and 27, intra prediction unit 30, and inter prediction unit 35.
 並び替えバッファ11は、一連の画像データに含まれる画像を並び替える。並び替えバッファ11は、符号化処理に係るGOP(Group of Pictures)構造に応じて画像を並び替えた後、並び替え後の画像データを減算部13、イントラ予測部30、インター予測部35及びループフィルタ24へ出力する。 The rearrangement buffer 11 rearranges images included in a series of image data. The rearrangement buffer 11 rearranges the images according to the GOP (Group of Pictures) structure related to the encoding process, and then subtracts the rearranged image data, the intra prediction unit 30, the inter prediction unit 35, and the loop. Output to the filter 24.
 減算部13には、並び替えバッファ11から入力される画像データ、及び後に説明するイントラ予測部30又はインター予測部35から入力される予測画像データが供給される。減算部13は、並び替えバッファ11から入力される画像データと予測画像データとの差分である予測誤差データを算出し、算出した予測誤差データを直交変換部14へ出力する。 The subtraction unit 13 is supplied with image data input from the rearrangement buffer 11 and predicted image data input from the intra prediction unit 30 or the inter prediction unit 35 described later. The subtraction unit 13 calculates prediction error data that is a difference between the image data input from the rearrangement buffer 11 and the prediction image data, and outputs the calculated prediction error data to the orthogonal transformation unit 14.
 直交変換部14は、減算部13から入力される予測誤差データについて直交変換を行う。直交変換部14により実行される直交変換は、例えば、離散コサイン変換(Discrete Cosine Transform:DCT)又はカルーネン・レーベ変換などであってよい。直交変換は、CUを分割することにより形成されるTU(変換単位)の各々について実行される。TUのサイズは、4×4画素、8×8画素、16×16画素及び32×32画素から適応的に選択される。直交変換部14は、直交変換処理により取得される変換係数データを量子化部15へ出力する。 The orthogonal transform unit 14 performs orthogonal transform on the prediction error data input from the subtraction unit 13. The orthogonal transformation performed by the orthogonal transformation part 14 may be discrete cosine transformation (Discrete Cosine Transform: DCT) or Karoonen-Labe transformation, for example. Orthogonal transformation is performed for each TU (transformation unit) formed by dividing a CU. The size of the TU is adaptively selected from 4 × 4 pixels, 8 × 8 pixels, 16 × 16 pixels, and 32 × 32 pixels. The orthogonal transform unit 14 outputs transform coefficient data acquired by the orthogonal transform process to the quantization unit 15.
 量子化部15には、直交変換部14から入力される変換係数データ、及び後に説明するレート制御部18からのレート制御信号が供給される。量子化部15は、レート制御信号に従って決定される量子化ステップで変換係数データを量子化する。量子化部15は、量子化後の変換係数データ(以下、量子化データという)を可逆符号化部16及び逆量子化部21へ出力する。なお、この量子化データが、「ビットストリーム」の一例に相当する。 The quantization unit 15 is supplied with transform coefficient data input from the orthogonal transform unit 14 and a rate control signal from the rate control unit 18 described later. The quantization unit 15 quantizes the transform coefficient data in a quantization step determined according to the rate control signal. The quantization unit 15 outputs the quantized transform coefficient data (hereinafter referred to as quantized data) to the lossless encoding unit 16 and the inverse quantization unit 21. The quantized data corresponds to an example of “bit stream”.
 可逆符号化部16は、量子化部15から入力される量子化データについて可逆符号化処理を行うことにより、符号化ストリームを生成する。また、可逆符号化部16は、デコーダにより参照される様々なパラメタを符号化して、符号化されたパラメタを符号化ストリームのヘッダ領域に挿入する。可逆符号化部16により符号化されるパラメタは、Quad-Tree構造を特定する上述したパラメタ、並びに後に説明するイントラ予測に関する情報及びインター予測に関する情報を含み得る。そして、可逆符号化部16は、生成した符号化ストリームを蓄積バッファ17へ出力する。 The lossless encoding unit 16 generates an encoded stream by performing a lossless encoding process on the quantized data input from the quantization unit 15. Further, the lossless encoding unit 16 encodes various parameters referred to by the decoder, and inserts the encoded parameters into the header area of the encoded stream. The parameters encoded by the lossless encoding unit 16 may include the above-described parameters that specify the Quad-Tree structure, and information related to intra prediction and information related to inter prediction, which will be described later. Then, the lossless encoding unit 16 outputs the generated encoded stream to the accumulation buffer 17.
 蓄積バッファ17は、可逆符号化部16から入力される符号化ストリームを半導体メモリなどの記憶媒体を用いて一時的に蓄積する。そして、蓄積バッファ17は、蓄積した符号化ストリームを、伝送路の帯域に応じたレートで、図示しない伝送部(例えば、通信インタフェース又は周辺機器との接続インタフェースなど)へ出力する。 The accumulation buffer 17 temporarily accumulates the encoded stream input from the lossless encoding unit 16 using a storage medium such as a semiconductor memory. Then, the accumulation buffer 17 outputs the accumulated encoded stream to a transmission unit (not shown) (for example, a communication interface or a connection interface with a peripheral device) at a rate corresponding to the bandwidth of the transmission path.
 レート制御部18は、蓄積バッファ17の空き容量を監視する。そして、レート制御部18は、蓄積バッファ17の空き容量に応じてレート制御信号を生成し、生成したレート制御信号を量子化部15へ出力する。例えば、レート制御部18は、蓄積バッファ17の空き容量が少ない時には、量子化データのビットレートを低下させるためのレート制御信号を生成する。また、例えば、レート制御部18は、蓄積バッファ17の空き容量が十分大きい時には、量子化データのビットレートを高めるためのレート制御信号を生成する。 The rate control unit 18 monitors the free capacity of the accumulation buffer 17. Then, the rate control unit 18 generates a rate control signal according to the free capacity of the accumulation buffer 17 and outputs the generated rate control signal to the quantization unit 15. For example, the rate control unit 18 generates a rate control signal for reducing the bit rate of the quantized data when the free capacity of the storage buffer 17 is small. For example, when the free capacity of the accumulation buffer 17 is sufficiently large, the rate control unit 18 generates a rate control signal for increasing the bit rate of the quantized data.
 逆量子化部21、逆直交変換部22及び加算部23は、ローカルデコーダを構成する。なお、当該ローカルデコーダが、量子化データを復元して復号画像データを生成する「複合部」の一例に相当する。 The inverse quantization unit 21, the inverse orthogonal transform unit 22, and the addition unit 23 constitute a local decoder. The local decoder corresponds to an example of a “composite unit” that restores quantized data and generates decoded image data.
 逆量子化部21は、量子化部15により使用されたものと同じ量子化ステップで量子化データを逆量子化し、変換係数データを復元する。そして、逆量子化部21は、復元した変換係数データを逆直交変換部22へ出力する。 The inverse quantization unit 21 inversely quantizes the quantized data in the same quantization step as that used by the quantization unit 15 and restores transform coefficient data. Then, the inverse quantization unit 21 outputs the restored transform coefficient data to the inverse orthogonal transform unit 22.
 逆直交変換部22は、逆量子化部21から入力される変換係数データについて逆直交変換処理を行うことにより、予測誤差データを復元する。直交変換と同様、逆直交変換は、TUごとに実行される。そして、逆直交変換部22は、復元した予測誤差データを加算部23へ出力する。 The inverse orthogonal transform unit 22 restores the prediction error data by performing an inverse orthogonal transform process on the transform coefficient data input from the inverse quantization unit 21. Similar to the orthogonal transform, the inverse orthogonal transform is performed for each TU. Then, the inverse orthogonal transform unit 22 outputs the restored prediction error data to the addition unit 23.
 加算部23は、逆直交変換部22から入力される復元された予測誤差データとイントラ予測部30又はインター予測部35から入力される予測画像データとを加算することにより、復号画像データ(リコンストラクト画像)を生成する。そして、加算部23は、生成した復号画像データをループフィルタ24及びフレームメモリ25へ出力する。 The adder 23 adds the decoded prediction error data input from the inverse orthogonal transform unit 22 and the predicted image data input from the intra prediction unit 30 or the inter prediction unit 35, thereby obtaining decoded image data (reconstruction). Image). Then, the adder 23 outputs the generated decoded image data to the loop filter 24 and the frame memory 25.
 ループフィルタ24は、画質の向上を目的とする、デブロックフィルタ(DF)、サンプル適応オフセット(SAO)フィルタ及び適応ループフィルタ(ALF)などのフィルタ群を含む。ループフィルタ24は、加算部23から入力される復号画像データを、並び替えバッファ11から供給される原画像データに基づきフィルタリング処理を施し、フィルタリング後の復号画像データをフレームメモリ25へ出力する。なお、ループフィルタ24の詳細については別途後述する。 The loop filter 24 includes a filter group such as a deblocking filter (DF), a sample adaptive offset (SAO) filter, and an adaptive loop filter (ALF) for the purpose of improving image quality. The loop filter 24 performs a filtering process on the decoded image data input from the adding unit 23 based on the original image data supplied from the rearrangement buffer 11 and outputs the decoded image data after filtering to the frame memory 25. The details of the loop filter 24 will be described later separately.
 フレームメモリ25は、加算部23から入力されるフィルタリング前の復号画像データ、及びループフィルタ24から入力されるフィルタリング後の復号画像データを記憶媒体を用いて記憶する。 The frame memory 25 stores the decoded image data before filtering input from the adding unit 23 and the decoded image data after filtering input from the loop filter 24 using a storage medium.
 選択部26は、イントラ予測のために使用されるフィルタリング前の復号画像データをフレームメモリ25から読み出し、読み出した復号画像データを参照画像データとしてイントラ予測部30に供給する。また、選択部26は、インター予測のために使用されるフィルタリング後の復号画像データをフレームメモリ25から読み出し、読み出した復号画像データを参照画像データとしてインター予測部35に供給する。 The selection unit 26 reads out the decoded image data before filtering used for intra prediction from the frame memory 25, and supplies the read decoded image data to the intra prediction unit 30 as reference image data. Also, the selection unit 26 reads out the decoded image data after filtering used for inter prediction from the frame memory 25 and supplies the read out decoded image data to the inter prediction unit 35 as reference image data.
 選択部27は、イントラ予測モードにおいて、イントラ予測部30から出力されるイントラ予測の結果としての予測画像データを減算部13へ出力すると共に、イントラ予測に関する情報を可逆符号化部16へ出力する。また、選択部27は、インター予測モードにおいて、インター予測部35から出力されるインター予測の結果としての予測画像データを減算部13へ出力すると共に、インター予測に関する情報を可逆符号化部16へ出力する。選択部27は、イントラ予測モードとインター予測モードとを、コストの大きさに応じて切り替える。 In the intra prediction mode, the selection unit 27 outputs predicted image data as a result of the intra prediction output from the intra prediction unit 30 to the subtraction unit 13 and outputs information related to the intra prediction to the lossless encoding unit 16. In addition, in the inter prediction mode, the selection unit 27 outputs prediction image data as a result of the inter prediction output from the inter prediction unit 35 to the subtraction unit 13 and outputs information related to the inter prediction to the lossless encoding unit 16. To do. The selection unit 27 switches between the intra prediction mode and the inter prediction mode according to the cost.
 イントラ予測部30は、原画像データ及び復号画像データに基づいて、CUを分割することにより形成されるPU(予測単位)ごとにイントラ予測処理を行う。例えば、イントラ予測部30は、予測モードセット内の各候補モードによる予測結果を所定のコスト関数を用いて評価する。次に、イントラ予測部30は、コストが最小となる予測モード、即ち圧縮率が最も高くなる予測モードを、最適な予測モードとして選択する。また、イントラ予測部30は、当該最適な予測モードに従って予測画像データを生成する。そして、イントラ予測部30は、選択した最適な予測モードを表す予測モード情報を含むイントラ予測に関する情報、コスト、及び予測画像データを、選択部27へ出力する。 The intra prediction unit 30 performs an intra prediction process for each PU (prediction unit) formed by dividing a CU based on the original image data and the decoded image data. For example, the intra prediction unit 30 evaluates the prediction result of each candidate mode in the prediction mode set using a predetermined cost function. Next, the intra prediction unit 30 selects the prediction mode with the lowest cost, that is, the prediction mode with the highest compression rate, as the optimal prediction mode. Further, the intra prediction unit 30 generates predicted image data according to the optimal prediction mode. Then, the intra prediction unit 30 outputs information related to intra prediction including prediction mode information representing the selected optimal prediction mode, cost, and predicted image data to the selection unit 27.
 インター予測部35は、原画像データ及び復号画像データに基づいて、CUを分割することにより形成されるPUごとにインター予測処理を行う。例えば、インター予測部35は、予測モードセット内の各候補モードによる予測結果を所定のコスト関数を用いて評価する。次に、インター予測部35は、コストが最小となる予測モード、即ち圧縮率が最も高くなる予測モードを、最適な予測モードとして選択する。また、インター予測部35は、当該最適な予測モードに従って予測画像データを生成する。そして、インター予測部35は、選択した最適な予測モードを表す予測モード情報と動き情報とを含むインター予測に関する情報、コスト、及び予測画像データを、選択部27へ出力する。 The inter prediction unit 35 performs inter prediction processing for each PU formed by dividing the CU based on the original image data and the decoded image data. For example, the inter prediction unit 35 evaluates the prediction result of each candidate mode in the prediction mode set using a predetermined cost function. Next, the inter prediction unit 35 selects the prediction mode with the lowest cost, that is, the prediction mode with the highest compression rate, as the optimal prediction mode. Further, the inter prediction unit 35 generates predicted image data according to the optimal prediction mode. Then, the inter prediction unit 35 outputs to the selection unit 27 information, cost, and predicted image data regarding inter prediction including the prediction mode information representing the selected optimal prediction mode and motion information.
  <2-2.ループフィルタの構成例>
 次に、図4を参照して、本実施形態に係るループフィルタ24の構成の一例について説明する。図4は、本実施形態に係るループフィルタ24の構成の一例を示したブロック図である。図4に示すように、ループフィルタ24は、原画像保持部100と、デブロックフィルタ200と、サンプル適応オフセット(SAO)フィルタ300と、適応ループフィルタ400とを含む。
<2-2. Example of loop filter configuration>
Next, an example of the configuration of the loop filter 24 according to the present embodiment will be described with reference to FIG. FIG. 4 is a block diagram showing an example of the configuration of the loop filter 24 according to the present embodiment. As shown in FIG. 4, the loop filter 24 includes an original image holding unit 100, a deblocking filter 200, a sample adaptive offset (SAO) filter 300, and an adaptive loop filter 400.
 原画像保持部100は、並び替えバッファ11からループフィルタ24に供給される原画像データを保持するための保持部である。ループフィルタ24内の各構成は、原画像保持部100に保持された原画像データを適宜参照することで、各々のフィルタ処理を実行する。 The original image holding unit 100 is a holding unit for holding original image data supplied from the rearrangement buffer 11 to the loop filter 24. Each component in the loop filter 24 executes each filter process by appropriately referring to the original image data held in the original image holding unit 100.
 また、逆量子化部21、逆直交変換部22及び加算部23(即ち、ローカルデコーダ)により復号された復号画像データ(リコンストラクト画像)は、まず、デブロックフィルタ200に供給される。 Also, the decoded image data (reconstructed image) decoded by the inverse quantization unit 21, the inverse orthogonal transform unit 22, and the addition unit 23 (that is, the local decoder) is first supplied to the deblock filter 200.
 デブロックフィルタ200は、適宜デブロックフィルタ処理を行うことにより復号画像データのブロック歪を除去する。なお、本説明では、デブロックフィルタ処理の詳細な説明については省略する。デブロックフィルタ200は、そのフィルタ処理結果をサンプル適応オフセットフィルタ300に出力する。 The deblocking filter 200 removes block distortion of the decoded image data by appropriately performing a deblocking filter process. In this description, a detailed description of the deblocking filter process is omitted. The deblocking filter 200 outputs the filter processing result to the sample adaptive offset filter 300.
 サンプル適応オフセットフィルタ300は、デブロックフィルタ200によるフィルタ後の復号画像データに対して、CTUごとに、適用するSAOのモードと、適用するオフセット値とを決定する。 The sample adaptive offset filter 300 determines the SAO mode to be applied and the offset value to be applied to the decoded image data after the filtering by the deblocking filter 200 for each CTU.
 なお、SAOのモードとは、図1及び図2に示したエッジオフセットとバンドオフセットのうち、いずれが選択されたかを示している。また、エッジオフセットが選択された場合には、SAOのモードは、図1に示したエッジオフセットのクラスEO_0~EO_3とのうちどのクラスが選択され、当該クラスに対応してカテゴリ0~4のうちいずれのカテゴリが選択されたかを示している。また、バンドオフセットが選択された場合には、SAOのモードは、図2に示したバンドオフセットの各バンドのうちどのバンドが選択されたかを示している。 Note that the SAO mode indicates which of the edge offset and the band offset shown in FIGS. 1 and 2 is selected. When the edge offset is selected, the SAO mode is selected from among the edge offset classes EO_0 to EO_3 shown in FIG. 1, and among the categories 0 to 4 corresponding to the class. It shows which category was selected. When the band offset is selected, the SAO mode indicates which band is selected from the bands of the band offset shown in FIG.
 そして、サンプル適応オフセットフィルタ300は、決定したモード及びオフセット値に基づき、復号画像データに対してCTUごとにフィルタ処理(以降では、「SAO処理」と呼ぶ場合がある)を施す。 Then, the sample adaptive offset filter 300 performs filter processing (hereinafter, may be referred to as “SAO processing”) for each CTU on the decoded image data based on the determined mode and offset value.
 特に、本実施形態に係るサンプル適応オフセットフィルタ300は、復号画像データの復号元である量子化データを生成する際の量子化ステップ(QP:Quantization Parameter)に基づき、SAO処理の処理負荷を軽減する。なお、サンプル適応オフセットフィルタ300が、復号画像データの復号元である量子化データの量子化ステップを取得できれば、その取得元は特に限定されない。具体的な一例として、サンプル適応オフセットフィルタ300は、量子化部15から、当該量子化ステップを取得してもよい。なお、本実施形態に係るサンプル適応オフセットフィルタ300の詳細については別途後述する。 In particular, the sample adaptive offset filter 300 according to the present embodiment reduces the processing load of the SAO processing based on a quantization step (QP: Quantization Parameter) when generating quantized data that is a decoding source of the decoded image data. . Note that the acquisition source is not particularly limited as long as the sample adaptive offset filter 300 can acquire the quantization step of the quantized data that is the decoding source of the decoded image data. As a specific example, the sample adaptive offset filter 300 may acquire the quantization step from the quantization unit 15. Details of the sample adaptive offset filter 300 according to this embodiment will be described later.
 サンプル適応オフセットフィルタ300は、SAO処理後の復号画像データを、適応ループフィルタ400に出力する。また、サンプル適応オフセットフィルタ300は、CTUごとに決定したSAOのモードとオフセット値とを、符号化パラメタとして可逆符号化部16に出力する。この出力を受けて、可逆符号化部16は、生成した符号化ストリームに対して、供給されたSAOのモードとオフセット値とを符号化して、当該符号化ストリームのヘッダ領域に挿入する。 The sample adaptive offset filter 300 outputs the decoded image data after the SAO processing to the adaptive loop filter 400. Further, the sample adaptive offset filter 300 outputs the SAO mode and offset value determined for each CTU to the lossless encoding unit 16 as encoding parameters. Receiving this output, the lossless encoding unit 16 encodes the supplied SAO mode and offset value with respect to the generated encoded stream, and inserts it into the header area of the encoded stream.
 適応ループフィルタ400は、サンプル適応オフセットフィルタ300から供給されるSAO処理後の復号画像データに対して、適応ループフィルタ(ALF:AdaptiveLoop Filter)処理を行う。適応ループフィルタ400においては、フィルタとして、例えば、2次元のウィナーフィルタ(Wiener Filter)が用いられる。もちろん、ウィナーフィルタ以外のフィルタが用いられてもよい。 The adaptive loop filter 400 performs an adaptive loop filter (ALF: Adaptive Loop Filter) process on the decoded image data after the SAO process supplied from the sample adaptive offset filter 300. In the adaptive loop filter 400, for example, a two-dimensional Wiener filter is used as a filter. Of course, filters other than the Wiener filter may be used.
 適応ループフィルタ400は、タップサイズの異なる複数のフィルタを有しており、適応ループフィルタ処理を行う。適応ループフィルタ400は、フィルタ処理結果をフレームメモリ25に出力する。 The adaptive loop filter 400 has a plurality of filters with different tap sizes, and performs adaptive loop filter processing. The adaptive loop filter 400 outputs the filter processing result to the frame memory 25.
 以上、図4を参照して、本実施形態に係るループフィルタ24の構成の一例について説明した。 The example of the configuration of the loop filter 24 according to the present embodiment has been described above with reference to FIG.
  <2-3.一連の処理の流れ>
 次に、図5及び図6を参照して、本実施形態に係る画像符号化装置の一連の処理の流れについて説明する。図5及び図6は、本実施形態に係る画像符号化装置の一連の処理の流れについて説明するための説明図である。
<2-3. Flow of a series of processing>
Next, a flow of a series of processes of the image encoding device according to the present embodiment will be described with reference to FIGS. 5 and 6 are explanatory diagrams for explaining a flow of a series of processes of the image encoding device according to the present embodiment.
 例えば、図5は、画像符号化装置が、ピクチャP1を複数のブロック(CTU)に分割して、当該ブロックごとに符号化する処理の流れを示している。図5に示すように、画像符号化装置は、ピクチャP1を、左上から右下に向けてラスタスキャンすることで、固定ブロックサイズの複数のCTUに分割して処理する。即ち、図5に示す例の場合には、画像符号化装置は、ブロックU11、U12、…、U1m、U21、U22、U23、U24の順で、ピクチャP1を分割して処理する。 For example, FIG. 5 shows a flow of processing in which the image encoding apparatus divides the picture P1 into a plurality of blocks (CTU) and encodes the blocks. As illustrated in FIG. 5, the image encoding apparatus performs processing by dividing the picture P1 into a plurality of CTUs having a fixed block size by performing raster scan from the upper left to the lower right. That is, in the example shown in FIG. 5, the image encoding apparatus divides and processes the picture P1 in the order of blocks U11, U12,..., U1m, U21, U22, U23, and U24.
 なお、以下の説明では、特に、ブロックU23を処理の対象とした場合の動作に着目して、当該ブロックU23の復号画像データが生成され、ループフィルタ24によりフィルタ処理が施されるまでの、画像符号化装置の一連の処理の流れについて説明する。なお、この場合には、ブロックU11~U1m、U21、及びU22は、処理済のブロックとなり、当該処理済のブロックのうち、特にブロックU13及びU22は、処理対象ブロックU23の隣接ブロックとなる。 In the following description, focusing on the operation when the block U23 is a processing target, the image from when the decoded image data of the block U23 is generated and filtered by the loop filter 24 is described. A series of processing flow of the encoding apparatus will be described. In this case, the blocks U11 to U1m, U21, and U22 are processed blocks, and among the processed blocks, the blocks U13 and U22 in particular are adjacent blocks to the processing target block U23.
 次に、図6を図3及び図4とあわせて参照して、ピクチャP1中の一のCTUの復号画像データが生成され、ループフィルタ24によりフィルタ処理が施されるまで処理の流れについて説明する。図6は、本実施形態に係る画像符号化装置の一連の処理の流れの一例を示したフローチャートであり、特に、ピクチャP1中の一のCTUの復号画像データが生成され、ループフィルタ24によりフィルタ処理が施されるまで処理の流れを示している。なお、本説明では、復号画像データの生成に着目するものとし、量子化データを可逆符号化することで符号化ストリームを生成して出力する処理については、説明は省略する。 Next, referring to FIG. 6 together with FIGS. 3 and 4, the flow of processing will be described until decoded image data of one CTU in the picture P <b> 1 is generated and filtered by the loop filter 24. . FIG. 6 is a flowchart showing an example of a flow of a series of processes of the image encoding device according to the present embodiment. In particular, decoded image data of one CTU in the picture P1 is generated, and the loop filter 24 performs filtering. The flow of processing is shown until processing is performed. Note that in this description, attention is focused on the generation of decoded image data, and description of processing for generating and outputting an encoded stream by lossless encoding of quantized data is omitted.
 (ステップS11)
 並び替えバッファ11(図3参照)は、一連の画像データに含まれる画像を並び替える。並び替えバッファ11は、符号化処理に係るGOP(Group of Pictures)構造に応じて画像を並び替えた後、並び替え後の画像データを減算部13、イントラ予測部30、インター予測部35及びループフィルタ24へ出力する。
(Step S11)
The rearrangement buffer 11 (see FIG. 3) rearranges the images included in the series of image data. The rearrangement buffer 11 rearranges the images according to the GOP (Group of Pictures) structure related to the encoding process, and then subtracts the rearranged image data, the intra prediction unit 30, the inter prediction unit 35, and the loop. Output to the filter 24.
 また、選択部26は、イントラ予測のために使用されるフィルタリング前の復号画像データをフレームメモリ25から読み出し、読み出した復号画像データを参照画像データとしてイントラ予測部30に供給する。また、選択部26は、インター予測のために使用されるフィルタリング後の復号画像データをフレームメモリ25から読み出し、読み出した復号画像データを参照画像データとしてインター予測部35に供給する。 The selection unit 26 reads decoded image data before filtering used for intra prediction from the frame memory 25 and supplies the read decoded image data to the intra prediction unit 30 as reference image data. Also, the selection unit 26 reads out the decoded image data after filtering used for inter prediction from the frame memory 25 and supplies the read out decoded image data to the inter prediction unit 35 as reference image data.
 イントラ予測部30は、供給された原画像データ及び復号画像データに基づいて、CUを分割することにより形成されるPU(予測単位)ごとにイントラ予測処理を行う。 The intra prediction unit 30 performs an intra prediction process for each PU (prediction unit) formed by dividing a CU based on the supplied original image data and decoded image data.
 なお、このとき、イントラ予測部30は、図5におけるブロックU23をイントラ予測処理の対象とする場合には、当該ブロックU23の原画像データと、処理済の隣接ブロックU13及びU22の復号画像データとに基づきイントラ予測処理を実行する。 At this time, when the block U23 in FIG. 5 is the target of the intra prediction process, the intra prediction unit 30 and the original image data of the block U23 and the decoded image data of the processed adjacent blocks U13 and U22 Intra prediction processing is executed based on the above.
 イントラ予測部30は、予測モードセット内の各候補モードによる予測結果を所定のコスト関数を用いて評価し、当該評価結果に基づき最適な予測モードとして選択する。また、イントラ予測部30は、当該最適な予測モードに従って予測画像データを生成する。そして、イントラ予測部30は、選択した最適な予測モードを表す予測モード情報を含むイントラ予測に関する情報、コスト、及び予測画像データを、選択部27へ出力する。 The intra prediction unit 30 evaluates the prediction result of each candidate mode in the prediction mode set using a predetermined cost function, and selects the optimal prediction mode based on the evaluation result. Further, the intra prediction unit 30 generates predicted image data according to the optimal prediction mode. Then, the intra prediction unit 30 outputs information related to intra prediction including prediction mode information representing the selected optimal prediction mode, cost, and predicted image data to the selection unit 27.
 また、インター予測部35は、原画像データ及び復号画像データに基づいて、CUを分割することにより形成されるPUごとにインター予測処理を行う。 Also, the inter prediction unit 35 performs inter prediction processing for each PU formed by dividing the CU based on the original image data and the decoded image data.
 インター予測部35は、予測モードセット内の各候補モードによる予測結果を所定のコスト関数を用いて評価し、当該評価結果に基づき最適な予測モードとして選択する。また、インター予測部35は、当該最適な予測モードに従って予測画像データを生成する。そして、インター予測部35は、選択した最適な予測モードを表す予測モード情報と動き情報とを含むインター予測に関する情報、コスト、及び予測画像データを、選択部27へ出力する。 The inter prediction unit 35 evaluates the prediction result of each candidate mode in the prediction mode set using a predetermined cost function, and selects the optimum prediction mode based on the evaluation result. Further, the inter prediction unit 35 generates predicted image data according to the optimal prediction mode. Then, the inter prediction unit 35 outputs to the selection unit 27 information, cost, and predicted image data regarding inter prediction including the prediction mode information representing the selected optimal prediction mode and motion information.
 選択部27は、イントラ予測モードにおいて、イントラ予測部30から出力されるイントラ予測の結果としての予測画像データを減算部13へ出力すると共に、イントラ予測に関する情報を可逆符号化部16へ出力する。また、選択部27は、インター予測モードにおいて、インター予測部35から出力されるインター予測の結果としての予測画像データを減算部13へ出力すると共に、インター予測に関する情報を可逆符号化部16へ出力する。選択部27は、イントラ予測モードとインター予測モードとを、コストの大きさに応じて切り替える。 In the intra prediction mode, the selection unit 27 outputs predicted image data as a result of the intra prediction output from the intra prediction unit 30 to the subtraction unit 13 and outputs information related to the intra prediction to the lossless encoding unit 16. In addition, in the inter prediction mode, the selection unit 27 outputs prediction image data as a result of the inter prediction output from the inter prediction unit 35 to the subtraction unit 13 and outputs information related to the inter prediction to the lossless encoding unit 16. To do. The selection unit 27 switches between the intra prediction mode and the inter prediction mode according to the cost.
 (ステップS12)
 減算部13には、並び替えバッファ11から入力される画像データと、イントラ予測部30又はインター予測部35から入力される予測画像データとが供給される。減算部13は、並び替えバッファ11から入力される画像データと予測画像データとの差分である予測誤差データを算出し、算出した予測誤差データを直交変換部14へ出力する。
(Step S12)
The subtraction unit 13 is supplied with image data input from the rearrangement buffer 11 and predicted image data input from the intra prediction unit 30 or the inter prediction unit 35. The subtraction unit 13 calculates prediction error data that is a difference between the image data input from the rearrangement buffer 11 and the prediction image data, and outputs the calculated prediction error data to the orthogonal transformation unit 14.
 (ステップS13)
 直交変換部14は、減算部13から入力される予測誤差データについて直交変換を行う。直交変換部14は、直交変換処理により取得される変換係数データを量子化部15へ出力する。
(Step S13)
The orthogonal transform unit 14 performs orthogonal transform on the prediction error data input from the subtraction unit 13. The orthogonal transform unit 14 outputs transform coefficient data acquired by the orthogonal transform process to the quantization unit 15.
 量子化部15には、直交変換部14から入力される変換係数データ、及びレート制御部18からのレート制御信号が供給される。量子化部15は、レート制御信号に従って決定される量子化ステップで変換係数データを量子化する。量子化部15は、量子化後の変換係数データ(即ち、量子化データ)を可逆符号化部16及び逆量子化部21へ出力する。 The quantization unit 15 is supplied with transform coefficient data input from the orthogonal transform unit 14 and a rate control signal from the rate control unit 18. The quantization unit 15 quantizes the transform coefficient data in a quantization step determined according to the rate control signal. The quantization unit 15 outputs the quantized transform coefficient data (that is, quantized data) to the lossless encoding unit 16 and the inverse quantization unit 21.
 (ステップS14)
 逆量子化部21は、量子化部15により使用されたものと同じ量子化ステップで量子化データを逆量子化し、変換係数データを復元する。そして、逆量子化部21は、復元した変換係数データを逆直交変換部22へ出力する。
(Step S14)
The inverse quantization unit 21 inversely quantizes the quantized data in the same quantization step as that used by the quantization unit 15 to restore transform coefficient data. Then, the inverse quantization unit 21 outputs the restored transform coefficient data to the inverse orthogonal transform unit 22.
 逆直交変換部22は、逆量子化部21から入力される変換係数データについて逆直交変換処理を行うことにより、予測誤差データを復元する。直交変換と同様、逆直交変換は、TUごとに実行される。そして、逆直交変換部22は、復元した予測誤差データを加算部23へ出力する。 The inverse orthogonal transform unit 22 restores the prediction error data by performing an inverse orthogonal transform process on the transform coefficient data input from the inverse quantization unit 21. Similar to the orthogonal transform, the inverse orthogonal transform is performed for each TU. Then, the inverse orthogonal transform unit 22 outputs the restored prediction error data to the addition unit 23.
 (ステップS15)
 加算部23は、逆直交変換部22から入力される復元された予測誤差データとイントラ予測部30又はインター予測部35から入力される予測画像データとを加算することにより、復号画像データ(リコンストラクト画像)を生成する。そして、加算部23は、生成した復号画像データをループフィルタ24及びフレームメモリ25へ出力する。
(Step S15)
The adder 23 adds the decoded prediction error data input from the inverse orthogonal transform unit 22 and the predicted image data input from the intra prediction unit 30 or the inter prediction unit 35, thereby obtaining decoded image data (reconstruction). Image). Then, the adder 23 outputs the generated decoded image data to the loop filter 24 and the frame memory 25.
 (ステップS16)
 ループフィルタ24に出力された復号画像データは、デブロックフィルタ200(図4参照)に供給される。デブロックフィルタ200は、適宜デブロックフィルタ処理を行うことにより復号画像データのブロック歪を除去する。デブロックフィルタ200は、そのフィルタ処理結果をサンプル適応オフセットフィルタ300に出力する。
(Step S16)
The decoded image data output to the loop filter 24 is supplied to the deblock filter 200 (see FIG. 4). The deblocking filter 200 removes block distortion of the decoded image data by appropriately performing a deblocking filter process. The deblocking filter 200 outputs the filter processing result to the sample adaptive offset filter 300.
 (ステップS17)
 サンプル適応オフセットフィルタ300は、デブロックフィルタ200によるフィルタ後の復号画像データに対して、CTUごとに、適用するSAOのモードと、適用するオフセット値とを決定する。そして、サンプル適応オフセットフィルタ300は、決定したモード及びオフセット値に基づき、復号画像データに対してCTUごとにフィルタ処理(即ち、SAO処理)を施す。即ち、ステップS17に示す契機において、図5に示した処理対象ブロックU23に対して、SAO処理が施されることとなる。
(Step S17)
The sample adaptive offset filter 300 determines, for each CTU, the SAO mode to be applied and the offset value to be applied to the decoded image data after filtering by the deblocking filter 200. The sample adaptive offset filter 300 performs filter processing (that is, SAO processing) on the decoded image data for each CTU based on the determined mode and offset value. That is, at the opportunity shown in step S17, SAO processing is performed on the processing target block U23 shown in FIG.
 サンプル適応オフセットフィルタ300は、SAO処理後の復号画像データを、適応ループフィルタ400に出力する。また、サンプル適応オフセットフィルタ300は、CTUごと(即ち、LCUごと)に決定したSAOのモードとオフセット値とを、符号化時のパラメタとして可逆符号化部16に出力する。この出力を受けて、可逆符号化部16は、生成した符号化ストリームに対して、供給されたSAOのモードとオフセット値とを符号化して、当該符号化ストリームのヘッダ領域に挿入する。 The sample adaptive offset filter 300 outputs the decoded image data after the SAO processing to the adaptive loop filter 400. Further, the sample adaptive offset filter 300 outputs the SAO mode and the offset value determined for each CTU (that is, for each LCU) to the lossless encoding unit 16 as encoding parameters. Receiving this output, the lossless encoding unit 16 encodes the supplied SAO mode and offset value with respect to the generated encoded stream, and inserts it into the header area of the encoded stream.
 (ステップS18)
 適応ループフィルタ400は、サンプル適応オフセットフィルタ300から供給されるSAO処理後の復号画像データに対して、適応ループフィルタ(ALF:AdaptiveLoop Filter)処理を行う。
(Step S18)
The adaptive loop filter 400 performs an adaptive loop filter (ALF: Adaptive Loop Filter) process on the decoded image data after the SAO process supplied from the sample adaptive offset filter 300.
 (ステップS19)
 適応ループフィルタ400は、フィルタ処理結果をフレームメモリ25に出力する。以上のようにして、図5に示したブロックU23の復号画像データが生成され、フレームメモリ25に記憶される。なお、フレームメモリ25に記憶されたブロックU23の復号画像データは、例えば、図5に示す未処理ブロックのうち、当該ブロックU23に隣接するブロック(例えば、ブロックU24)のイントラ予測及びインター予測に用いられる。
(Step S19)
The adaptive loop filter 400 outputs the filter processing result to the frame memory 25. As described above, the decoded image data of the block U 23 shown in FIG. 5 is generated and stored in the frame memory 25. The decoded image data of the block U23 stored in the frame memory 25 is used, for example, for intra prediction and inter prediction of a block adjacent to the block U23 (for example, the block U24) among the unprocessed blocks shown in FIG. It is done.
 以上、図5及び図6を参照して、本実施形態に係る画像符号化装置の一連の処理の流れについて説明した。 As described above, with reference to FIGS. 5 and 6, the flow of a series of processes of the image encoding device according to the present embodiment has been described.
  <2-4.サンプル適応オフセットフィルタ>
  <2-4-1.サンプル適応オフセットフィルタの構成例>
 次に、本実施形態に係るサンプル適応オフセットフィルタ300の詳細について説明する。まず、図7を参照して、本実施形態に係るサンプル適応オフセットフィルタ300の構成の一例について説明する。図7は、第1の実施形態に係るサンプル適応オフセットフィルタ300の構成の一例を示したブロック図である。
<2-4. Sample adaptive offset filter>
<2-4-1. Sample Adaptive Offset Filter Configuration>
Next, details of the sample adaptive offset filter 300 according to the present embodiment will be described. First, an example of the configuration of the sample adaptive offset filter 300 according to the present embodiment will be described with reference to FIG. FIG. 7 is a block diagram showing an example of the configuration of the sample adaptive offset filter 300 according to the first embodiment.
 図7に示すように、本実施形態に係るサンプル適応オフセットフィルタ300は、制御部310と、フィルタ処理部390とを含む。また、制御部310は、解析部320と、切り替え判定部360とを含む。なお、制御部310が、「設定部」の一例に相当する。 As shown in FIG. 7, the sample adaptive offset filter 300 according to the present embodiment includes a control unit 310 and a filter processing unit 390. Control unit 310 includes an analysis unit 320 and a switching determination unit 360. The control unit 310 corresponds to an example of a “setting unit”.
 切り替え判定部360は、復号画像データのスライスごとに、輝度と色度とのそれぞれについてSAO処理の適用の可否を判定し、判定結果に基づき解析部320の動作を制御する。 The switching determination unit 360 determines whether or not the SAO process can be applied to each of the luminance and chromaticity for each slice of the decoded image data, and controls the operation of the analysis unit 320 based on the determination result.
 具体的には、切り替え判定部360は、処理対象のスライスが、Iスライス及びPスライスのいずれかの場合には、当該スライスに対するSAO処理の適用を解析部320に指示する。 Specifically, when the slice to be processed is either an I slice or a P slice, the switching determination unit 360 instructs the analysis unit 320 to apply the SAO process to the slice.
 また、切り替え判定部360は、処理対象のスライスがBスライスの場合には、当該Bスライスの直前のスライス(即ち、IスライスまたはPスライス)において、SAO処理が適用されたCTUの数(以降では、「モード数」と呼ぶ場合がある)に応じて、当該Bスライスに対してSAO処理の適用の可否を判定する。 In addition, when the slice to be processed is a B slice, the switching determination unit 360 counts the number of CTUs to which SAO processing has been applied (hereinafter, the I slice or the P slice) immediately before the B slice. , It may be referred to as “number of modes”), to determine whether or not the SAO processing can be applied to the B slice.
 具体的な一例として、切り替え判定部360は、直前のスライスにおいてモード数が所定の閾値TH11以上(例えば、半数以上)の場合には、処理対象のBスライスに対するSAO処理の適用を解析部320に指示する。一方で、直前のスライスにおいてモード数が閾値TH11未満の場合には、切り替え判定部360は、処理対象のBスライスに対するSAO処理の適用を制限する(即ち、非適用とする)ように解析部320に指示する。 As a specific example, when the number of modes in the immediately preceding slice is equal to or greater than a predetermined threshold TH11 (for example, half or more), the switching determination unit 360 applies to the analysis unit 320 the application of SAO processing to the B slice to be processed. Instruct. On the other hand, when the number of modes in the immediately preceding slice is less than the threshold value TH11, the switching determination unit 360 analyzes the analysis unit 320 so as to limit the application of the SAO process to the processing target B slice (that is, do not apply). To instruct.
 また、切り替え判定部360は、スライスごとのSAO処理の適用の可否を、符号化時のパラメタとして可逆符号化部16に出力する。なお、スライスごとのSAO処理の適用の可否を制御するためのパラメタの一例として、輝度に対応した「slice_sao_luma_flag」と、色度に対応した「slice_sao_chroma_flag」とが挙げられる。 Also, the switching determination unit 360 outputs the applicability of SAO processing for each slice to the lossless encoding unit 16 as a parameter at the time of encoding. Note that examples of parameters for controlling whether to apply SAO processing for each slice include “slice_sao_luma_flag” corresponding to luminance and “slice_sao_chroma_flag” corresponding to chromaticity.
 解析部320は、統計量取得部330と、モード判定部340とを含む。解析部320は、原画像保持部100(図4参照)に保持された原画像データと、デブロックフィルタ200から出力される復号画像データとに基づき、SAO処理を施すためのSAOのモードとオフセット値とをCTUごと(即ち、LCUごと)に決定する。なお、解析部320の処理については、切り替え判定部360からの指示に基づき、スライス単位で適用の可否が制御される。以下に、解析部320の各構成の詳細について説明する。 The analysis unit 320 includes a statistic acquisition unit 330 and a mode determination unit 340. The analysis unit 320 is based on the original image data held in the original image holding unit 100 (see FIG. 4) and the decoded image data output from the deblocking filter 200, and the SAO mode and offset for performing SAO processing. A value is determined for each CTU (ie, for each LCU). Note that whether or not the analysis unit 320 can be applied is controlled in units of slices based on an instruction from the switching determination unit 360. Below, the detail of each structure of the analysis part 320 is demonstrated.
 統計量取得部330は、原画像データと復号画像データとに基づきSAOのモードとオフセットとを特定するための統計量を算出する。 The statistic acquisition unit 330 calculates a statistic for specifying the SAO mode and offset based on the original image data and the decoded image data.
 具体的な一例として、統計量取得部330は、復号画像データ中の画素単位で、図1に示したエッジオフセットのクラスEO_0~EO_3それぞれについて、対象画素と隣接画素との対応関係を解析し、カテゴリ0~4それぞれの出現頻度を計上する。また、このとき、統計量取得部330は、計上したカテゴリごとに、復号画像データと原画像データとの間の画素値の差を累積計上する。そして、統計量取得部330は、クラスEO_0~EO_3それぞれについて計上されたカテゴリ0~4それぞれの出現頻度と、当該カテゴリごとに累積計上された画素値とを、統計量として算出する。 As a specific example, the statistic acquisition unit 330 analyzes the correspondence between the target pixel and adjacent pixels for each of the edge offset classes EO_0 to EO_3 illustrated in FIG. 1 in units of pixels in the decoded image data. The frequency of occurrence for each of categories 0 to 4 is counted. Further, at this time, the statistic acquisition unit 330 cumulatively counts the difference in pixel value between the decoded image data and the original image data for each of the counted categories. Then, the statistic acquisition unit 330 calculates the appearance frequency of each of the categories 0 to 4 counted for each of the classes EO_0 to EO_3 and the pixel value accumulated for each category as a statistic.
 また、統計量取得部330は、図2に示したバンドオフセットのバンド0~31それぞれについて、対応する画素の頻度を計上し、その画素における復号画像データと原画像データとの間の画素値の差をバンドごとに累積計上する。そして、統計量取得部330は、バンドごとに計上した頻度と、バンドごとに累積計上した画素値の差とを、統計量として算出する。 Also, the statistic acquisition unit 330 counts the frequency of the corresponding pixel for each of the band offset bands 0 to 31 shown in FIG. 2, and calculates the pixel value between the decoded image data and the original image data at that pixel. Accumulate the difference for each band. Then, the statistic acquisition unit 330 calculates the frequency counted for each band and the difference between the pixel values accumulated for each band as the statistic.
 統計量取得部330は、以上のようにして算出した統計量を、モード判定部340に出力する。 Statistic acquisition unit 330 outputs the statistic calculated as described above to mode determination unit 340.
 モード判定部340は、オフセット判定部350を含む。モード判定部340は、統計量取得部330から供給される統計量に基づき、復号画像データ中のCTU単位でSAOの各モードについて、オフセット値と当該オフセット値に対応するコストとを、オフセット判定部350に算出させる。 The mode determination unit 340 includes an offset determination unit 350. Based on the statistic supplied from the statistic acquisition unit 330, the mode determination unit 340 calculates an offset value and a cost corresponding to the offset value for each SAO mode in CTU units in the decoded image data. 350.
 具体的には、モード判定部340は、エッジオフセットの各クラスEO_0~EO_3と各カテゴリ1~4との組み合わせのそれぞれについて、オフセット値と当該オフセット値に対応するコストとを、オフセット判定部350に算出させる。同様に、モード判定部340は、バンドオフセットの各バンドそれぞれについて、オフセット値と当該オフセット値に対応するコストとを、オフセット判定部350に算出させる。また、モード判定部340は、SAO処理を適用しない場合のコストについても算出する。 Specifically, the mode determination unit 340 sends the offset value and the cost corresponding to the offset value to the offset determination unit 350 for each combination of the edge offset classes EO_0 to EO_3 and the categories 1 to 4. Let it be calculated. Similarly, the mode determination unit 340 causes the offset determination unit 350 to calculate an offset value and a cost corresponding to the offset value for each band of the band offset. The mode determination unit 340 also calculates a cost when the SAO process is not applied.
 オフセット判定部350は、モード判定部340から指示されたモードに対し、オフセット値の候補それぞれについてコストを算出する。そして、オフセット判定部350は、算出した各コストを比較することで、符号化効率を最も向上させることが可能なオフセット値と当該オフセット値に対応するコストとを特定する。なお、オフセット判定部350の詳細については別途後述する。 The offset determination unit 350 calculates a cost for each offset value candidate for the mode instructed by the mode determination unit 340. Then, the offset determination unit 350 compares the calculated costs to identify the offset value that can improve the coding efficiency most and the cost corresponding to the offset value. Details of the offset determination unit 350 will be described later.
 モード判定部340は、SAOの各モードについて算出された各コストを比較し、当該比較結果に基づき、符号化効率を最も向上させることが可能なSAOのモードと、当該モードに対応するオフセット値とをCTUごと(即ち、LCUごと)に特定する。そして、モード判定部340は、CTUごとに特定したモードと、当該モードに対応するオフセット値とを、後述するフィルタ処理部390に出力する。なお、このときモード判定部340は、コストの比較の結果として、SAO処理を適用しないと判定した場合には、対象となるCTUに対してSAO処理を適用しないようにフィルタ処理部390に指示する。 The mode determination unit 340 compares the costs calculated for each mode of SAO, and based on the comparison result, the mode of SAO that can improve the coding efficiency most, and the offset value corresponding to the mode. Is specified for each CTU (ie, for each LCU). And the mode determination part 340 outputs the mode specified for every CTU and the offset value corresponding to the said mode to the filter process part 390 mentioned later. At this time, if it is determined that the SAO processing is not applied as a result of the cost comparison, the mode determination unit 340 instructs the filter processing unit 390 not to apply the SAO processing to the target CTU. .
 また、モード判定部340は、CTUごとに特定したSAOのモードとオフセット値とを、符号化時のパラメタとして可逆符号化部16に出力する。なお、当該符号化時のパラメタとしては、例えば、エッジオフセットとバンドオフセットとのいずれかを示すパラメタとして、輝度に対応した「sao_type_idx_luma」や、色度に対応した「sao_typ_idx_chroma」が挙げられる。また、エッジオフセットが適用された場合に、エッジオフセットのクラスを示すパラメタとして、輝度に対応した「sao_eo_class_luma」や、色度に対応した「sao_eo_class_chroma」が挙げられる。また、バンドオフセットが適用された場合に、バンドの位置を示すパラメタとして、「sao_band_position」が挙げられる。また、オフセット値を通知するためのパラメタとして、オフセット値の絶対値を示す「sao_offset_abs」と、オフセット値の正負を示す「sao_offset_sign」が挙げられる。 Also, the mode determination unit 340 outputs the SAO mode and offset value specified for each CTU to the lossless encoding unit 16 as parameters at the time of encoding. Note that examples of the parameters at the time of encoding include “sao_type_idx_luma” corresponding to luminance and “sao_typ_idx_chroma” corresponding to chromaticity as parameters indicating either edge offset or band offset. Further, when edge offset is applied, “sao_eo_class_luma” corresponding to luminance and “sao_eo_class_chroma” corresponding to chromaticity can be cited as parameters indicating the class of edge offset. In addition, when a band offset is applied, “sao_band_position” can be cited as a parameter indicating the position of the band. Further, “sao_offset_abs” indicating the absolute value of the offset value and “sao_offset_sign” indicating the positive / negative of the offset value can be cited as parameters for notifying the offset value.
 フィルタ処理部390は、復号画像データの各CTUに対して、モード判定部340から供給されるSAOのモードとオフセット値とに基づいてSAO処理を施す。なお、モード判定部340から、SAO処理を適用しない旨が指示された場合には、フィルタ処理部390は、対象となるCTUに対してSAO処理を施さない。また、切り替え判定部360の判定結果に基づき、SAO処理を適用しないと判定されたスライスについても同様に、フィルタ処理部390は、当該判定結果に基づき対応するスライスに対してSAO処理を施さないことは言うまでもない。 The filter processing unit 390 performs SAO processing on each CTU of the decoded image data based on the SAO mode and the offset value supplied from the mode determination unit 340. When the mode determination unit 340 instructs that the SAO processing is not applied, the filter processing unit 390 does not perform the SAO processing on the target CTU. Similarly, for a slice that is determined not to be subjected to SAO processing based on the determination result of the switching determination unit 360, the filter processing unit 390 should not perform SAO processing on the corresponding slice based on the determination result. Needless to say.
 そして、フィルタ処理部390は、SAO処理が施された復号画像データを、適応ループフィルタ400(図4参照)に出力する。 Then, the filter processing unit 390 outputs the decoded image data subjected to the SAO process to the adaptive loop filter 400 (see FIG. 4).
  <2-4-2.サンプル適応オフセットフィルタの処理の流れ>
 次に、図8を参照して、本実施形態に係るサンプル適応オフセットフィルタの一連の処理の流れの一例について説明する。図8は、本実施形態に係るサンプル適応オフセットフィルタの一連の処理の流れの一例を示したフローチャートである。
<2-4-2. Sample adaptive offset filter processing flow>
Next, an example of a flow of a series of processes of the sample adaptive offset filter according to the present embodiment will be described with reference to FIG. FIG. 8 is a flowchart illustrating an example of a flow of a series of processes of the sample adaptive offset filter according to the present embodiment.
 (ステップS100)
 まず、切り替え判定部360は、復号画像データのスライスごとに、輝度と色度とのそれぞれについてSAO処理の適用の可否を判定し、判定結果に基づき解析部320の動作を制御する。なお、切り替え判定部360による、SAO処理の適用の可否の判定に係る動作については、詳細を別途後述する。
(Step S100)
First, the switching determination unit 360 determines whether or not the SAO process can be applied to each of the luminance and chromaticity for each slice of the decoded image data, and controls the operation of the analysis unit 320 based on the determination result. The operation related to the determination of whether or not the SAO process can be applied by the switching determination unit 360 will be described later in detail.
 (ステップS500)
 スライスに対してSAO処理が適用されると判定された場合には(ステップS200、YES)、解析部320は、原画像データと(デブロックフィルタ処理後の)復号画像データとに基づき、SAO処理を施すためのSAOのモードとオフセット値とをCTUごとに決定する。
(Step S500)
When it is determined that the SAO process is applied to the slice (step S200, YES), the analysis unit 320 performs the SAO process based on the original image data and the decoded image data (after the deblocking filter process). The SAO mode and the offset value for performing the above are determined for each CTU.
 具体的には、統計量取得部330は、原画像データと復号画像データとに基づきSAOのモードとオフセットとを特定するための統計量を算出し、算出した統計量を、モード判定部340に出力する。 Specifically, the statistic acquisition unit 330 calculates a statistic for specifying the SAO mode and offset based on the original image data and the decoded image data, and sends the calculated statistic to the mode determination unit 340. Output.
 モード判定部340は、統計量取得部330から供給される統計量に基づき、復号画像データ中のCTU単位でSAOの各モードについて、オフセット値として取り得る値のそれぞれにおけるコストをオフセット判定部350に算出させる。 Based on the statistic supplied from the statistic acquisition unit 330, the mode determination unit 340 provides the offset determination unit 350 with the cost of each value that can be taken as an offset value for each mode of SAO in the decoded image data. Let it be calculated.
 モード判定部340は、SAOの各モードについて算出された、各コストを比較し、当該比較結果に基づき、符号化効率を最も向上させることが可能なSAOのモードをCTUごと(即ち、LCUごと)に特定する。そして、モード判定部340は、CTUごとに特定したモードと、当該モードに対応するオフセット値とを、後述するフィルタ処理部390に出力する。また、モード判定部340は、CTUごとに特定したSAOのモードとオフセット値とを、符号化時のパラメタとして可逆符号化部16に出力する。 The mode determination unit 340 compares the costs calculated for each mode of SAO, and selects the SAO mode that can improve the coding efficiency most based on the comparison result for each CTU (ie, for each LCU). To be specific. And the mode determination part 340 outputs the mode specified for every CTU and the offset value corresponding to the said mode to the filter process part 390 mentioned later. Also, the mode determination unit 340 outputs the SAO mode and offset value specified for each CTU to the lossless encoding unit 16 as encoding parameters.
 (ステップS600)
 フィルタ処理部390は、復号画像データの各CTUに対して、モード判定部340から供給されるSAOのモードとオフセット値とに基づいてSAO処理を施す。
(Step S600)
The filter processing unit 390 performs SAO processing on each CTU of the decoded image data based on the SAO mode and the offset value supplied from the mode determination unit 340.
 (ステップS700)
 以上の処理を、対象となるスライス中の一連のCTUについて実行し(ステップS700、NO)、一連のCTUに対する処理の完了をもって(ステップS700、YES)、対象となるスライスに対するSAO処理の適用が完了する。
(Step S700)
The above process is executed for a series of CTUs in the target slice (step S700, NO), and upon completion of the process for the series of CTUs (step S700, YES), the application of the SAO process to the target slice is completed. To do.
 (ステップS200)
 なお、対象となるスライスに対してSAO処理を適用しない場合(ステップS200、NO)には、当該スライスに対して、ステップS300~S700で示された各処理は実行されない。
(Step S200)
When the SAO process is not applied to the target slice (step S200, NO), the processes shown in steps S300 to S700 are not executed for the slice.
 次に、図9を参照して、図8においてステップS100で示された処理、即ち、切り替え判定部360による、スライスごとのSAO処理の適用の可否の判定に係る処理の一例について説明する。図9は、本実施形態に係る切り替え判定部による、スライスごとのSAO処理の適用の可否の判定に係る処理の一例について示したフローチャートである。 Next, with reference to FIG. 9, an example of the process shown in step S <b> 100 in FIG. 8, that is, a process related to determination of whether or not to apply the SAO process for each slice by the switching determination unit 360 will be described. FIG. 9 is a flowchart illustrating an example of processing related to determination of whether or not to apply SAO processing for each slice by the switching determination unit according to the present embodiment.
 (ステップS101、S104)
 切り替え判定部360は、処理対象のスライスが、Bスライスではない場合、即ち、Iスライス及びPスライスのいずれかの場合には(ステップS101、NO)、当該スライスに対するSAO処理の適用を解析部320に指示する(ステップS104)。
(Steps S101 and S104)
If the slice to be processed is not a B slice, that is, if it is either an I slice or a P slice (step S101, NO), the switching determination unit 360 analyzes the application of the SAO process to the slice. (Step S104).
 (ステップS101、S102)
 また、切り替え判定部360は、処理対象のスライスがBスライスの場合には(ステップS101、YES)、当該Bスライスの直前のスライス(即ち、IスライスまたはPスライス)において、SAO処理が適用されたCTUの数(モード数)を取得する(ステップS102)。
(Steps S101 and S102)
In addition, when the slice to be processed is a B slice (YES in step S101), the switching determination unit 360 applies the SAO process to the slice immediately before the B slice (that is, the I slice or the P slice). The number of CTUs (number of modes) is acquired (step S102).
 (ステップS103、S104)
 切り替え判定部360は、取得したモード数が、所定の閾値TH11以上の場合には(ステップS103、NO)、当該スライスに対するSAO処理の適用を解析部320に指示する(ステップS104)。
(Steps S103 and S104)
If the acquired mode number is equal to or greater than the predetermined threshold TH11 (step S103, NO), the switching determination unit 360 instructs the analysis unit 320 to apply the SAO process to the slice (step S104).
 (ステップS103、S105)
 一方で、切り替え判定部360は、取得したモード数が、所定の閾値TH11未満の場合には(ステップS103、YES)、当該スライスに対するSAO処理の適用を制限する(即ち、非適用とする)ように解析部320に指示する(ステップS105)。
(Steps S103 and S105)
On the other hand, when the acquired mode number is less than the predetermined threshold value TH11 (step S103, YES), the switching determination unit 360 restricts the application of the SAO process to the slice (that is, does not apply). To the analysis unit 320 (step S105).
 以上のようにして、切り替え判定部360は、スライスごとにSAO処理の適用の可否を判定し、判定結果に基づき解析部320の動作を制御する。 As described above, the switching determination unit 360 determines whether the SAO process can be applied for each slice, and controls the operation of the analysis unit 320 based on the determination result.
 以上、図8及び図9を参照して、本実施形態に係るサンプル適応オフセットフィルタ300の一連の処理の流れの一例について説明した。 Heretofore, an example of a series of processing flows of the sample adaptive offset filter 300 according to the present embodiment has been described with reference to FIGS. 8 and 9.
  <2-5.オフセット判定部>
 次に、オフセット判定部350の詳細について説明する。オフセット判定部350は、統計量取得部330で生成された統計量に基づき、オフセット値として取り得る値それぞれについてコストを算出し、算出した各コストを比較することで、符号化効率を最も向上させることが可能なオフセット値を特定する。
<2-5. Offset judgment unit>
Next, details of the offset determination unit 350 will be described. The offset determination unit 350 calculates the cost for each possible value as an offset value based on the statistic generated by the statistic acquisition unit 330, and compares the calculated costs to improve the coding efficiency most. Identify possible offset values.
 なお、前述したように、H.265/HEVCでは、画素のビット深度として、8ビット(画素値が0~255)と10ビット(画素値が0~1023)とを利用でき、各ビット深度に応じて、適用可能なオフセット値の候補が異なる。具体的には、ビット深度が8ビットの場合には、オフセット値のとり得る値は0~7となり、ビット深度が10ビットの場合には、オフセット値のとり得る値は0~31となる。 As mentioned above, H. In H.265 / HEVC, 8 bit (pixel value is 0 to 255) and 10 bit (pixel value is 0 to 1023) can be used as the bit depth of the pixel, and an applicable offset value can be determined according to each bit depth. Candidates are different. Specifically, when the bit depth is 8 bits, the offset value can be 0 to 7, and when the bit depth is 10 bits, the offset value can be 0 to 31.
 そのため、従来の方式では、画素のビット深度が10ビットの場合には、ビット深度が8ビットの場合に比べてオフセット値の候補数が4倍となるため、コスト計算の処理量が増加し、回路規模や消費電力の増加の要因となる場合がある。そこで、本説明では、本実施形態に係るオフセット判定部350の特徴をわかりやすくするために、まず、従来の方式に基づくオフセット判定部の概要について比較例として説明したうえで、本実施形態に係るオフセット判定部350について説明する。 Therefore, in the conventional method, when the bit depth of the pixel is 10 bits, the number of offset value candidates is four times that in the case where the bit depth is 8 bits, so the amount of processing for cost calculation increases, It may cause an increase in circuit scale and power consumption. Therefore, in this description, in order to make the characteristics of the offset determination unit 350 according to the present embodiment easier to understand, first, an overview of the offset determination unit based on the conventional method is described as a comparative example, and then, according to the present embodiment. The offset determination unit 350 will be described.
  <2-5-1.オフセット判定部の比較例>
 図10~図12を参照して、比較例に係るオフセット判定部について説明する。なお、以降では、比較例に係るオフセット判定部と、本実施形態に係るオフセット判定部350とを明示的に区別する場合には、比較例に係るオフセット判定部を、「オフセット判定部350a」と記載する場合がある。
<2-5-1. Comparative Example of Offset Determination Unit>
The offset determination unit according to the comparative example will be described with reference to FIGS. Hereinafter, when the offset determination unit according to the comparative example and the offset determination unit 350 according to the present embodiment are explicitly distinguished, the offset determination unit according to the comparative example is referred to as an “offset determination unit 350a”. May be described.
 まず、図10を参照して、比較例に係るオフセット判定部350aの構成の一例について説明する。図10は、比較例に係るオフセット判定部350aの構成の一例を示したブロック図である。 First, an example of the configuration of the offset determination unit 350a according to the comparative example will be described with reference to FIG. FIG. 10 is a block diagram illustrating an example of the configuration of the offset determination unit 350a according to the comparative example.
 図10に示すように、オフセット判定部350aは、1以上のオフセット測定部351と、オフセット決定部353とを含む。 As illustrated in FIG. 10, the offset determination unit 350 a includes one or more offset measurement units 351 and an offset determination unit 353.
 オフセット測定部351は、統計量取得部330で生成された統計量(例えば、処理対象となる画素の出現頻度や、復号画像データと原画像データとの間の画素値の差)を基に、各オフセット値について、当該オフセット値を適用した場合のコストを算出する。なお、このとき算出されるコストとは、例えば、復号画像データに発生した原画像データとの間の誤差(例えば、量子化誤差)を緩和して原画像データに近づけるために、各オフセット値に基づくオフセット処理に要するデータ量(即ち、デコーダ側に送信するデータ量)等が挙げられる。なお、コスト計算の具体的な内容については、本明細書では詳細な説明は省略する。 The offset measurement unit 351 is based on the statistic generated by the statistic acquisition unit 330 (for example, the appearance frequency of the pixel to be processed or the difference in pixel value between the decoded image data and the original image data). For each offset value, the cost when the offset value is applied is calculated. Note that the cost calculated at this time means, for example, each offset value in order to reduce an error (for example, quantization error) between the original image data generated in the decoded image data and bring it closer to the original image data. The amount of data required for the offset processing based on that (that is, the amount of data transmitted to the decoder side) and the like. Detailed description of the cost calculation is omitted in this specification.
 図10に示す例では、ビット深度が10ビットの場合のオフセット値0~31のそれぞれについてコストを並列に計算するために、オフセット測定部351として、Offset[0]測定部~Offset[31]測定部を設けている。 In the example shown in FIG. 10, in order to calculate the cost in parallel for each of the offset values 0 to 31 when the bit depth is 10 bits, as the offset measuring unit 351, the Offset [0] measuring unit to Offset [31] measurement are performed. Is provided.
 例えば、図11の参照符号d40で示されたテーブルは、図10に示した各オフセット測定部351(即ち、Offset[0]測定部~Offset[31]測定部)と、各オフセット値との対応関係を示している。図11に示すように、Offset[0]測定部は、オフセット値が0の場合におけるコストを計算する。同様に、Offset[1]測定部~Offset[31]測定部は、それぞれオフセット値1~31に対応づけられている。 For example, the table indicated by the reference sign d40 in FIG. 11 corresponds to each offset measurement unit 351 shown in FIG. 10 (ie, Offset [0] measurement unit to Offset [31] measurement unit) and each offset value. Showing the relationship. As illustrated in FIG. 11, the Offset [0] measurement unit calculates the cost when the offset value is 0. Similarly, Offset [1] measurement unit to Offset [31] measurement unit are associated with offset values 1 to 31, respectively.
 即ち、図10に示す例では、ビット深度が8ビットの場合には、Offset[0]測定部~Offset[31]測定部のうち、参照符号351aで示された、Offset[0]測定部~Offset[7]測定部が使用される。また、ビット深度が10ビットの場合には、参照符号351bで示された、Offset[0]測定部~Offset[31]測定部の全てが使用されることとなる。 That is, in the example shown in FIG. 10, when the bit depth is 8 bits, the Offset [0] measurement unit indicated by reference numeral 351a among the Offset [0] measurement unit to Offset [31] measurement unit Offset [7] measurement part is used. Further, when the bit depth is 10 bits, all of the Offset [0] measurement unit to the Offset [31] measurement unit indicated by reference numeral 351b are used.
 オフセット決定部353は、各オフセット測定部351が算出したコストを比較し、当該比較結果に基づき、オフセット値の候補の中から、コストが最も低いオフセット値を決定する。そして、オフセット決定部353は、決定したオフセット値と、当該オフセット値に対応するコストとを出力する。この出力を受けて、モード判定部340(図7参照)は、SAOの各モードについて算出された各コストを比較し、当該比較結果に基づき、符号化効率を最も向上させることが可能なSAOのモードと、当該モードに対応するオフセット値とをCTUごと(即ち、LCUごと)に特定する。 The offset determination unit 353 compares the costs calculated by the respective offset measurement units 351, and determines the offset value with the lowest cost from the offset value candidates based on the comparison result. Then, the offset determination unit 353 outputs the determined offset value and the cost corresponding to the offset value. Upon receiving this output, the mode determination unit 340 (see FIG. 7) compares the costs calculated for each mode of the SAO, and based on the comparison result, the SAO that can improve the coding efficiency most. The mode and the offset value corresponding to the mode are specified for each CTU (that is, for each LCU).
 次に、図12を参照して、比較例に係るオフセット判定部350aの一連の処理の流れの一例について説明する。図12は、比較例に係るオフセット判定部350aの一連の処理の流れの一例を示したフローチャートである。 Next, an example of a flow of a series of processes performed by the offset determination unit 350a according to the comparative example will be described with reference to FIG. FIG. 12 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350a according to the comparative example.
 (ステップS611~S614)
 まず、オフセット判定部350aは、カウンタ値であるCountを0で初期化する(ステップS611)。そして、カウンタ値Countが示すオフセット値の候補についてコストを算出する。例えば、カウンタ値Countが0の場合には、オフセット判定部350aは、オフセット値「0」のコストを算出する。このとき、図10に示す例の場合には、各オフセット測定部351のうち、Offset[0]測定部がオフセット値「0」のコストを算出することとなる。同様に、カウンタ値Countが1の場合には、オフセット判定部350aは、オフセット値「1」のコストを算出する(ステップS613)。コストの算出が完了すると、オフセット判定部350aは、カウンタ値Countをインクリメントする(ステップS614)。
(Steps S611 to S614)
First, the offset determination unit 350a initializes Count, which is a counter value, with 0 (step S611). Then, the cost is calculated for the offset value candidate indicated by the counter value Count. For example, when the counter value Count is 0, the offset determination unit 350a calculates the cost of the offset value “0”. At this time, in the case of the example shown in FIG. 10, the Offset [0] measurement unit among the offset measurement units 351 calculates the cost of the offset value “0”. Similarly, when the counter value Count is 1, the offset determination unit 350a calculates the cost of the offset value “1” (step S613). When the calculation of the cost is completed, the offset determination unit 350a increments the counter value Count (step S614).
 以上のようにして、オフセット判定部350aは、画素のビット深度に応じて、各オフセット値におけるコストを算出する(ステップS612、NO)。例えば、ビット深度が8ビットの場合には、オフセット判定部350aは、オフセット値「0」~「7」のそれぞれについてコストを算出する。また、ビット深度が10ビットの場合には、オフセット判定部350aは、オフセット値「0」~「31」のそれぞれについてコストを算出する。 As described above, the offset determination unit 350a calculates the cost at each offset value according to the bit depth of the pixel (step S612, NO). For example, when the bit depth is 8 bits, the offset determination unit 350a calculates the cost for each of the offset values “0” to “7”. When the bit depth is 10 bits, the offset determination unit 350a calculates the cost for each of the offset values “0” to “31”.
 (ステップS615)
 ビット深度に応じて各カウンタ値のコストの算出が完了すると(ステップS612、YES)、オフセット判定部350aは、算出した各オフセット値のコストを比較し、当該比較結果に基づき、コストが最も低いオフセット値を決定する。
(Step S615)
When the calculation of the cost of each counter value is completed according to the bit depth (step S612, YES), the offset determination unit 350a compares the cost of each calculated offset value, and based on the comparison result, the offset with the lowest cost Determine the value.
 以上、図10~図12を参照して説明したように、画素のビット深度が8ビットの場合は、オフセット値のとり得る値は0~7となり、オフセット判定部350aは、オフセット値0~7のそれぞれについて計8回のコスト計算を行うことになる。また、ビット深度が10ビットの場合には、オフセット値のとり得る値は0~31となるため、オフセット判定部350aは、オフセット値0~31のそれぞれについて計32回のコスト計算を行うこととなる。 As described above with reference to FIGS. 10 to 12, when the bit depth of the pixel is 8 bits, possible values of the offset value are 0 to 7, and the offset determination unit 350a uses the offset values 0 to 7 For each of these, a total of eight cost calculations are performed. In addition, when the bit depth is 10 bits, the offset value can be 0 to 31, so that the offset determination unit 350a performs the cost calculation a total of 32 times for each of the offset values 0 to 31. Become.
 即ち、画素のビット深度が10ビットの場合には、ビット深度が8ビットの場合に比べてオフセット値の候補数が4倍となるため、コスト計算の処理量についても、ビット深度が8ビットの場合の4倍の処理量となる。そのため、ビット深度が10ビットの画像を処理対象とする場合には、図12に基づき説明したように、オフセット値それぞれのコスト計算の回数(処理量)が、ビット深度が8ビットの場合に比べて4倍となり、消費電力の増加の要因となり得る。 That is, when the bit depth of the pixel is 10 bits, the number of offset value candidates is four times that of the case where the bit depth is 8 bits. The amount of processing is four times that of the case. Therefore, when processing an image with a bit depth of 10 bits, as described with reference to FIG. 12, the number of cost calculations (processing amount) for each offset value is smaller than when the bit depth is 8 bits. 4 times, which may increase power consumption.
 また、ビット深度が10ビットの画像を処理対象とする場合には、図10に示すように、ビット深度が8ビットの場合に比べて、4倍の数のオフセット測定部351(即ち、Offset[0]測定部~Offset[31]測定部)が必要となり、回路規模が増加する場合が少なからずある。また、ビット深度が10ビットの画像を処理対象となる場合に、追加で必要となる、オフセット値8~31のコストを計算するための回路、即ち、Offset[8]測定部~Offset[31]測定部については、画素のビット深度が8ビットの場合には使用されない。換言すると、画素のビット深度が8ビットの画像を処理対象とする限りは、Offset[8]測定部~Offset[31]測定部は冗長な構成となり得る。 Also, when processing an image having a bit depth of 10 bits, as shown in FIG. 10, the number of offset measurement units 351 (that is, Offset [ 0] measuring unit to Offset [31] measuring unit) are required, and the circuit scale is often increased. In addition, when processing an image having a bit depth of 10 bits, a circuit for calculating the cost of offset values 8 to 31 that is additionally required, that is, Offset [8] measurement unit to Offset [31] The measurement unit is not used when the pixel bit depth is 8 bits. In other words, as long as an image with a pixel bit depth of 8 bits is processed, the Offset [8] measurement unit to the Offset [31] measurement unit can have a redundant configuration.
 そこで、本実施形態に係るオフセット判定部350は、ビット深度が10ビットの場合に、オフセット値として取り得る値(即ち、0~31)の中から当該オフセット値の候補を制限し、制限された候補の中から適用するオフセット値を特定する。このような構成により、本実施形態に係るオフセット判定部350は、オフセット値それぞれのコスト計算のための処理量を、ビット深度が8ビットの場合と10ビットの場合とで共通化して、回路規模や消費電力を低減する。そこで、以下に、本実施形態に係るオフセット判定部350の詳細について説明する。 Therefore, when the bit depth is 10 bits, the offset determination unit 350 according to the present embodiment limits the offset value candidates from the values that can be taken as offset values (that is, 0 to 31). The offset value to be applied is specified from the candidates. With such a configuration, the offset determination unit 350 according to the present embodiment shares the processing amount for cost calculation of each offset value between the case where the bit depth is 8 bits and the case where the bit depth is 10 bits. And reduce power consumption. Therefore, details of the offset determination unit 350 according to the present embodiment will be described below.
  <2-5-2.オフセット判定部の構成例>
 まず、図13を参照して、本実施形態に係るオフセット判定部350の構成の一例について説明する。図13は、第1の実施形態に係るオフセット判定部350の構成の一例について示したブロック図である。
<2-5-2. Configuration Example of Offset Determination Unit>
First, an example of the configuration of the offset determination unit 350 according to the present embodiment will be described with reference to FIG. FIG. 13 is a block diagram illustrating an example of the configuration of the offset determination unit 350 according to the first embodiment.
 図13に示すように、本実施形態に係るオフセット判定部350は、候補制御部355を備え、オフセット測定部351として、Offset[0]測定部~Offset[7]測定部のみを備える点で、図10に示した比較例に係るオフセット判定部350aと異なる。そこで、本説明では、本実施形態に係るオフセット判定部350の各構成について、主に、オフセット判定部350aと異なる部分に着目して説明する。 As shown in FIG. 13, the offset determination unit 350 according to the present embodiment includes a candidate control unit 355, and includes only an Offset [0] measurement unit to an Offset [7] measurement unit as the offset measurement unit 351. Different from the offset determination unit 350a according to the comparative example shown in FIG. Therefore, in this description, each configuration of the offset determination unit 350 according to the present embodiment will be described mainly by focusing on a different part from the offset determination unit 350a.
 候補制御部355は、画素のビット深度と、復号画像データの復号元である量子化データを生成する際の量子化ステップ(QP)とに基づき、オフセット値の候補を決定し、決定した各候補それぞれを、Offset[0]測定部~Offset[7]測定部に割り当てる。なお、当該量子化ステップの取得元については、前述した通り特に限定はされない。具体的な一例として、候補制御部355は、量子化部15が、復号画像データの復号元である量子化データを生成する際に適用した量子化ステップを、当該量子化部15から取得してもよい。 The candidate control unit 355 determines offset value candidates based on the bit depth of the pixels and the quantization step (QP) when generating the quantized data that is the decoding source of the decoded image data, and each of the determined candidates Each is assigned to the Offset [0] measurement unit to the Offset [7] measurement unit. Note that the acquisition source of the quantization step is not particularly limited as described above. As a specific example, the candidate control unit 355 acquires, from the quantization unit 15, the quantization step applied when the quantization unit 15 generates the quantization data that is the decoding source of the decoded image data. Also good.
 ここで、量子化ステップと、SAO処理のために適用されるオフセット値との関係の傾向について説明する。一般的には、変換係数データ(直交化後の予測誤差データ)を量子化することで量子化データを生成する場合には、量子化ステップが小さいほど、原画像データと復号画像データとの差が小さくなる傾向にある(即ち、量子化誤差が小さくなる傾向にある)。そのため、量子化ステップが小さい場合には、SAO処理のために適用するオフセット値として、比較的小さい値が選択される場合が多い。 Here, the tendency of the relationship between the quantization step and the offset value applied for the SAO processing will be described. Generally, when quantized data is generated by quantizing transform coefficient data (prediction error data after orthogonalization), the smaller the quantization step, the difference between the original image data and the decoded image data. Tends to be small (that is, the quantization error tends to be small). Therefore, when the quantization step is small, a relatively small value is often selected as the offset value applied for the SAO processing.
 また、画像中の画素値の変化する場合(例えば、テクスチャがより細かい画像の場合)には、より大きい量子化ステップが選択される傾向にある。また、量子化ステップが大きいほど、原画像データと復号画像データとの差が大きくなる傾向にある(即ち、量子化誤差が大きくなる傾向にある)。このように量子化誤差が大きい場合には、オフセット値の各候補についてコストを計算しても、近傍に位置する候補間では、算出されるコストの差が大きく変化しない場合が少なからずある。 Also, when the pixel value in the image changes (for example, when the texture is finer), a larger quantization step tends to be selected. Also, the larger the quantization step, the greater the difference between the original image data and the decoded image data (that is, the quantization error tends to increase). When the quantization error is large in this way, even if the cost is calculated for each offset value candidate, the difference in the calculated cost does not change significantly between the candidates located in the vicinity.
 以上のような特性を利用して、候補制御部355は、画素のビット深度が10ビットの場合に、オフセット値として取り得る値(即ち、0~31)の中から当該オフセット値の候補を、量子化ステップに基づき制限する。そして、候補制御部355は、制限されたオフセット値の各候補それぞれを、Offset[0]測定部~Offset[7]測定部に割り当てる。 Using the above characteristics, the candidate control unit 355 selects the offset value candidate from the values that can be taken as the offset value (that is, 0 to 31) when the bit depth of the pixel is 10 bits. Limit based on quantization step. Then, the candidate control unit 355 assigns each of the limited offset value candidates to the Offset [0] measurement unit to the Offset [7] measurement unit.
 ここで、図14~図16を参照して、オフセット値の各候補と、Offset[0]測定部~Offset[7]測定部との対応関係の一例について説明する。図14~図16は、オフセット値の各候補と、Offset[0]測定部~Offset[7]測定部との対応関係を示した制御テーブルの一例について説明するための説明図である。なお、図14~図16において、定数N(Nは、0≦Nの整数)は、オフセット値の候補の数(換言すると、オフセット測定部351の数)に応じて決まる値であり、N+1がオフセット値の候補の数に相当する。 Here, an example of the correspondence between each offset value candidate and the Offset [0] measurement unit to Offset [7] measurement unit will be described with reference to FIGS. FIG. 14 to FIG. 16 are explanatory diagrams for explaining an example of a control table showing the correspondence between each offset value candidate and the Offset [0] measurement unit to Offset [7] measurement unit. 14 to 16, a constant N (N is an integer of 0 ≦ N) is a value determined according to the number of offset value candidates (in other words, the number of offset measuring units 351), and N + 1 is This corresponds to the number of offset value candidates.
 例えば、図14に示す制御テーブルd51は、画素のビット深度が8ビットの場合と、画素のビット深度が10ビットであり、かつ、量子化ステップが第1の閾値TH21未満(QP<TH21)の場合とのいずれかの場合に対応している。 For example, in the control table d51 shown in FIG. 14, the pixel bit depth is 8 bits, the pixel bit depth is 10 bits, and the quantization step is less than the first threshold TH21 (QP <TH21). Corresponding to either case.
 図14に示す制御テーブルd51では、Offset[0]測定部~Offset[N]測定部に対して、オフセット値の候補として0~Nを対応付けている。即ち、候補制御部355は、制御テーブルd51に基づき各オフセット測定部351にオフセット値の候補を割り当てる場合には、Offset[i]測定部(iは、0≦i≦Nの整数)には、オフセット値としてiを割り当ることとなる。例えば、N=7の場合には、図13に示すように、Offset[0]測定部、Offset[1]測定部、…、Offset[7]測定部に対して、オフセット値の候補として0、1、…、7が割り当てられることとなる。 In the control table d51 shown in FIG. 14, Offset [0] measurement unit to Offset [N] measurement unit are associated with 0 to N as offset value candidates. That is, when the candidate control unit 355 assigns an offset value candidate to each offset measurement unit 351 based on the control table d51, the Offset [i] measurement unit (i is an integer of 0 ≦ i ≦ N) I is assigned as an offset value. For example, when N = 7, as shown in FIG. 13, the offset [0] measurement unit, the Offset [1] measurement unit,... 1,..., 7 are assigned.
 次に、図15に示す制御テーブルd52について説明する。制御テーブルd52は、画素のビット深度が10ビットであり、かつ、量子化ステップが第1の閾値TH21より大きく第2の閾値TH22以下(TH21<QP≦TH22)の場合に対応している。なお、第2の閾値TH22は、第1の閾値TH21よりも大きい値であることは言うまでもない。 Next, the control table d52 shown in FIG. 15 will be described. The control table d52 corresponds to the case where the bit depth of the pixel is 10 bits and the quantization step is greater than the first threshold TH21 and less than or equal to the second threshold TH22 (TH21 <QP ≦ TH22). Needless to say, the second threshold value TH22 is larger than the first threshold value TH21.
 図15に示す制御テーブルd52では、Offset[0]測定部~Offset[N]測定部に対して、オフセット値の候補として0~2×Nを対応付けている。即ち、候補制御部355は、制御テーブルd52に基づき各オフセット測定部351にオフセット値の候補を割り当てる場合には、Offset[i]測定部(iは、0≦i≦Nの整数)には、オフセット値として2×iを割り当ることとなる。例えば、N=7の場合には、図15に示すように、Offset[0]測定部、Offset[1]測定部、…、Offset[7]測定部に対して、オフセット値の候補として0、2、…、14が割り当てられることとなる。 In the control table d52 shown in FIG. 15, 0 to 2 × N are associated with Offset [0] measurement unit to Offset [N] measurement unit as offset value candidates. That is, when the candidate control unit 355 assigns an offset value candidate to each offset measurement unit 351 based on the control table d52, the Offset [i] measurement unit (i is an integer of 0 ≦ i ≦ N) 2 × i is assigned as the offset value. For example, in the case of N = 7, as shown in FIG. 15, the offset [0] measurement unit, the Offset [1] measurement unit,... 2,..., 14 are assigned.
 次に、図16に示す制御テーブルd53について説明する。制御テーブルd53は、画素のビット深度が10ビットであり、かつ、量子化ステップが第2の閾値TH22より大きい場合(TH22<QP)に対応している。 Next, the control table d53 shown in FIG. 16 will be described. The control table d53 corresponds to the case where the bit depth of the pixel is 10 bits and the quantization step is larger than the second threshold value TH22 (TH22 <QP).
 図14に示す制御テーブルd53では、Offset[0]測定部~Offset[N]測定部に対して、オフセット値の候補として0~4×Nを対応付けている。即ち、候補制御部355は、制御テーブルd52に基づき各オフセット測定部351にオフセット値の候補を割り当てる場合には、Offset[i]測定部(iは、0≦i≦Nの整数)には、オフセット値として4×iを割り当ることとなる。例えば、N=7の場合には、図16に示すように、Offset[0]測定部、Offset[1]測定部、…、Offset[7]測定部に対して、オフセット値の候補として0、4、…、28が割り当てられることとなる。 In the control table d53 shown in FIG. 14, 0 to 4 × N are associated with Offset [0] measurement unit to Offset [N] measurement unit as offset value candidates. That is, when the candidate control unit 355 assigns an offset value candidate to each offset measurement unit 351 based on the control table d52, the Offset [i] measurement unit (i is an integer of 0 ≦ i ≦ N) 4 × i is assigned as an offset value. For example, when N = 7, as shown in FIG. 16, the offset [0] measurement unit, the Offset [1] measurement unit,... 4,..., 28 are assigned.
 このように、候補制御部355は、画素のビット深度と取得した量子化ステップとに基づき、制御テーブルd51~d53のいずれかを選択し、選択した制御テーブルに応じて、Offset[0]測定部~Offset[7]測定部それぞれに対してオフセット値の候補を割り当てる。 In this way, the candidate control unit 355 selects any one of the control tables d51 to d53 based on the bit depth of the pixel and the acquired quantization step, and the Offset [0] measurement unit according to the selected control table. ~ Offset [7] Offset value candidates are assigned to each measurement unit.
 具体的には、候補制御部355は、画素のビット深度が10ビットの場合には、量子化ステップが小さいほど、オフセット値の候補の最大値がより小さくなるように設定し、隣接する候補間の間隔(即ち、隣接する候補間の差分)がより小さくなるように設定する。また、候補制御部355は、画素のビット深度が10ビットの場合には、量子化ステップが大きいほど、オフセット値の候補の最大値がより大きくなるように設定し、隣接する候補間の間隔(即ち、隣接する候補間の差分)がより大きくなるように設定する。以上のような構成により、候補制御部355は、画素のビット深度が10ビットの場合におけるオフセット値の候補数を、8ビットの場合におけるオフセット値の候補数(換言すると、8ビットの場合にオフセット値がとり得る値の範囲)に制限することが可能となる。 Specifically, when the bit depth of the pixel is 10 bits, the candidate control unit 355 sets the offset value candidate so that the maximum value of the offset value is smaller as the quantization step is smaller. Is set to be smaller (ie, the difference between adjacent candidates). In addition, when the bit depth of the pixel is 10 bits, the candidate control unit 355 sets the maximum offset value candidate to be larger as the quantization step is larger, and the interval between adjacent candidates ( That is, it is set so that the difference between adjacent candidates) becomes larger. With the configuration as described above, the candidate control unit 355 determines the number of offset value candidates when the pixel bit depth is 10 bits as the number of offset value candidates when the pixel bit depth is 8 bits (in other words, the offset value in the case of 8 bits). Range of possible values).
 なお、第1の閾値TH21及び第2の閾値TH22の値については、画像符号化装置の構成や各種パラメタ(例えば、原画像データの解像度等)に応じて、あらかじめ実験を行うことで事前に決定すればよい。また、上記に説明した構成はあくまで一例であり、オフセット測定部351の数や、オフセット値の候補を特定するための制御テーブルの数は、適宜変更してもよい。もちろん、オフセット測定部351の数や、制御テーブルの数を変更する場合には、各制御テーブルで設定されるオフセット値の候補や、各制御テーブルを切り替えるための閾値には、事前の実験等に基づき決定した適切な値を、あらかじめ設定しておけばよい。 Note that the values of the first threshold value TH21 and the second threshold value TH22 are determined in advance by performing an experiment in advance according to the configuration of the image encoding device and various parameters (for example, the resolution of the original image data). do it. The configuration described above is merely an example, and the number of offset measurement units 351 and the number of control tables for specifying offset value candidates may be changed as appropriate. Of course, when changing the number of offset measuring units 351 and the number of control tables, the candidates for offset values set in each control table and the threshold value for switching each control table are determined in advance experiments or the like. An appropriate value determined based on this may be set in advance.
 なお、以降の処理については、前述した比較例に係るオフセット判定部350aと同様である。即ち、各オフセット測定部351(即ち、Offset[0]測定部~Offset[7]測定部の)は、割り当てられたオフセット値の候補についてコストを算出して、オフセット決定部353に出力する。 The subsequent processing is the same as that of the offset determination unit 350a according to the comparative example described above. That is, each offset measurement unit 351 (that is, the Offset [0] measurement unit to the Offset [7] measurement unit) calculates a cost for the assigned offset value candidate and outputs the cost to the offset determination unit 353.
 オフセット決定部353は、各オフセット測定部351が算出したコストを比較し、当該比較結果に基づき、オフセット値の候補の中から、コストが最も低いオフセット値を決定する。そして、オフセット決定部353は、決定したオフセット値と、当該オフセット値に対応するコストとを出力する。この出力を受けて、モード判定部340(図7参照)は、SAOの各モードについて算出された各コストを比較し、当該比較結果に基づき、符号化効率を最も向上させることが可能なSAOのモードと、当該モードに対応するオフセット値とをCTUごと(即ち、LCUごと)に特定する。 The offset determination unit 353 compares the costs calculated by the respective offset measurement units 351, and determines the offset value with the lowest cost from the offset value candidates based on the comparison result. Then, the offset determination unit 353 outputs the determined offset value and the cost corresponding to the offset value. Upon receiving this output, the mode determination unit 340 (see FIG. 7) compares the costs calculated for each mode of the SAO, and based on the comparison result, the SAO that can improve the coding efficiency most. The mode and the offset value corresponding to the mode are specified for each CTU (that is, for each LCU).
 以上、図13~図16を参照して、本実施形態に係るオフセット判定部350の構成の一例について説明した。上記に示した構成により、本実施形態に係るオフセット判定部350は、画素のビット深度が10ビットの場合におけるコスト計算の処理量を、8ビットの場合と同等の処理量に制限することが可能となる。そのため、本実施形態に係るオフセット判定部350は、ビット深度が10ビットの場合においても、オフセット測定部351として8ビットの場合と同様の構成(即ち、Offset[0]測定部~Offset[7]測定部)を用いて、オフセット値を決定することが可能となる。即ち、本実施形態に係るオフセット判定部350に依れば、比較例に係るオフセット判定部350aに比べて回路規模を縮小することが可能となる。また、本実施形態に係るオフセット判定部350は、コスト計算の処理量の低減に伴い、比較例に係るオフセット判定部350aに比べて消費電力を低減することが可能となる。 The example of the configuration of the offset determination unit 350 according to the present embodiment has been described above with reference to FIGS. With the configuration described above, the offset determination unit 350 according to the present embodiment can limit the processing amount of the cost calculation when the bit depth of the pixel is 10 bits to the processing amount equivalent to the case of 8 bits. It becomes. Therefore, even when the bit depth is 10 bits, the offset determination unit 350 according to the present embodiment has the same configuration as that of the 8-bit offset measurement unit 351 (that is, Offset [0] measurement unit to Offset [7] The offset value can be determined using the measurement unit. That is, according to the offset determination unit 350 according to the present embodiment, the circuit scale can be reduced as compared with the offset determination unit 350a according to the comparative example. In addition, the offset determination unit 350 according to the present embodiment can reduce power consumption as compared with the offset determination unit 350a according to the comparative example as the processing amount of the cost calculation is reduced.
 なお、図13を参照しながら上記に説明したオフセット判定部350の構成はあくまで一例であり、必ずしも、図10に示す構成に限定するものではない。例えば、本実施形態に係るオフセット判定部350に、オフセット測定部351としてOffset[0]測定部~Offset[31]測定部を設け、一部のみを使用するモードと、全てを使用するモードとを切り替えられるように、当該オフセット判定部350を構成してもよい。 The configuration of the offset determination unit 350 described above with reference to FIG. 13 is merely an example, and is not necessarily limited to the configuration illustrated in FIG. For example, the offset determination unit 350 according to the present embodiment is provided with Offset [0] measurement unit to Offset [31] measurement unit as the offset measurement unit 351, and a mode in which only part is used and a mode in which all are used. The offset determination unit 350 may be configured to be switched.
 例えば、バッテリー駆動時のように消費電力を制限する必要がある場合には、オフセット測定部351として、前述したように、Offset[0]測定部~Offset[7]測定部のみを使用してもよい。また、電源駆動時のように処理量をより向上させることが可能な場合には、オフセット測定部351として、Offset[0]測定部~Offset[31]測定部の全てを使用し、前述した比較例に係るオフセット判定部350aと同様に動作してもよい。このように、本実施形態に係るオフセット測定部351は、画像符号化装置が動作する状況等のように、所定の条件に応じて、一部のオフセット測定部351のみを使用するモードに切り替えることで、コスト計算の処理量の低減できるように構成してもよい。 For example, when it is necessary to limit power consumption as in battery driving, as described above, only the Offset [0] measurement unit to the Offset [7] measurement unit may be used as the offset measurement unit 351. Good. Further, when the processing amount can be further improved as in the case of power supply driving, all of the Offset [0] measurement unit to the Offset [31] measurement unit are used as the offset measurement unit 351, and the comparison described above. The offset determination unit 350a according to the example may operate similarly. As described above, the offset measurement unit 351 according to the present embodiment switches to a mode in which only a part of the offset measurement units 351 is used according to a predetermined condition, such as a situation in which the image coding apparatus operates. Thus, the configuration may be such that the processing amount of the cost calculation can be reduced.
  <2-5-3.オフセット判定部の処理の流れ>
 次に、図17を参照して、本実施形態に係るオフセット判定部350の一連の処理の流れの一例について説明する。図17は、本実施形態に係るオフセット判定部350の一連の処理の流れの一例を示したフローチャートである。なお、図17において、定数N(Nは、0≦Nの整数)は、前述したように、オフセット値の候補の数(換言すると、オフセット測定部351の数)に応じて決まる値であり、N+1がオフセット値の候補の数に相当する。
<2-5-3. Process flow of offset determination unit>
Next, an example of a flow of a series of processes of the offset determination unit 350 according to the present embodiment will be described with reference to FIG. FIG. 17 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 according to the present embodiment. In FIG. 17, the constant N (N is an integer of 0 ≦ N) is a value determined according to the number of offset value candidates (in other words, the number of offset measuring units 351), as described above. N + 1 corresponds to the number of offset value candidates.
 (ステップS621)
 まず、オフセット判定部350は、カウンタ値であるCountを0で初期化する(ステップS611)。そして、カウンタ値Countが示すオフセット値の候補についてコストを算出する。このとき、オフセット判定部350は、画素のビット深度と、復号画像データの復号元である量子化データを生成する際の量子化ステップ(QP)とに基づき、オフセット値の候補を制限する。
(Step S621)
First, the offset determination unit 350 initializes Count, which is a counter value, with 0 (step S611). Then, the cost is calculated for the offset value candidate indicated by the counter value Count. At this time, the offset determination unit 350 restricts offset value candidates based on the bit depth of the pixel and the quantization step (QP) when generating the quantized data that is the decoding source of the decoded image data.
 (ステップS623、S624)
 具体的には、画素のビット深度が8ビットの場合と、画素のビット深度が10ビットであり、かつ、量子化ステップが第1の閾値TH21以下(QP≦TH21)の場合とのいずれかの場合には(ステップS623、NO)、オフセット判定部350は、当該条件に対応したテーブル1を選択する。なお、テーブル1の具体的な一例としては、図14に示す制御テーブルd51が挙げられる。
(Steps S623 and S624)
Specifically, one of a case where the bit depth of the pixel is 8 bits and a case where the bit depth of the pixel is 10 bits and the quantization step is equal to or less than the first threshold TH21 (QP ≦ TH21). In such a case (step S623, NO), the offset determination unit 350 selects the table 1 corresponding to the condition. A specific example of the table 1 is a control table d51 shown in FIG.
 そして、オフセット判定部350は、選択されたテーブル1に基づき、カウンタ値Countが示すオフセット値の候補を特定し、特定した候補についてコストを計算する。この場合には、カウンタ値Count=i(iは、0≦i≦Nの整数)の場合には、オフセット値の候補としてiが特定されることとなる。 Then, the offset determination unit 350 specifies offset value candidates indicated by the counter value Count based on the selected table 1, and calculates a cost for the specified candidates. In this case, when the counter value Count = i (i is an integer of 0 ≦ i ≦ N), i is specified as a candidate offset value.
 (ステップS625)
 また、画素のビット深度が10ビットであり、かつ、量子化ステップが第1の閾値TH21より大きい場合には(ステップS624、YES)、オフセット判定部350は、当該量子化ステップが第2の閾値TH22(TH22>TH21)より大きいか否かを判定する。
(Step S625)
Further, when the bit depth of the pixel is 10 bits and the quantization step is larger than the first threshold value TH21 (step S624, YES), the offset determination unit 350 determines that the quantization step is the second threshold value. It is determined whether it is greater than TH22 (TH22> TH21).
 (ステップS626)
 量子化ステップが第2の閾値TH22以下の場合には(ステップS625、NO)、オフセット判定部350は、当該条件に対応したテーブル2を選択する。なお、テーブル2の具体的な一例としては、図15に示す制御テーブルd52が挙げられる。
(Step S626)
When the quantization step is equal to or smaller than the second threshold TH22 (step S625, NO), the offset determination unit 350 selects the table 2 corresponding to the condition. A specific example of the table 2 is a control table d52 shown in FIG.
 そして、オフセット判定部350は、選択されたテーブル2に基づき、カウンタ値Countが示すオフセット値の候補を特定し、特定した候補についてコストを計算する。この場合には、カウンタ値Count=i(iは、0≦i≦Nの整数)の場合には、オフセット値の候補として2×iが特定されることとなる。 Then, the offset determination unit 350 specifies offset value candidates indicated by the counter value Count based on the selected table 2, and calculates a cost for the specified candidates. In this case, when the counter value Count = i (i is an integer of 0 ≦ i ≦ N), 2 × i is specified as a candidate offset value.
 (ステップS627)
 また、量子化ステップが第2の閾値TH22より大きい場合には(ステップS625、YES)、オフセット判定部350は、当該条件に対応したテーブル3を選択する。なお、テーブル3の具体的な一例としては、図16に示す制御テーブルd53が挙げられる。
(Step S627)
When the quantization step is larger than the second threshold TH22 (step S625, YES), the offset determination unit 350 selects the table 3 corresponding to the condition. A specific example of the table 3 is a control table d53 shown in FIG.
 そして、オフセット判定部350は、選択されたテーブル3に基づき、カウンタ値Countが示すオフセット値の候補を特定し、特定した候補についてコストを計算する。この場合には、カウンタ値Count=i(iは、0≦i≦Nの整数)の場合には、オフセット値の候補として4×iが特定されることとなる。 Then, the offset determination unit 350 identifies offset value candidates indicated by the counter value Count based on the selected table 3, and calculates a cost for the identified candidates. In this case, when the counter value Count = i (i is an integer satisfying 0 ≦ i ≦ N), 4 × i is specified as a candidate offset value.
 (ステップS628)
 オフセット判定部350は、カウンタ値Countが示すオフセット値の候補を特定し、特定した候補についてコストの計算が完了すると、カウンタ値Countをインクリメントする
(Step S628)
The offset determination unit 350 identifies an offset value candidate indicated by the counter value Count, and increments the counter value Count when cost calculation is completed for the identified candidate.
 (ステップS622)
 以上のようにして、オフセット判定部350は、カウンタ値Countが所定の定数Nより大きくなるまで、オフセット値の候補を特定し、特定した候補についてコストの計算を行う(ステップS622、NO)。
(Step S622)
As described above, the offset determination unit 350 specifies offset value candidates until the counter value Count exceeds a predetermined constant N, and calculates the cost for the specified candidates (NO in step S622).
 (ステップS629)
 カウンタ値Countが0~Nのそれぞれについて、オフセット値の候補を特定し、特定した候補についてコストの計算が完了すると(ステップS622、YES)、オフセット判定部350は、オフセット値の候補ごとに算出したコストを比較する。そして、オフセット判定部350は、当該比較結果に基づき、コストが最も低い候補をオフセット値として決定する。
(Step S629)
For each of the counter values Count from 0 to N, an offset value candidate is specified, and when cost calculation is completed for the specified candidate (YES in step S622), the offset determination unit 350 calculates each offset value candidate. Compare costs. And the offset determination part 350 determines a candidate with the lowest cost as an offset value based on the said comparison result.
 以上、図17を参照して、本実施形態に係るオフセット判定部350の一連の処理の流れの一例について説明した。 In the foregoing, with reference to FIG. 17, an example of a flow of a series of processes of the offset determination unit 350 according to the present embodiment has been described.
  <2-6.まとめ>
 以上、説明したように、本実施形態に係る画像符号化装置では、オフセット判定部350は、画素のビット深度と、復号画像データの復号元である量子化データを生成する際の量子化ステップ(QP)とに基づき、SAO処理のためのオフセット値の候補を制限する。
<2-6. Summary>
As described above, in the image coding apparatus according to the present embodiment, the offset determination unit 350 generates a bit depth of a pixel and a quantization step when generating quantized data that is a decoding source of the decoded image data ( QP) and limit offset value candidates for SAO processing.
 このような構成により、本実施形態に係るオフセット判定部350は、画素のビット深度が10ビットの場合におけるコスト計算の処理量を、8ビットの場合と同等の処理量に制限することが可能となる。そのため、本実施形態に係るオフセット判定部350に依れば、ビット深度が10ビットの場合においても、オフセット値の各候補のコストを計算する構成として、8ビットの場合と同様の構成を利用して、オフセット値を決定することが可能となる。即ち、本実施形態に係る画像符号化装置に依れば、オフセット判定部350の回路規模を、画素のビット深度が10ビットの場合にとり得るオフセット値それぞれについてコストを計算する場合に比べて縮小することが可能となる。また、本実施形態に係る画像符号化装置は、画素のビット深度が10ビットの場合におけるコスト計算の処理量の低減に伴い、消費電力をより低減することも可能となる。 With such a configuration, the offset determination unit 350 according to the present embodiment can limit the processing amount of the cost calculation when the bit depth of the pixel is 10 bits to a processing amount equivalent to the case of 8 bits. Become. Therefore, according to the offset determination unit 350 according to the present embodiment, even when the bit depth is 10 bits, the same configuration as in the case of 8 bits is used as the configuration for calculating the cost of each candidate offset value. Thus, the offset value can be determined. That is, according to the image coding apparatus according to the present embodiment, the circuit scale of the offset determination unit 350 is reduced as compared with the case where the cost is calculated for each offset value that can be taken when the bit depth of the pixel is 10 bits. It becomes possible. In addition, the image coding apparatus according to the present embodiment can further reduce power consumption as the amount of cost calculation decreases when the bit depth of a pixel is 10 bits.
 なお、上記では、量子化ステップに基づき、オフセット値の候補を制限する例について説明したが、オフセット値の候補を制限するための判定基準は、必ずしも量子化ステップには限定されない。具体的な一例として、オフセット判定部350は、原画像データの特徴量に基づき、オフセット値の候補を制限してもよい。 In the above description, the example of limiting the offset value candidates based on the quantization step has been described. However, the criterion for limiting the offset value candidates is not necessarily limited to the quantization step. As a specific example, the offset determination unit 350 may limit offset value candidates based on the feature amount of the original image data.
 原画像データの特徴量の具体的な一例として、例えば、原画像データ中の画素値の変化量の指標となる分散値が挙げられる。 As a specific example of the feature amount of the original image data, for example, there is a variance value that serves as an index of the amount of change in the pixel value in the original image data.
 例えば、原画像データの分散値が小さい場合には、画素値の変化が小さい場合を示している。分散値が小さい原画像データの具体的な一例として、濃淡の少ない、もしくは、濃淡の変化が緩やかな平坦な画像が挙げられる。このような場合には、ブロック(CTU)間の類似性が高く、原画像データと復号画像データとの差が小さくなる傾向にある。そのため、原画像データの分散値が小さい場合には、オフセット判定部350は、図14に示した制御テーブルd51のように、オフセット値がより小さくなるように、オフセットの候補を制限してもよい。 For example, when the variance value of the original image data is small, the change in the pixel value is small. A specific example of the original image data having a small variance value is a flat image with little shading or a gradual change in shading. In such a case, the similarity between blocks (CTU) is high, and the difference between original image data and decoded image data tends to be small. Therefore, when the variance of the original image data is small, the offset determination unit 350 may limit the offset candidates so that the offset value becomes smaller as in the control table d51 illustrated in FIG. .
 また、原画像データの分散値が大きい場合には、画素値の変化が大きい場合を示している。分散値が大きい原画像データの具体的な一例として、テクスチャのより細かい画像が挙げられる。このような場合には、ブロック(CTU)間の類似性が低く、原画像データと復号画像データとの差が大きくなる傾向にある。そのため、原画像データの分散値が大きい場合には、オフセット判定部350は、図15及び図16に示した制御テーブルd52及びd53のように、オフセット値がより大きくなるように、オフセットの候補を制限してもよい。 In addition, when the variance value of the original image data is large, the case where the change of the pixel value is large is shown. As a specific example of the original image data having a large variance value, an image having a finer texture can be cited. In such a case, the similarity between blocks (CTU) is low, and the difference between original image data and decoded image data tends to be large. Therefore, when the variance value of the original image data is large, the offset determination unit 350 sets the offset candidates so that the offset value becomes larger as in the control tables d52 and d53 shown in FIGS. You may restrict.
 なお、原画像データの特徴量については、例えば、統計量取得部330が、取得した原画像データに基づき特徴量として算出すればよい。 Note that the feature amount of the original image data may be calculated as the feature amount by the statistic acquisition unit 330 based on the acquired original image data, for example.
 以上のように、適用されるオフセット値の傾向に応じてあらかじめ条件を設定し、当該条件に応じてオフセット判定部350がオフセット値の候補を制限できれば、オフセット値の候補を制限するための判定基準は特に限定されない。もちろん、適用されるオフセット値の傾向に応じて条件が設定できれば、原画像データの特徴量として、分散値以外のパラメタを用いてもよいことは言うまでもない。 As described above, if a condition is set in advance according to the tendency of the applied offset value and the offset determination unit 350 can limit the offset value candidates according to the condition, a determination criterion for limiting the offset value candidates Is not particularly limited. Of course, as long as conditions can be set according to the tendency of the applied offset value, it goes without saying that parameters other than the variance value may be used as the feature amount of the original image data.
 <<3.第2の実施形態>>
  <3-1.概要>
 続いて、第2の実施形態に係る画像符号化装置について説明する。前述した第1の実施形態では、主にビット深度が10ビット以下の画像を入力画像として符号化する場合に着目して説明した。一方で、近年では、ビット深度が10ビットを超える画像を入力画像として符号化する場合も想定され、ビット深度の増加に伴い、オフセット値のとり得る値の範囲もより広くなるため、当該オフセット値の候補の数もより多くなる傾向にある。具体的な一例として、ビット深度が12ビットの場合には、オフセット値のとり得る値は0~124となる。
<< 3. Second Embodiment >>
<3-1. Overview>
Subsequently, an image encoding device according to the second embodiment will be described. In the first embodiment described above, the description has been made mainly focusing on the case where an image having a bit depth of 10 bits or less is encoded as an input image. On the other hand, in recent years, it is also assumed that an image having a bit depth exceeding 10 bits is encoded as an input image, and the range of values that can be taken by the offset value becomes wider as the bit depth increases. The number of candidates tends to increase. As a specific example, when the bit depth is 12 bits, possible values of the offset value are 0 to 124.
 このような状況を鑑み、HEVCでは、「log2_sao_offset_scale_luma」や、「log2_sao_offset_scale_chroma」等のような、所謂Log2OffsetScaleパラメタの導入が検討されている。Log2OffsetScaleパラメタは、入力画像の画素のビット深度が10ビットを超える場合に、必要に応じて、ビット深度が10ビットの場合のオフセット値をスケーリングする(即ち、拡大または縮小する)ためのパラメタであり、ピクチャ単位で設定することが可能である。ここで、「log2_sao_offset_scale_luma」は、輝度についてオフセット値をスケーリングするためのLog2OffsetScaleパラメタであり、「log2_sao_offset_scale_chroma」は、色差についてオフセット値をスケーリングするためのLog2OffsetScaleパラメタである。 In view of this situation, HEVC is considering the introduction of so-called Log2OffsetScale parameters such as “log2_sao_offset_scale_luma” and “log2_sao_offset_scale_chroma”. The Log2OffsetScale parameter is a parameter for scaling (ie, enlarging or reducing) the offset value when the bit depth is 10 bits as necessary when the bit depth of the pixel of the input image exceeds 10 bits. It is possible to set in units of pictures. Here, “log2_sao_offset_scale_luma” is a Log2OffsetScale parameter for scaling the offset value with respect to luminance, and “log2_sao_offset_scale_chroma” is a Log2OffsetScale parameter for scaling the offset value with respect to color difference.
 具体的には、入力画像の画素のビット深度が12ビットの場合には、Log2OffsetScaleパラメタとして、0、1、及び2のいずれかの値を設定することが可能である。より具体的な一例として、Log2OffsetScaleが0~2それぞれの場合における、オフセット値の候補は以下の通りである。
 ・Log2OffSetScale=0,Offset={0,1,2,3,…,31}
 ・Log2OffSetScale=1,Offset={0,2,4,6,…,62}
 ・Log2OffSetScale=2,Offset={0,4,8,16,…,124}
Specifically, when the bit depth of the pixel of the input image is 12 bits, any value of 0, 1, and 2 can be set as the Log2OffsetScale parameter. As a more specific example, offset value candidates when Log2OffsetScale is 0 to 2 are as follows.
・ Log2OffSetScale = 0, Offset = {0, 1, 2, 3, ..., 31}
・ Log2OffSetScale = 1, Offset = {0, 2, 4, 6, ..., 62}
-Log2OffSetScale = 2, Offset = {0, 4, 8, 16, ..., 124}
 このように、Log2OffsetScaleパラメタが設けられることで、ビット深度が10ビットの場合のオフセット値の候補である0~31を、状況に応じてスケーリングすることで、10ビットを超える場合のオフセット値を選択的に設定することが可能となる。また、Log2OffsetScaleパラメタの導入に伴い、全てのオフセット値の候補についてデータを送信する必要が無くなるため、ビット深度の増加に伴うデータの送信効率の低下を抑制することが可能となる。 In this way, by providing the Log2OffsetScale parameter, the offset value candidates from 0 to 31 when the bit depth is 10 bits are scaled according to the situation to select the offset value when exceeding 10 bits. Can be set automatically. In addition, with the introduction of the Log2OffsetScale parameter, it is not necessary to transmit data for all offset value candidates, so that it is possible to suppress a decrease in data transmission efficiency accompanying an increase in bit depth.
 具体的な一例として、入力画像のピーク信号対雑音比(PSNR:Peak signal-to-noise ratio)が高い場合(即ち、画質が良い場合)には、原画像データと復号画像データとの差はより小さくなる傾向にある。そのため、このような場合には、例えば、Log2OffSetScaleがより小さくなるように設定することで、オフセット値として取り得る値の最大値が制限されるものの、オフセット値の候補間の間隔(即ち、隣接する候補間の差分)がより小さくなるように設定することが可能となる。即ち、原画像データと復号画像データとの間の差に応じて、より高い分解能でオフセット値を適用することが可能となる。 As a specific example, when the peak signal-to-noise ratio (PSNR) of the input image is high (that is, when the image quality is good), the difference between the original image data and the decoded image data is It tends to be smaller. Therefore, in such a case, for example, by setting Log2OffSetScale to be smaller, the maximum value that can be taken as an offset value is limited, but the interval between offset value candidates (that is, adjacent to each other) It is possible to set so that the difference between candidates is smaller. That is, the offset value can be applied with higher resolution according to the difference between the original image data and the decoded image data.
 また、他の一例として、入力画像のPSNRが低い場合(即ち、画質が悪い場合)には、原画像データと復号画像データとの差はより大きくなる傾向にある。このような場合には、例えば、Log2OffSetScaleがより大きくなるように設定することで、オフセット値の候補間の間隔(即ち、隣接する候補間の差分)がより大きくなるように設定することが可能となる。このような制御により、オフセット値の候補の数を変えることなく、当該オフセット値としてより大きい値を適用することが可能となる。 As another example, when the PSNR of the input image is low (that is, when the image quality is poor), the difference between the original image data and the decoded image data tends to be larger. In such a case, for example, by setting Log2OffSetScale to be larger, it is possible to set the interval between offset value candidates (that is, the difference between adjacent candidates) to be larger. Become. Such control makes it possible to apply a larger value as the offset value without changing the number of offset value candidates.
 そこで、本実施形態では、より好適な態様でLog2OffsetScaleパラメタを設定することで、ビット深度の増加に伴うデータの送信効率の低下を抑制し、かつ、オフセット値の設定に係る性能をより向上する(ひいては、オフセット値の設定に係る処理負荷を低減する)ことが可能な仕組みの一例について提案する。 Therefore, in the present embodiment, by setting the Log2OffsetScale parameter in a more preferable manner, it is possible to suppress a decrease in data transmission efficiency accompanying an increase in bit depth and to further improve the performance related to the setting of an offset value ( As a result, an example of a mechanism capable of reducing the processing load related to the setting of the offset value is proposed.
 具体的には、本実施形態に係る画像符号化装置は、入力画像の画素のビット深度が10ビットを超える場合に、当該入力画像を量子化するためのパラメタ(即ち、QP)に応じて、Log2OffsetScaleパラメタを設定する。例えば、図18は、本実施形態に係る画像符号化装置の概要について説明するための説明図であり、量子化値と被量子化値との間の関係の一例を示している。図18において、横軸は被量子化値を示しており、縦軸は量子化値を示している。また、破線で示したグラフは量子化前に相当し、実線で示したグラフは量子化後に相当する。 Specifically, the image encoding device according to the present embodiment, when the bit depth of the pixel of the input image exceeds 10 bits, according to the parameter (that is, QP) for quantizing the input image, Set the Log2OffsetScale parameter. For example, FIG. 18 is an explanatory diagram for describing an overview of the image coding apparatus according to the present embodiment, and illustrates an example of a relationship between a quantized value and a quantized value. In FIG. 18, the horizontal axis indicates the quantized value, and the vertical axis indicates the quantized value. A graph indicated by a broken line corresponds to before quantization, and a graph indicated by a solid line corresponds to after quantization.
 SAOは、前述した特性から分かるように、原画像と復元画像との間の差分をオフセット値により改善するための仕組みであり、例えば、オフセット値を適用することで量子化された値を符号化の対象となる画像(即ち、原画像)の値に戻す。これに対して、図18に示すように、画像を量子化する際には、量子化値(即ち、量子化ステップ(QP))が大きいほど、被量子化値(即ち、量子化前のデータ)と量子化後のビット(即ち、量子化後のデータ)との間の誤差は大きくなる傾向にある。本実施形態に係る画像符号化装置は、上述した特性を利用することで、入力画像(原画像)を量子化する際のQPに応じて、Log2OffsetScaleパラメタを設定することで、SAO処理において適用されるオフセット値を制御する。 As can be seen from the above-described characteristics, SAO is a mechanism for improving the difference between an original image and a restored image by an offset value. For example, a value quantized by applying an offset value is encoded. To the value of the target image (that is, the original image). On the other hand, as shown in FIG. 18, when an image is quantized, the larger the quantized value (that is, the quantization step (QP)), the larger the quantized value (that is, the data before quantization). ) And the quantized bits (ie, the quantized data) tend to be large. The image encoding apparatus according to the present embodiment is applied in the SAO processing by setting the Log2OffsetScale parameter according to the QP when the input image (original image) is quantized by using the above-described characteristics. Control the offset value.
 より具体的な一例として、画像符号化装置は、QPが閾値以上の場合には、Log2OffsetScaleパラメタとしてより大きい値が設定されるように制御する。これにより、オフセット値の候補の範囲がより広くなり、隣接する候補間の間隔がより大きくなるように制御される。そのため、当該画像符号化装置は、QPとしてより大きい値が設定されることで、量子化前後の誤差がより大きくなるような状況下においても、オフセット値としてより大きい値を適用することが可能となり、より大きな誤差も解消することが可能となる。 As a more specific example, the image encoding device controls so that a larger value is set as the Log2OffsetScale parameter when the QP is equal to or greater than the threshold value. As a result, the range of offset value candidates becomes wider and the interval between adjacent candidates is controlled to be larger. Therefore, the image encoding apparatus can apply a larger value as the offset value even under a situation where the error before and after the quantization becomes larger by setting a larger value as the QP. It is possible to eliminate a larger error.
 また、画像符号化装置は、QPが閾値未満の場合には、Log2OffsetScaleパラメタとしてより小さい値が設定されるように制御する。これにより、オフセット値の候補の範囲がより狭くなり、隣接する候補間の間隔がより小さくなるように制御される。そのため、当該画像符号化装置は、QPとしてより小さい値が設定されることで、量子化前後の誤差がより小さくなるような状況下では、オフセット値の候補間の間隔をより小さくすることが可能となり、ひいてはより精密に画像を復元することが可能となる。 In addition, when the QP is less than the threshold value, the image coding apparatus performs control so that a smaller value is set as the Log2OffsetScale parameter. Accordingly, the range of offset value candidates is narrowed, and the interval between adjacent candidates is controlled to be smaller. Therefore, the image coding apparatus can set the interval between offset value candidates to be smaller in a situation where an error before and after quantization becomes smaller by setting a smaller value as QP. As a result, the image can be restored more precisely.
 即ち、本実施形態に係る画像符号化装置は、ピクチャ単位で、当該ピクチャの特性(即ち、QP)に応じてLog2OffsetScaleパラメタ(ひいては、オフセット値の候補の範囲や、当該候補間の間隔)を適応的に設定する。そのため、本実施形態に係る画像符号化装置は、入力画像の画素のビット深度がより大きくなるような状況下においても、オフセット値をより効率よく設定することでオフセット値の設定に係る処理の性能をより向上し、かつ、ビット深度の増加に伴うデータの送信効率の低下を抑制することも可能となる。 That is, the image coding apparatus according to the present embodiment adapts the Log2OffsetScale parameter (and thus the range of offset value candidates and the interval between the candidates) in units of pictures according to the characteristics (ie, QP) of the picture. To set. Therefore, the image encoding apparatus according to the present embodiment performs processing related to the setting of the offset value by setting the offset value more efficiently even in a situation where the bit depth of the pixel of the input image becomes larger. Further, it is possible to further reduce the data transmission efficiency accompanying the increase in bit depth.
 以上、図18を参照して、本実施形態に係る画像符号化装置におけるサンプル適応オフセットフィルタの概要について説明した。 The outline of the sample adaptive offset filter in the image encoding device according to the present embodiment has been described above with reference to FIG.
  <3-2.処理>
 続いて、本実施形態に係る画像符号化装置におけるサンプル適応オフセットフィルタの一連の処理の流れの一例について、特に、オフセット判定部350の処理に着目して説明する。例えば、図19は、本実施形態に係る画像符号化装置における、オフセット判定部350の一連の処理の流れの一例を示したフローチャートである。
<3-2. Processing>
Subsequently, an example of a flow of a series of processing of the sample adaptive offset filter in the image encoding device according to the present embodiment will be described with particular attention paid to the processing of the offset determination unit 350. For example, FIG. 19 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the present embodiment.
 (ステップS711、S713、S717)
 図19に示すように、まず、オフセット判定部350は、対象となるピクチャ(復号画像データ)の復号元である量子化データを生成する際の量子化ステップ(QP)を取得し(S711)、取得したQPを所定の閾値TH30及びTH31それぞれと順次比較する。なお、閾値TH30及びTH31の大小関係は、TH30<TH31であるものとする。
(Steps S711, S713, S717)
As shown in FIG. 19, first, the offset determination unit 350 obtains a quantization step (QP) when generating quantized data that is a decoding source of a target picture (decoded image data) (S711). The acquired QP is sequentially compared with each of predetermined threshold values TH30 and TH31. Note that the magnitude relationship between the thresholds TH30 and TH31 is TH30 <TH31.
 (ステップS715)
 取得したQPが閾値TH30未満の場合には(S713、YES)、オフセット判定部350は、Log2OffsetScaleパラメタとして0を設定する。この場合には、オフセット値の候補は、前述した通り{0,1,2,3,…,31}となる。
(Step S715)
When the acquired QP is less than the threshold value TH30 (S713, YES), the offset determination unit 350 sets 0 as the Log2OffsetScale parameter. In this case, offset value candidates are {0, 1, 2, 3,..., 31} as described above.
 (ステップS719)
 一方で、取得したQPが閾値TH30以上であり(S713、NO)、閾値TH31未満の場合には(S717、YES)、オフセット判定部350は、Log2OffsetScaleパラメタとして1を設定する。この場合には、オフセット値の候補は、前述した通り、当該Log2OffsetScaleパラメタに基づきスケーリングされ、{0,2,4,6,…,62}となる。
(Step S719)
On the other hand, when the acquired QP is greater than or equal to the threshold TH30 (S713, NO) and less than the threshold TH31 (S717, YES), the offset determination unit 350 sets 1 as the Log2OffsetScale parameter. In this case, as described above, the offset value candidates are scaled based on the Log2OffsetScale parameter and become {0, 2, 4, 6,..., 62}.
 (ステップS721)
 また、取得したQPが閾値TH31以上の場合には(S717、NO)、オフセット判定部350は、Log2OffsetScaleパラメタとして2を設定する。この場合には、オフセット値の候補は、前述した通り、当該Log2OffsetScaleパラメタに基づきスケーリングされ、{0,4,8,12,…,124}となる。
(Step S721)
If the acquired QP is equal to or greater than the threshold TH31 (S717, NO), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. In this case, as described above, the offset value candidates are scaled based on the Log2OffsetScale parameter and become {0, 4, 8, 12,..., 124}.
 なお、QPに基づきLog2OffsetScaleパラメタの設定を切り替えるための閾値HT30及びTH31には、事前の実験等に基づき決定した適切な値を、あらかじめ設定しておけばよい。 It should be noted that an appropriate value determined based on a prior experiment or the like may be set in advance for the thresholds HT30 and TH31 for switching the setting of the Log2OffsetScale parameter based on QP.
 以上、図19を参照して、本実施形態に係る画像符号化装置におけるサンプル適応オフセットフィルタの一連の処理の流れの一例について、特に、オフセット判定部350の処理に着目して説明した。なお、オフセット判定部350が、オフセット値の候補の範囲を設定する「設定部」の一例に相当する。 As described above, with reference to FIG. 19, an example of a flow of a series of processing of the sample adaptive offset filter in the image encoding device according to the present embodiment has been described, particularly focusing on the processing of the offset determination unit 350. The offset determination unit 350 corresponds to an example of a “setting unit” that sets a range of offset value candidates.
  <3-3.変形例>
 続いて、本実施形態の変形例(以下、「変形例2-1」とする)として、本実施形態に係る画像符号化装置において、前述した第1の実施形態に係る画像符号化装置と同様に、オフセット値の候補の数をビット深度が8ビットの場合と同様の数に制限する場合の一例について説明する。具体的には、変形例2-1に係る画像符号化装置は、入力画像(原画像)を量子化する際のQPに応じて、Log2OffsetScaleパラメタを設定するとともに、オフセット値の候補を、当該候補の数が制限された範囲内で設定する。
<3-3. Modification>
Subsequently, as a modification of the present embodiment (hereinafter referred to as “Modification 2-1”), the image coding apparatus according to the present embodiment is the same as the image coding apparatus according to the first embodiment described above. Next, an example in which the number of offset value candidates is limited to the same number as when the bit depth is 8 bits will be described. Specifically, the image encoding device according to the modified example 2-1 sets the Log2OffsetScale parameter according to the QP when the input image (original image) is quantized, and sets the offset value candidate as the candidate. Set the number within a limited range.
 例えば、図20は、変形例2-1に係る画像符号化装置における、オフセット判定部350の一連の処理の流れの一例を示したフローチャートである。なお、変形例2-1に係る画像符号化装置は、例えば、Log2OffsetScaleパラメタとオフセット値の候補として、以下に示す設定のいずれかを適用するものとして説明する。
 ・Log2OffSetScale=0,Offset={0,1,2,3,4,5,6,7}
 ・Log2OffSetScale=1,Offset={0,2,4,6,8,10,12,14}
 ・Log2OffSetScale=2,Offset={0,4,8,12,16,20,24,28}
 ・Log2OffSetScale=2,Offset={0,8,16,24,32,40,48,56}
For example, FIG. 20 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the modified example 2-1. Note that the image encoding device according to the modification 2-1 is described assuming that, for example, one of the following settings is applied as a Log2OffsetScale parameter and an offset value candidate.
・ Log2OffSetScale = 0, Offset = {0, 1, 2, 3, 4, 5, 6, 7}
・ Log2OffSetScale = 1, Offset = {0, 2, 4, 6, 8, 10, 12, 14}
・ Log2OffSetScale = 2, Offset = {0, 4, 8, 12, 16, 20, 24, 28}
・ Log2OffSetScale = 2 、 Offset = {0, 8, 16, 24, 32, 40, 48, 56}
 (ステップS731、S733、S737、S741)
 図20に示すように、まず、オフセット判定部350は、対象となるピクチャ(復号画像データ)の復号元である量子化データを生成する際の量子化ステップ(QP)を取得し(S731)、取得したQPを所定の閾値TH35、TH36、及びTH37それぞれと順次比較する(S733、S737、S741)。なお、閾値TH35、TH36、及びTH37の大小関係は、TH35<TH36<TH37であるものとする。
(Steps S731, S733, S737, S741)
As shown in FIG. 20, first, the offset determination unit 350 obtains a quantization step (QP) when generating quantized data that is a decoding source of a target picture (decoded image data) (S731). The acquired QP is sequentially compared with predetermined threshold values TH35, TH36, and TH37 (S733, S737, S741). It is assumed that the threshold values TH35, TH36, and TH37 have a magnitude relationship of TH35 <TH36 <TH37.
 (ステップS735)
 取得したQPが閾値TH35未満の場合には(S713、YES)、オフセット判定部350は、Log2OffsetScaleパラメタとして0を設定する。また、このときオフセット判定部350は、オフセット値の候補として、{0,1,2,3,4,5,6,7}を設定する。
(Step S735)
If the acquired QP is less than the threshold TH35 (S713, YES), the offset determination unit 350 sets 0 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets {0, 1, 2, 3, 4, 5, 6, 7} as offset value candidates.
 (ステップS739)
 一方で、取得したQPが閾値TH35以上であり(S733、NO)、閾値TH36未満の場合には(S737、YES)、オフセット判定部350は、Log2OffsetScaleパラメタとして1を設定する。また、このときオフセット判定部350は、オフセット値の候補として、{0,2,4,6,8,10,12,14}を設定する。
(Step S739)
On the other hand, when the acquired QP is greater than or equal to the threshold TH35 (S733, NO) and less than the threshold TH36 (S737, YES), the offset determination unit 350 sets 1 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets {0, 2, 4, 6, 8, 10, 12, 14} as offset value candidates.
 (ステップS743)
 また、取得したQPが閾値TH36以上であり(S735、NO)、閾値TH37未満の場合には(S741、YES)、オフセット判定部350は、Log2OffsetScaleパラメタとして2を設定する。また、このときオフセット判定部350は、オフセット値の候補として、{0,4,8,12,16,20,24,28}を設定する。
(Step S743)
When the acquired QP is equal to or greater than the threshold TH36 (S735, NO) and is less than the threshold TH37 (S741, YES), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets {0, 4, 8, 12, 16, 20, 24, 28} as offset value candidates.
 (ステップS745)
 また、取得したQPが閾値TH37以上の場合においては(S741、NO)、オフセット判定部350は、Log2OffsetScaleパラメタとして2を設定する。また、このときオフセット判定部350は、オフセット値の候補として、{0,8,16,24,32,40,48,56}を設定する。
(Step S745)
When the acquired QP is equal to or greater than the threshold TH37 (S741, NO), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets {0, 8, 16, 24, 32, 40, 48, 56} as offset value candidates.
 なお、QPに基づきLog2OffsetScaleパラメタの設定及びオフセット値の候補を切り替えるための閾値HT35、TH36、及びTH37には、事前の実験等に基づき決定した適切な値を、あらかじめ設定しておけばよい。 It should be noted that appropriate values determined based on prior experiments or the like may be set in advance in the thresholds HT35, TH36, and TH37 for setting the Log2OffsetScale parameter and switching the offset value candidates based on the QP.
 以上のような制御により、変形例2-1に係る画像符号化装置は、前述した第2の実施形態に係る画像符号化装置と同様に、ピクチャ単位で、当該ピクチャの特徴(即ち、QP)に応じてLog2OffsetScaleパラメタ(ひいては、オフセット値の候補の範囲や、当該候補間の間隔)を適応的に設定することが可能となる。また、変形例2-1に係る画像符号化装置は、ビット深度が10ビットを超える場合においても、オフセット値の各候補のコストを計算する構成として、8ビットの場合と同様の構成を利用して、オフセット値を決定することが可能となる。即ち、変形例2-1に係る画像符号化装置に依れば、前述した第1の実施形態に係る画像符号化装置と同様に、オフセット判定部350の回路規模を縮小し、かつ、オフセット値それぞれのコスト計算に係る処理量を低減することが可能となる。 Through the control as described above, the image coding apparatus according to the modified example 2-1 has the feature (that is, QP) of the picture in units of pictures as in the image coding apparatus according to the second embodiment described above. Accordingly, it is possible to adaptively set the Log2OffsetScale parameter (and thus the range of offset value candidates and the interval between the candidates). In addition, the image encoding device according to the modified example 2-1 uses the same configuration as the 8-bit configuration as the configuration for calculating the cost of each candidate offset value even when the bit depth exceeds 10 bits. Thus, the offset value can be determined. That is, according to the image encoding device according to the modified example 2-1, the circuit scale of the offset determination unit 350 is reduced and the offset value is reduced as in the image encoding device according to the first embodiment described above. It becomes possible to reduce the processing amount concerning each cost calculation.
 なお、変形例2-1に係る画像符号化装置では、オフセットの候補の最大が56となっており、この点で前述した第2の実施形態に係る画像符号化装置とは異なる。これは、オフセット値として、56より大きい値が選択される割合が小さくなる傾向にあるためである。具体的には、QPが大きくなると、原画像と復元画像との間の誤差は大きくなるものの、適用するオフセット値を選択するためのコスト計算に使用される係数(lambda)がより大きくなる傾向にある。そのため、実験のデータにより、オフセット値として56より大きい値が選択される割合が小さいことがわかっている。そのため、変形例2-1に係る画像符号化装置では、オフセット値の候補の最大値を56として設定している。もちろん、上記に示した設定はあくまで一例であり、システムの特性やユースケース等に応じて適宜変更してもよいことは言うまでもない。 In the image encoding device according to the modified example 2-1, the maximum number of offset candidates is 56, which is different from the image encoding device according to the second embodiment described above. This is because the ratio at which a value greater than 56 is selected as the offset value tends to be small. Specifically, as the QP increases, the error between the original image and the restored image increases, but the coefficient (lambda) used in the cost calculation for selecting the offset value to be applied tends to increase. is there. Therefore, it is known from experimental data that the ratio of selecting a value larger than 56 as the offset value is small. Therefore, the maximum value of offset value candidates is set to 56 in the image encoding device according to Modification 2-1. Of course, the setting shown above is only an example, and it is needless to say that the setting may be appropriately changed according to the system characteristics, use case, and the like.
  <3-4.まとめ>
 以上、説明したように、本実施形態に係る画像符号化装置では、入力画像の画素のビット深度が10ビットを超える場合に、当該入力画像を量子化するためのパラメタ(即ち、QP)に応じて、Log2OffsetScaleパラメタをピクチャ単位で設定する。これにより、例えば、QPが閾値よりも大きい場合には、オフセット値の候補の範囲がより広くなり、隣接する候補間の間隔がより大きくなるように制御される。そのため、量子化前後の誤差がより大きくなるような状況下においても、オフセット値としてより大きい値を適用することが可能となり、より大きな誤差も解消することが可能となる。また、QPが閾値よりも小さい場合には、オフセット値の候補の範囲がより狭くなり、隣接する候補間の間隔がより小さくなるように制御される。そのため、量子化前後の誤差がより小さくなるような状況下では、オフセット値の候補間の間隔をより小さくすることが可能となり、ひいてはより精密に画像を復元することが可能となる。
<3-4. Summary>
As described above, in the image encoding device according to the present embodiment, when the bit depth of the pixel of the input image exceeds 10 bits, the input image is quantized according to the parameter (that is, QP) for quantizing the input image. Set the Log2OffsetScale parameter in units of pictures. Thereby, for example, when the QP is larger than the threshold value, the range of candidate offset values is wider, and the interval between adjacent candidates is controlled to be larger. Therefore, even under a situation where the error before and after the quantization becomes larger, a larger value can be applied as the offset value, and the larger error can be eliminated. In addition, when the QP is smaller than the threshold value, the range of offset value candidates is narrowed, and the interval between adjacent candidates is controlled to be smaller. For this reason, in a situation where the error before and after quantization becomes smaller, the interval between offset value candidates can be made smaller, and as a result, the image can be restored more precisely.
 以上のように、本実施形態に係る画像符号化装置は、ピクチャ単位で、当該ピクチャの特徴(即ち、QP)に応じてLog2OffsetScaleパラメタ(ひいては、オフセット値の候補の範囲や、当該候補間の間隔)を適応的に設定する。特に、エンコーダやカムコーダにおいては、QPを変動させることで、エンコード後のストリーム(以降、「ビット」とも称する)をデータ転送時のビットレートに収めるような制御を行う場合がある。このような場合においても、本実施形態に係る画像符号化装置に依れば、ピクチャ単位で符号化効率の向上を見込むことが可能となる。即ち、本実施形態に係る画像符号化装置は、入力画像の画素のビット深度がより大きくなるような状況下においても、オフセット値をより効率よく設定することでオフセット値の設定に係る処理の性能をより向上し、かつ、ビット深度の増加に伴うデータの送信効率の低下を抑制することも可能となる。 As described above, the image coding apparatus according to the present embodiment can perform the Log2OffsetScale parameter (as a result, the range of offset value candidates and the interval between the candidates in accordance with the feature (ie, QP) of the picture in units of pictures. ) Is set adaptively. In particular, in an encoder or camcorder, there is a case where control is performed such that an encoded stream (hereinafter also referred to as “bit”) is included in a bit rate at the time of data transfer by changing QP. Even in such a case, according to the image coding apparatus according to the present embodiment, it is possible to expect an improvement in coding efficiency in units of pictures. That is, the image encoding apparatus according to the present embodiment performs processing related to the setting of the offset value by setting the offset value more efficiently even in a situation where the bit depth of the pixel of the input image becomes larger. Further, it is possible to further reduce the data transmission efficiency accompanying the increase in bit depth.
 <<4.第3の実施形態>>
  <4-1.概要>
 続いて、第3の実施形態に係る画像符号化装置について説明する。前述した第2の実施形態では、入力画像を量子化するためのパラメタ(QP)に応じて、Log2OffsetScaleパラメタをピクチャ単位で設定していた。これに対して、本実施形態に係る符号化装置は、エンコード済のピクチャに対するオフセット値の適用結果(オフセット値の使用頻度)に応じて、Log2OffsetScaleパラメタやオフセット値の候補をピクチャ単位で設定する。
<< 4. Third Embodiment >>
<4-1. Overview>
Next, an image encoding device according to the third embodiment will be described. In the second embodiment described above, the Log2OffsetScale parameter is set in units of pictures in accordance with the parameter (QP) for quantizing the input image. On the other hand, the encoding apparatus according to the present embodiment sets the Log2OffsetScale parameter and offset value candidates for each picture in accordance with the result of applying the offset value to the encoded picture (frequency of using the offset value).
 例えば、同じようなシーンが連続する場合等のように隣接するピクチャ間の相関性が高い場合には、オフセット値を大きくしたとしても、ピクチャ間の差分は小さくなる傾向にある。即ち、このような場合には、あるピクチャに対して適用されるオフセット値の傾向が、直前にエンコードされたピクチャに対して適用されたオフセット値の傾向と類似する傾向にある。そこで、本実施形態に係る画像符号化装置は、このような特性を利用し、エンコード済のピクチャに対するオフセット値の使用頻度に応じて、Log2OffsetScaleパラメタやオフセット値の候補をピクチャ単位で適応的に切り替える。 For example, when the correlation between adjacent pictures is high, such as when similar scenes continue, the difference between pictures tends to be small even if the offset value is increased. That is, in such a case, the tendency of the offset value applied to a certain picture tends to be similar to the tendency of the offset value applied to the picture encoded immediately before. Therefore, the image coding apparatus according to the present embodiment uses such characteristics and adaptively switches the Log2OffsetScale parameter and offset value candidates in units of pictures according to the frequency of use of the offset value for the encoded picture. .
 なお、本説明では、変形例2-1に係る画像符号化装置と同様に、Log2OffsetScaleパラメタとオフセット値の候補とを切り替える場合に着目して、以下のようにモード(Mode)が設定されているものとして説明する。
 ・Mode=0,Log2OffSetScale=0,Offset={0,1,2,3,4,5,6,7}
 ・Mode=1,Log2OffSetScale=1,Offset={0,2,4,6,8,10,12,14}
 ・Mode=2,Log2OffSetScale=2,Offset={0,4,8,12,16,20,24,28}
 ・Mode=3,Log2OffSetScale=2,Offset={0,8,16,24,32,40,48,56}
In this description, as in the case of the image encoding device according to Modification Example 2-1, focusing on the case of switching between the Log2OffsetScale parameter and the offset value candidate, the mode (Mode) is set as follows. It will be explained as a thing.
・ Mode = 0, Log2OffSetScale = 0, Offset = {0, 1, 2, 3, 4, 5, 6, 7}
・ Mode = 1, Log2OffSetScale = 1, Offset = {0, 2, 4, 6, 8, 10, 12, 14}
・ Mode = 2, Log2OffSetScale = 2, Offset = {0, 4, 8, 12, 16, 20, 24, 28}
・ Mode = 3, Log2OffSetScale = 2, Offset = {0, 8, 16, 24, 32, 40, 48, 56}
 具体的な一例として、直前にエンコードされたピクチャにおいて、あるモードに基づき設定されたオフセット値の候補のうち、より小さいオフセット値(例えば、閾値よりも小さいオフセット値)の適用頻度が高い場合に着目する。この場合には、本実施形態に係る画像符号化装置は、次にエンコードするピクチャのオフセット値の候補を設定するためのモードとして、直前にエンコードされたピクチャに対応するモードよりも1段階下のモードを設定する。より具体的には、直前にエンコードされたピクチャにおいてMode=1が設定されていた場合には、画像符号化装置は、次にエンコードするピクチャについては、Mode=0を設定することとなる。 As a specific example, in a picture encoded immediately before, attention is paid to a case where a lower offset value (for example, an offset value smaller than a threshold) is frequently applied among offset value candidates set based on a certain mode. To do. In this case, the image encoding apparatus according to the present embodiment is one mode lower than the mode corresponding to the immediately encoded picture as the mode for setting the offset value candidate of the next encoded picture. Set the mode. More specifically, when Mode = 1 is set in the picture encoded immediately before, the image encoding apparatus sets Mode = 0 for the next picture to be encoded.
 また、他の一例として、直前にエンコードされたピクチャにおいて、あるモードに基づき設定されたオフセット値の候補のうち、より大きいオフセット値(例えば、閾値よりも大きいオフセット値)の適用頻度が高い場合に着目する。この場合には、本実施形態に係る画像符号化装置は、次にエンコードするピクチャのオフセット値の候補を設定するためのモードとして、直前にエンコードされたピクチャに対応するモードよりも1段階上のモードを設定する。より具体的には、直前にエンコードされたピクチャにおいてMode=1が設定されていた場合には、画像符号化装置は、次にエンコードするピクチャについては、Mode=2を設定することとなる。 As another example, in a picture encoded immediately before, a larger offset value (for example, an offset value larger than a threshold value) is frequently applied among offset value candidates set based on a certain mode. Pay attention. In this case, the image encoding apparatus according to the present embodiment is one level higher than the mode corresponding to the immediately encoded picture as a mode for setting a candidate offset value for the next encoded picture. Set the mode. More specifically, when Mode = 1 is set in the picture encoded immediately before, the image encoding apparatus sets Mode = 2 for the picture to be encoded next.
 なお、上記では、エンコード済のピクチャに対するオフセット値の適用結果に応じて、変形例2-1に係る画像符号化装置と同様に、Log2OffsetScaleパラメタとオフセット値の候補とを切り替える場合に着目して説明したが、必ずしも同制御のみには限定されない。具体的な一例として、エンコード済のピクチャに対するオフセット値の適用結果に応じて、前述した第2の実施形態に係る画像符号化装置(図19参照)と同様に、Log2OffsetScaleパラメタを切り替えてもよい。 Note that the above description focuses on the case where the Log2OffsetScale parameter and the offset value candidate are switched in the same manner as in the image encoding device according to the modified example 2-1, depending on the application result of the offset value to the encoded picture. However, it is not necessarily limited to the same control. As a specific example, the Log2OffsetScale parameter may be switched in the same manner as in the image encoding device (see FIG. 19) according to the second embodiment described above, depending on the application result of the offset value to the encoded picture.
 以上のような制御により、本実施形態に係る画像符号化装置は、同じようなシーンが連続する場合等のように隣接するピクチャ間の相関性が高いような状況下において、オフセット値が効率よく設定されるように(即ち、オフセット値の各候補の使用頻度がより向上するように)、オフセット値の候補の範囲を制御する(即ち、オフセット値の候補を設定する)ことが可能となる。 Through the control as described above, the image coding apparatus according to the present embodiment can efficiently set the offset value in a situation where the correlation between adjacent pictures is high, such as when similar scenes continue. It is possible to control the range of offset value candidates (that is, to set offset value candidates) so as to be set (that is, the frequency of use of each offset value candidate is further improved).
 以上、本実施形態に係る画像符号化装置におけるサンプル適応オフセットフィルタの概要について説明した。 The outline of the sample adaptive offset filter in the image encoding device according to the present embodiment has been described above.
  <4-2.処理>
 続いて、本実施形態に係る画像符号化装置におけるサンプル適応オフセットフィルタの一連の処理の流れの一例について、特に、オフセット判定部350の処理に着目して説明する。例えば、図21は、本実施形態に係る画像符号化装置における、オフセット判定部350の一連の処理の流れの一例を示したフローチャートである。
<4-2. Processing>
Subsequently, an example of a flow of a series of processing of the sample adaptive offset filter in the image encoding device according to the present embodiment will be described with particular attention paid to the processing of the offset determination unit 350. For example, FIG. 21 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the present embodiment.
 (ステップS751、S753、S757)
 図21に示すように、まず、オフセット判定部350は、エンコード済のピクチャに対するオフセット値の適用結果を取得し(S751)、各オフセット値の適用頻度を評価する(S753、S757)。
(Steps S751, S753, S757)
As shown in FIG. 21, first, the offset determination unit 350 acquires the application result of the offset value for the encoded picture (S751), and evaluates the application frequency of each offset value (S753, S757).
 (ステップS755)
 例えば、所定の閾値よりも小さいオフセット値の適用頻度がより高い場合に着目する(S753、YES)。この場合には、オフセット判定部350は、次にエンコードするピクチャのオフセット値の候補を設定するためのモードとして、直前にエンコードされたピクチャに対応するモードよりも1段階下のモードを設定する。
(Step S755)
For example, attention is paid to a case where the frequency of applying an offset value smaller than a predetermined threshold is higher (S753, YES). In this case, the offset determination unit 350 sets a mode one level lower than the mode corresponding to the picture encoded immediately before as a mode for setting a candidate offset value of a picture to be encoded next.
 (ステップS759)
 また、他の一例として、所定の閾値よりも小さいオフセット値の適用頻度がより低く(S753、NO)、かつ、所定の閾値よりも大きいオフセット値の適用頻度がより高い場合(S757、YES)に着目する。この場合には、オフセット判定部350は、次にエンコードするピクチャのオフセット値の候補を設定するためのモードとして、直前にエンコードされたピクチャに対応するモードよりも1段階上のモードを設定する。
(Step S759)
As another example, when the application frequency of the offset value smaller than the predetermined threshold is lower (S753, NO) and the application frequency of the offset value larger than the predetermined threshold is higher (S757, YES). Pay attention. In this case, the offset determination unit 350 sets a mode that is one step higher than the mode corresponding to the picture encoded immediately before, as a mode for setting a candidate offset value of the picture to be encoded next.
 なお、ステップS753及びS757それぞれの判定に用いられる閾値は、必ずしも同じ値でなくてもよい。このような状況下では、例えば、所定の閾値よりも小さいオフセット値の適用頻度がより低く(S753、NO)、かつ、所定の閾値よりも大きいオフセット値の適用頻度についても低い場合(S757、NO)が想定され得る。このような場合には、オフセット判定部350は、直前にエンコードされたピクチャに対応するモードを維持し、次にエンコードするピクチャに対しても同様に適用してもよい。 In addition, the threshold value used for each determination of step S753 and S757 does not necessarily need to be the same value. Under such circumstances, for example, the application frequency of the offset value smaller than the predetermined threshold is lower (S753, NO), and the application frequency of the offset value larger than the predetermined threshold is also low (S757, NO). ) Can be envisaged. In such a case, the offset determination unit 350 may maintain the mode corresponding to the picture encoded immediately before and apply the same to the picture to be encoded next.
 また、ステップS753及びS757それぞれの判定に用いられる閾値については、事前の実験等に基づき決定した適切な値を、モードごとにあらかじめ設定しておけばよい。 In addition, for the threshold values used for the determinations in steps S753 and S757, appropriate values determined based on prior experiments or the like may be set in advance for each mode.
 以上、図21を参照して、本実施形態に係る画像符号化装置におけるサンプル適応オフセットフィルタの一連の処理の流れの一例について、特に、オフセット判定部350の処理に着目して説明した。 As described above, with reference to FIG. 21, an example of a flow of a series of processing of the sample adaptive offset filter in the image encoding device according to the present embodiment has been described, particularly focusing on the processing of the offset determination unit 350.
  <4-3.変形例>
 続いて、本実施形態の変形例(以下、「変形例3-1」とする)として、本実施形態に係る画像符号化装置と、前述した第2の実施形態に係る画像符号化装置とを組み合わせた場合の制御の一例について説明する。具体的には、変形例3-1に係る画像符号化装置は、前述した第2の実施形態に係る符号化装置(例えば、図19及び図20)と同様に、入力画像を量子化するためのパラメタ(即ち、QP)に応じて、Log2OffsetScaleパラメタやオフセット値の候補を設定する。一方で、変形例3-1に係る画像符号化装置は、QPを評価するための閾値を、エンコード済のピクチャに対するオフセット値の適用結果に応じて動的に制御する点で、第2の実施形態と異なる。そこで、変形例3-1に係る画像符号化装置について、特に、第2の実施形態に係る画像符号化装置とは異なる部分に着目して説明する。
<4-3. Modification>
Subsequently, as a modification of the present embodiment (hereinafter referred to as “Modification 3-1”), the image coding apparatus according to the present embodiment and the image coding apparatus according to the second embodiment described above are included. An example of control when combined will be described. Specifically, the image encoding device according to the modified example 3-1 quantizes the input image in the same manner as the encoding device according to the second embodiment described above (for example, FIGS. 19 and 20). The Log2OffsetScale parameter and offset value candidates are set according to the parameters (ie, QP). On the other hand, the image coding apparatus according to the modified example 3-1 is the second implementation in that the threshold for evaluating the QP is dynamically controlled according to the application result of the offset value to the encoded picture. Different from form. Therefore, the image encoding device according to the modified example 3-1 will be described by focusing attention on differences from the image encoding device according to the second embodiment.
 例えば、図22は、変形例3-1に係る画像符号化装置における、オフセット判定部350の一連の処理の流れの一例を示したフローチャートであり、QPを評価するための閾値を制御するための処理の一例を示している。 For example, FIG. 22 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the modified example 3-1, for controlling a threshold for evaluating the QP. An example of processing is shown.
 (ステップS761、S763、S767)
 図22に示すように、まず、オフセット判定部350は、エンコード済のピクチャに対するオフセット値の適用結果を取得し(S761)、各オフセット値の適用頻度を評価する(S763、S767)。
(Steps S761, S763, S767)
As shown in FIG. 22, first, the offset determination unit 350 acquires the application result of the offset value to the encoded picture (S761), and evaluates the application frequency of each offset value (S763, S767).
 (ステップS765)
 例えば、所定の閾値よりも小さいオフセット値の適用頻度がより高い場合に着目する(S753、YES)。この場合には、オフセット判定部350は、QPを評価するための閾値のうち少なくとも一部(特に、より値の小さい閾値)に対してオフセットを加算することで、当該閾値がより大きい値となるように制御する。より具体的な一例として、図19に示す例の場合には、オフセット判定部350は、閾値TH30~TH37それぞれに対してオフセットを加算してもよい。このような制御により、オフセット値の候補の範囲が狭く、かつ、当該オフセット値の候補の値がより小さい設定(即ち、Log2OffsetScaleパラメタの値がより小さい設定)が選択されやすくなる。
(Step S765)
For example, attention is paid to a case where the frequency of applying an offset value smaller than a predetermined threshold is higher (S753, YES). In this case, the offset determination unit 350 adds the offset to at least a part (particularly, a threshold having a smaller value) of the thresholds for evaluating the QP, so that the threshold becomes a larger value. To control. As a more specific example, in the example shown in FIG. 19, the offset determination unit 350 may add an offset to each of the threshold values TH30 to TH37. Such control facilitates selection of a setting in which the range of offset value candidates is narrow and the offset value candidate value is smaller (that is, a setting in which the value of the Log2OffsetScale parameter is smaller).
 (ステップS769)
 また、他の一例として、所定の閾値よりも小さいオフセット値の適用頻度がより低く(S763、NO)、かつ、所定の閾値よりも大きいオフセット値の適用頻度がより高い場合(S767、YES)に着目する。この場合には、オフセット判定部350は、QPを評価するための閾値のうち少なくとも一部(特に、より値の大きい閾値)からオフセットを減算することで、当該閾値がより小さい値となるように制御する。より具体的な一例として、図19に示す例の場合には、オフセット判定部350は、閾値TH30~TH37それぞれからオフセットを減算してもよい。このような制御により、オフセット値の候補の範囲が広く、かつ、オフセット値としてより大きい値を選択可能な設定(即ち、Log2OffsetScaleパラメタの値がより大きい設定)が選択されやすくなる。
(Step S769)
As another example, when the application frequency of the offset value smaller than the predetermined threshold is lower (S763, NO) and the application frequency of the offset value larger than the predetermined threshold is higher (S767, YES). Pay attention. In this case, the offset determination unit 350 subtracts the offset from at least a part (particularly, a threshold having a larger value) of the thresholds for evaluating the QP so that the threshold becomes a smaller value. Control. As a more specific example, in the example shown in FIG. 19, the offset determination unit 350 may subtract the offset from each of the threshold values TH30 to TH37. Such control makes it easy to select a setting in which the range of offset value candidates is wide and a larger value can be selected as the offset value (that is, a setting in which the value of the Log2OffsetScale parameter is larger).
 なお、ステップS763及びS767それぞれの判定に用いられる閾値は、必ずしも同じ値でなくてもよい。このような状況下では、例えば、所定の閾値よりも小さいオフセット値の適用頻度がより低く(S763、NO)、かつ、所定の閾値よりも大きいオフセット値の適用頻度についても低い場合(S767、NO)が想定され得る。このような場合には、オフセット判定部350は、QPを評価するための閾値を制御しなくてもよい。 In addition, the threshold value used for each determination of step S763 and S767 does not necessarily need to be the same value. Under such circumstances, for example, when the application frequency of the offset value smaller than the predetermined threshold is lower (S763, NO), and the application frequency of the offset value larger than the predetermined threshold is low (S767, NO). ) Can be envisaged. In such a case, the offset determination unit 350 may not control the threshold value for evaluating the QP.
 また、ステップS763及びS767それぞれの判定に用いられる閾値については、事前の実験等に基づき決定した適切な値を、オフセット値の候補の設定ごと(換言すると、上述したモードごと)にあらかじめ設定しておけばよい。 For the threshold values used for the determinations in steps S763 and S767, an appropriate value determined based on a prior experiment or the like is set in advance for each offset value candidate setting (in other words, for each mode described above). Just keep it.
 以上のような制御により、変形例3-1に係る画像符号化装置は、隣接するピクチャ間の相関性が高いような状況下において、オフセット値が効率よく設定されるように(即ち、オフセット値の各候補の使用頻度がより向上するように)、Log2OffsetScaleパラメタやオフセット値の候補を設定することが可能となる。また、変形例3-1に係る画像符号化装置に依れば、QPに応じてLog2OffsetScaleパラメタが設定されるため、QPの急激な変動により予測誤差にずれが生じた場合においても、当該予測誤差のずれに伴う影響を緩和することが可能となる。 Through the control as described above, the image encoding device according to the modified example 3-1 can set the offset value efficiently (that is, the offset value in a situation where the correlation between adjacent pictures is high). Log2OffsetScale parameter and offset value candidates can be set (so that the frequency of use of each candidate is improved). Further, according to the image encoding device according to the modified example 3-1, since the Log2OffsetScale parameter is set according to the QP, even when a prediction error shifts due to a rapid variation of the QP, the prediction error It becomes possible to mitigate the influence accompanying the deviation.
  <4-4.まとめ>
 以上、説明したように、本実施形態に係る画像符号化装置は、エンコード済のピクチャに対するオフセット値の適用結果(オフセット値の使用頻度)に応じて、Log2OffsetScaleパラメタやオフセット値の候補をピクチャ単位で設定する。これにより、本実施形態に係る画像符号化装置は、隣接するピクチャ間の相関性が高いような状況下において、オフセット値が効率よく設定されるように(即ち、オフセット値の各候補の使用頻度がより向上するように)、Log2OffsetScaleパラメタやオフセット値の候補を設定することが可能となる。
<4-4. Summary>
As described above, the image coding apparatus according to the present embodiment determines the Log2OffsetScale parameter and the offset value candidates for each picture according to the application result of the offset value to the encoded picture (frequency of use of the offset value). Set. As a result, the image encoding apparatus according to the present embodiment can set the offset value efficiently in a situation where the correlation between adjacent pictures is high (that is, the frequency of use of each candidate offset value). It is possible to set Log2OffsetScale parameter and offset value candidates.
 特に、エンコーダやカムコーダにおいては、イントラ予測やインター予測等の各種予測の精度(換言すると、予測が当たるか否か)に応じてQPを変動させることで、エンコード後のストリーム(ビット)をデータ転送時のビットレートに収めるような制御を行う場合がある。この際に、予測が困難なシーン(換言すると、ピクチャ間の相関性や画面内の相関性が低いシーン)においては、原画像と復元画像との間の差分がより大きくなり、ターゲットとなるビットレートに収まらないビットがより多く発生する場合がある。このような場合においても、本実施形態に係る画像符号化装置に依れば、シーンの特性(例えば、ビットが発生しやすいシーンか否か)に応じて、より好適な態様で適応的にLog2OffsetScaleパラメタやオフセット値の候補を設定することが可能となる。 In particular, in encoders and camcorders, the stream (bit) after encoding is transferred by changing the QP in accordance with the accuracy of various predictions such as intra prediction and inter prediction (in other words, whether or not the prediction is successful). There is a case where control is performed so as to be within the bit rate of the hour. At this time, in a scene that is difficult to predict (in other words, a scene having low correlation between pictures or low correlation in the screen), the difference between the original image and the restored image becomes larger, and the target bit There may be more bits that do not fit in the rate. Even in such a case, according to the image coding apparatus according to the present embodiment, Log2OffsetScale is adaptively adapted in a more preferable manner according to the characteristics of the scene (for example, whether or not the scene is likely to generate bits). Parameters and offset value candidates can be set.
 <<5.第4の実施形態>>
  <5-1.概要>
 続いて、第4の実施形態に係る画像符号化装置について説明する。前述した第3の実施形態に係る画像符号化装置では、エンコード済のピクチャに対するオフセット値の適用結果に応じて、Log2OffsetScaleパラメタやオフセット値の候補をピクチャ単位で設定していた。これに対して、本実施形態に係る画像符号化装置は、対象となる入力画像(ピクチャ)の特徴量に応じて、Log2OffsetScaleパラメタやオフセット値の候補をピクチャ単位で設定する。
<< 5. Fourth Embodiment >>
<5-1. Overview>
Subsequently, an image encoding device according to the fourth embodiment will be described. In the above-described image encoding device according to the third embodiment, the Log2OffsetScale parameter and offset value candidates are set for each picture in accordance with the application result of the offset value to the encoded picture. On the other hand, the image coding apparatus according to the present embodiment sets Log2OffsetScale parameter and offset value candidates in units of pictures according to the feature amount of the target input image (picture).
 例えば、複雑なテクスチャを含む画像やノイズの多い画像等は、画面内(ピクチャ内)における変化が大きいため、イントラ予測やインター予測等の各種予測の精度が低く、原画像と復元画像との間の差分もより大きくなる傾向にある(換言すると、ビットが発生しやすい傾向にある)。そのため、このような場合には、例えば、Log2OffsetScaleパラメタとしてより大きい値を設定することでオフセット値をスケーリングし、当該オフセット値としてより大きい値を設定可能とすることが望ましい傾向にある。 For example, an image including a complex texture or a noisy image has a large change in the screen (in a picture), so the accuracy of various predictions such as intra prediction and inter prediction is low. There is a tendency that the difference between them also becomes larger (in other words, bits tend to occur). Therefore, in such a case, for example, it is desirable to scale the offset value by setting a larger value as the Log2OffsetScale parameter so that a larger value can be set as the offset value.
 一方で、画面内(ピクチャ内)における変化が小さい場合には、イントラ予測やインター予測等の各種予測の精度が高く、原画像と復元画像との間の差分もより大きくなる傾向にある(換言すると、ビットが発生しにくい傾向にある)。そのため、このような場合には、例えば、Log2OffsetScaleパラメタとしてより小さい値を設定することで、オフセット値として取り得る値の最大値が制限されるものの、オフセット値の候補間の間隔がより小さくなるように設定することが望ましい傾向にある。 On the other hand, when the change in the screen (in the picture) is small, the accuracy of various predictions such as intra prediction and inter prediction is high, and the difference between the original image and the restored image tends to be larger (in other words, Then, it tends to be hard to generate a bit). Therefore, in such a case, for example, by setting a smaller value as the Log2OffsetScale parameter, the maximum value that can be taken as an offset value is limited, but the interval between offset value candidates is made smaller. It tends to be desirable to set to.
 そこで、本実施形態に係る画像符号化装置は、上述したような特性を利用し、対象となる入力画像(ピクチャ)の特徴量(例えば、分散等)に応じて、Log2OffsetScaleパラメタやオフセット値の候補をピクチャ単位で適応的に切り替える。 Therefore, the image encoding apparatus according to the present embodiment uses the characteristics as described above, and the Log2OffsetScale parameter and offset value candidates according to the feature amount (for example, variance) of the target input image (picture). Are switched adaptively in units of pictures.
 具体的な一例として、入力画像の分散を、当該入力画像の特徴量として評価する場合に着目する。複雑なテクスチャを含む画像やノイズの多い画像等は、画像内(ピクチャ内)における変化が大きく(即ち、画面内の相関性が低く)、分散がより高くなる傾向にある。一方で、画面内(ピクチャ内)における変化が小さい画像(即ち、画面内の相関性が高い画像)は、分散がより低くなる傾向にある。 As a specific example, attention is paid to the case where the variance of the input image is evaluated as the feature amount of the input image. An image including a complex texture, a noisy image, or the like has a large change in the image (in the picture) (that is, a low correlation in the screen) and tends to have a higher variance. On the other hand, an image having a small change in the screen (in the picture) (that is, an image having a high correlation in the screen) tends to have a lower variance.
 そのため、本実施形態に係る画像符号化装置は、分散がより高い画像(例えば、分散が閾値以上の画像)については、例えば、画面内の相関性が低く、各種予測の精度が低いものとみなし、Log2OffsetScaleパラメタとしてより大きい値を設定する。また、他の一例として、本実施形態に係る画像符号化装置は、分散がより低い画像(例えば、分散が閾値未満の画像)については、例えば、画面内の相関性が高く、各種予測の精度が高いものとみなし、Log2OffsetScaleパラメタとしてより小さい値を設定する。 For this reason, the image coding apparatus according to the present embodiment regards an image with higher variance (for example, an image with variance equal to or greater than a threshold value), for example, as having low correlation within the screen and low accuracy of various predictions. Set a larger value for the Log2OffsetScale parameter. As another example, the image coding apparatus according to the present embodiment, for an image with lower variance (for example, an image with variance less than a threshold), has high correlation in the screen, for example, and accuracy of various predictions. Is assumed to be high, and a smaller value is set as the Log2OffsetScale parameter.
 なお、上述した例では、画像の特徴量として「分散」を利用する場合に着目して説明したが、当該特徴量として利用されるパラメタは、必ずしも「分散」のみには限定されない。具体的な一例として、「variance」、「Hadamard」、「DCT」、及び「Tv norm」等が、画像の特徴量として利用されてもよい。 In the above-described example, the case where “distribution” is used as the feature amount of the image has been described. However, the parameter used as the feature amount is not necessarily limited to “distribution”. As a specific example, “variance”, “Hadamard”, “DCT”, “Tv norm”, and the like may be used as image feature amounts.
 以上のような制御により、本実施形態に係る画像符号化装置は、対象となる入力画像(ピクチャ)の特性(例えば、原画像と復元画像との間の差分がより大きくなるか否か)に応じて、Log2OffsetScaleパラメタやオフセット値の候補をピクチャ単位で適応的に切り替えることが可能となる。即ち、本実施形態に係る画像符号化装置に依れば、対象となる入力画像の特性に応じて、オフセット値が効率よく設定されるように(即ち、オフセット値の各候補の使用頻度がより向上するように)、オフセット値の候補を設定することが可能となる。 Through the control as described above, the image coding apparatus according to the present embodiment can adjust the characteristics of the target input image (picture) (for example, whether or not the difference between the original image and the restored image becomes larger). Accordingly, the Log2OffsetScale parameter and offset value candidates can be adaptively switched on a picture-by-picture basis. That is, according to the image coding apparatus according to the present embodiment, the offset value is efficiently set according to the characteristics of the target input image (that is, the frequency of use of each candidate offset value is more As a result, offset value candidates can be set.
 以上、本実施形態に係る画像符号化装置におけるサンプル適応オフセットフィルタの概要について説明した。 The outline of the sample adaptive offset filter in the image encoding device according to the present embodiment has been described above.
  <5-2.処理>
 続いて、本実施形態に係る画像符号化装置におけるサンプル適応オフセットフィルタの一連の処理の流れの一例について、特に、オフセット判定部350の処理に着目して説明する。例えば、図23は、本実施形態に係る画像符号化装置における、オフセット判定部350の一連の処理の流れの一例を示したフローチャートである。
<5-2. Processing>
Subsequently, an example of a flow of a series of processing of the sample adaptive offset filter in the image encoding device according to the present embodiment will be described with particular attention paid to the processing of the offset determination unit 350. For example, FIG. 23 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the present embodiment.
 なお、本説明では、変形例2-1に係る画像符号化装置と同様に、Log2OffsetScaleパラメタとオフセット値の候補として、以下に示す設定のいずれかを適用するものとして説明する。
 ・Log2OffSetScale=0,Offset={0,1,2,3,4,5,6,7}
 ・Log2OffSetScale=1,Offset={0,2,4,6,8,10,12,14}
 ・Log2OffSetScale=2,Offset={0,4,8,12,16,20,24,28}
 ・Log2OffSetScale=2,Offset={0,8,16,24,32,40,48,56}
Note that, in the present description, as in the case of the image encoding device according to Modification Example 2-1, one of the following settings is applied as a Log2OffsetScale parameter and offset value candidate.
・ Log2OffSetScale = 0, Offset = {0, 1, 2, 3, 4, 5, 6, 7}
・ Log2OffSetScale = 1, Offset = {0, 2, 4, 6, 8, 10, 12, 14}
・ Log2OffSetScale = 2, Offset = {0, 4, 8, 12, 16, 20, 24, 28}
・ Log2OffSetScale = 2 、 Offset = {0, 8, 16, 24, 32, 40, 48, 56}
 (ステップS771、S773、S777、S781)
 図23に示すように、まず、オフセット判定部350は、対象となるピクチャの特徴量を取得し(S751)、取得した当該特徴量を所定の閾値TH40、TH41、及びTH42それぞれと順次比較する(S773、S777、S781)。なお、閾値TH40、TH41、及びTH42の大小関係は、TH40<TH41<TH42であるものとする。
(Steps S771, S773, S777, S781)
As shown in FIG. 23, first, the offset determination unit 350 acquires the feature amount of the target picture (S751), and sequentially compares the acquired feature amount with each of predetermined threshold values TH40, TH41, and TH42 ( S773, S777, S781). It is assumed that the threshold values TH40, TH41, and TH42 have a magnitude relationship of TH40 <TH41 <TH42.
 (ステップS775)
 取得した特徴量が閾値TH40未満の場合には(S773、YES)、オフセット判定部350は、Log2OffsetScaleパラメタとして0を設定する。また、このときオフセット判定部350は、オフセット値の候補として、{0,1,2,3,4,5,6,7}を設定する。
(Step S775)
When the acquired feature amount is less than the threshold value TH40 (S773, YES), the offset determination unit 350 sets 0 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets {0, 1, 2, 3, 4, 5, 6, 7} as offset value candidates.
 (ステップS779)
 一方で、取得した特徴量が閾値TH40以上であり(S773、NO)、閾値TH41未満の場合には(S777、YES)、オフセット判定部350は、Log2OffsetScaleパラメタとして1を設定する。また、このときオフセット判定部350は、オフセット値の候補として、{0,2,4,6,8,10,12,14}を設定する。
(Step S779)
On the other hand, when the acquired feature amount is equal to or greater than the threshold value TH40 (S773, NO) and less than the threshold value TH41 (S777, YES), the offset determination unit 350 sets 1 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets {0, 2, 4, 6, 8, 10, 12, 14} as offset value candidates.
 (ステップS783)
 また、取得した特徴量が閾値TH41以上であり(S775、NO)、閾値TH42未満の場合には(S781、YES)、オフセット判定部350は、Log2OffsetScaleパラメタとして2を設定する。また、このときオフセット判定部350は、オフセット値の候補として、{0,4,8,12,16,20,24,28}を設定する。
(Step S783)
When the acquired feature amount is equal to or greater than the threshold value TH41 (S775, NO) and less than the threshold value TH42 (S781, YES), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets {0, 4, 8, 12, 16, 20, 24, 28} as offset value candidates.
 (ステップS785)
 また、取得した特徴量が閾値TH42以上の場合においては(S781、NO)、オフセット判定部350は、Log2OffsetScaleパラメタとして2を設定する。また、このときオフセット判定部350は、オフセット値の候補として、{0,8,16,24,32,40,48,56}を設定する。
(Step S785)
When the acquired feature amount is equal to or greater than the threshold TH42 (S781, NO), the offset determination unit 350 sets 2 as the Log2OffsetScale parameter. At this time, the offset determination unit 350 sets {0, 8, 16, 24, 32, 40, 48, 56} as offset value candidates.
 なお、画像(ピクチャ)の特徴量に基づきLog2OffsetScaleパラメタの設定及びオフセット値の候補を切り替えるための閾値HT40、TH41、及びTH42には、事前の実験等に基づき決定した適切な値を、あらかじめ設定しておけばよい。 It should be noted that appropriate values determined based on prior experiments are set in advance in the thresholds HT40, TH41, and TH42 for setting the Log2OffsetScale parameter and switching the offset value candidates based on the feature amount of the image (picture). Just keep it.
 以上、図23を参照して、本実施形態に係る画像符号化装置におけるサンプル適応オフセットフィルタの一連の処理の流れの一例について、特に、オフセット判定部350の処理に着目して説明した。 In the above, with reference to FIG. 23, an example of the flow of a series of processing of the sample adaptive offset filter in the image encoding device according to the present embodiment has been described, particularly focusing on the processing of the offset determination unit 350.
  <5-3.変形例>
 続いて、本実施形態の変形例(以下、「変形例4-1」とする)として、本実施形態に係る画像符号化装置と、前述した第2の実施形態に係る画像符号化装置とを組み合わせた場合の制御の一例について説明する。具体的には、変形例4-1に係る画像符号化装置は、前述した第2の実施形態に係る符号化装置(例えば、図19及び図20)と同様に、入力画像を量子化するためのパラメタ(即ち、QP)に応じて、Log2OffsetScaleパラメタやオフセット値の候補を設定する。一方で、変形例4-1に係る画像符号化装置は、QPを評価するための閾値を、対象となる入力画像(ピクチャ)の特徴量に応じて動的に制御する点で、第2の実施形態と異なる。そこで、変形例4-1に係る画像符号化装置について、特に、第2の実施形態に係る画像符号化装置とは異なる部分に着目して説明する。
<5-3. Modification>
Subsequently, as a modification of the present embodiment (hereinafter referred to as “Modification 4-1”), the image coding apparatus according to the present embodiment and the image coding apparatus according to the second embodiment described above are included. An example of control when combined will be described. Specifically, the image encoding device according to the modified example 4-1 is for quantizing an input image in the same manner as the encoding device according to the second embodiment described above (for example, FIGS. 19 and 20). The Log2OffsetScale parameter and offset value candidates are set according to the parameters (ie, QP). On the other hand, the image coding apparatus according to the modified example 4-1 has the second feature in that the threshold for evaluating the QP is dynamically controlled according to the feature amount of the target input image (picture). Different from the embodiment. Therefore, the image encoding device according to the modified example 4-1 will be described by focusing attention on differences from the image encoding device according to the second embodiment.
 例えば、図24は、変形例4-1に係る画像符号化装置における、オフセット判定部350の一連の処理の流れの一例を示したフローチャートであり、QPを評価するための閾値を制御するための処理の一例を示している。 For example, FIG. 24 is a flowchart illustrating an example of a flow of a series of processes of the offset determination unit 350 in the image encoding device according to the modified example 4-1, for controlling a threshold for evaluating the QP. An example of processing is shown.
 (ステップS791、S793、S797)
 図24に示すように、まず、オフセット判定部350は、対象となるピクチャの特徴量を取得し(S791)、取得した当該特徴量を所定の閾値TH45、TH46それぞれと順次比較する(S793、S797)。
(Steps S791, S793, S797)
As shown in FIG. 24, first, the offset determination unit 350 acquires a feature amount of a target picture (S791), and sequentially compares the acquired feature amount with predetermined threshold values TH45 and TH46, respectively (S793, S797). ).
 (ステップS795)
 例えば、取得した特徴量が閾値TH45未満の場合(S793、YES)に着目する。この例は、対象となるピクチャの画面内の相関性が高く、原画像と復元画像との間の差がより小さくなる場合に相当する。この場合には、オフセット判定部350は、QPを評価するための閾値のうち少なくとも一部(特に、より値の小さい閾値)に対してオフセットを加算することで、当該閾値がより大きい値となるように制御する。より具体的な一例として、図19に示す例の場合には、オフセット判定部350は、閾値TH30~TH37それぞれに対してオフセットを加算してもよい。このような制御により、オフセット値の候補の範囲が狭く、かつ、当該オフセット値の候補の値がより小さい設定(即ち、Log2OffsetScaleパラメタの値がより小さい設定)が選択されやすくなる。
(Step S795)
For example, attention is paid to a case where the acquired feature amount is less than the threshold value TH45 (S793, YES). This example corresponds to a case where the correlation of the target picture is high within the screen and the difference between the original image and the restored image is smaller. In this case, the offset determination unit 350 adds the offset to at least a part (particularly, a threshold having a smaller value) of the thresholds for evaluating the QP, so that the threshold becomes a larger value. To control. As a more specific example, in the example shown in FIG. 19, the offset determination unit 350 may add an offset to each of the threshold values TH30 to TH37. Such control facilitates selection of a setting in which the range of offset value candidates is narrow and the offset value candidate value is smaller (that is, a setting in which the value of the Log2OffsetScale parameter is smaller).
 (ステップS769)
 また、他の一例として、取得した特徴量が閾値TH45以上であり(S793、NO)、かつ、当該特徴量が閾値TH46を超える場合(S797、YES)に着目する。この例は、対象となるピクチャの画面内の相関性が低く、原画像と復元画像との間の差がより大きくなる場合に相当する。この場合には、オフセット判定部350は、QPを評価するための閾値のうち少なくとも一部(特に、より値の大きい閾値)からオフセットを減算することで、当該閾値がより小さい値となるように制御する。より具体的な一例として、図19に示す例の場合には、オフセット判定部350は、閾値TH30~TH37それぞれからオフセットを減算してもよい。このような制御により、オフセット値の候補の範囲が広く、かつ、オフセット値としてより大きい値を選択可能な設定(即ち、Log2OffsetScaleパラメタの値がより大きい設定)が選択されやすくなる。
(Step S769)
As another example, attention is focused on a case where the acquired feature amount is equal to or greater than the threshold value TH45 (S793, NO) and the feature amount exceeds the threshold value TH46 (S797, YES). This example corresponds to a case where the correlation of the target picture in the screen is low and the difference between the original image and the restored image becomes larger. In this case, the offset determination unit 350 subtracts the offset from at least a part (particularly, a threshold having a larger value) of the thresholds for evaluating the QP so that the threshold becomes a smaller value. Control. As a more specific example, in the example shown in FIG. 19, the offset determination unit 350 may subtract the offset from each of the threshold values TH30 to TH37. Such control makes it easy to select a setting in which the range of offset value candidates is wide and a larger value can be selected as the offset value (that is, a setting in which the value of the Log2OffsetScale parameter is larger).
 なお、取得した特徴量が閾値TH45以上であり(S793、NO)、かつ、当該特徴量が閾値TH46以下の場合(S797、NO)には、オフセット判定部350は、QPを評価するための閾値を制御しなくてもよい。 When the acquired feature value is equal to or greater than the threshold value TH45 (S793, NO) and the feature value is equal to or less than the threshold value TH46 (S797, NO), the offset determination unit 350 uses the threshold value for evaluating the QP. Need not be controlled.
 また、ステップS793及びS797それぞれの判定に用いられる閾値TH45及びTH46については、事前の実験等に基づき決定した適切な値をあらかじめ設定しておけばよい。 In addition, for the threshold values TH45 and TH46 used for the determinations in steps S793 and S797, appropriate values determined based on prior experiments or the like may be set in advance.
 以上のような制御により、変形例4-1に係る画像符号化装置は、対象となる入力画像の特性に応じて、オフセット値が効率よく設定されるように(即ち、オフセット値の各候補の使用頻度がより向上するように)、オフセット値の候補を設定することが可能となる。また、変形例4-1に係る画像符号化装置に依れば、QPに応じてLog2OffsetScaleパラメタが設定されるため、QPの急激な変動により予測誤差にずれが生じた場合においても、当該予測誤差のずれに伴う影響を緩和することが可能となる。 Through the control as described above, the image coding apparatus according to the modified example 4-1 can set the offset value efficiently according to the characteristics of the target input image (that is, each offset value candidate). It is possible to set offset value candidates so that the frequency of use is further improved. Further, according to the image encoding device according to the modified example 4-1, since the Log2OffsetScale parameter is set according to the QP, even when the prediction error is deviated due to a rapid fluctuation of the QP, the prediction error It becomes possible to mitigate the influence accompanying the deviation.
  <5-4.まとめ>
 以上、説明したように、本実施形態に係る画像符号化装置は、対象となる入力画像(ピクチャ)の特徴量に応じて、Log2OffsetScaleパラメタやオフセット値の候補をピクチャ単位で設定する。これにより、本実施形態に係る画像符号化装置は、対象となる入力画像の特性に応じて、オフセット値が効率よく設定されるように(即ち、オフセット値の各候補の使用頻度がより向上するように)、オフセット値の候補を設定することが可能となる。即ち、本実施形態に係る画像符号化装置に依れば、シーンの特性(例えば、ビットが発生しやすいシーンか否か)に応じて、より好適な態様で適応的にLog2OffsetScaleパラメタやオフセット値の候補を設定することが可能となる。
<5-4. Summary>
As described above, the image coding apparatus according to the present embodiment sets the Log2OffsetScale parameter and offset value candidates in units of pictures according to the feature amount of the target input image (picture). As a result, the image encoding apparatus according to the present embodiment can more efficiently set the offset value according to the characteristics of the target input image (that is, the frequency of use of each candidate offset value is further improved). As a result, it is possible to set offset value candidates. That is, according to the image encoding device according to the present embodiment, the Log2OffsetScale parameter and the offset value are adaptively adapted in a more preferable manner according to the scene characteristics (for example, whether the scene is likely to generate bits). Candidates can be set.
 <<6.ハードウェア構成例>>
 上述した実施形態は、ソフトウェア、ハードウェア、及びソフトウェアとハードウェアとの組合せのいずれを用いて実現されてもよい。画像符号化装置10がソフトウェアを使用する場合、ソフトウェアを構成するプログラムは、例えば、装置の内部又は外部に設けられる記憶媒体(非一時的な媒体:non-transitory media)に予め格納される。そして、各プログラムは、例えば、実行時にRAM(Random Access Memory)に読み込まれ、CPU(Central Processing Unit)などのプロセッサにより実行される。
<< 6. Hardware configuration example >>
The above-described embodiments may be realized using any of software, hardware, and a combination of software and hardware. When the image encoding device 10 uses software, a program constituting the software is stored in advance in a storage medium (non-transitory media) provided inside or outside the device, for example. Each program is read into a RAM (Random Access Memory) at the time of execution and executed by a processor such as a CPU (Central Processing Unit).
 図25は、上述した実施形態を適用可能なエンコーダのハードウェア構成の一例を示すブロック図である。図25を参照すると、エンコーダ800は、システムバス810、画像処理チップ820及びオフチップメモリ890を備える。画像処理チップ820は、n個(nは1以上)の処理回路830-1、830-2、…、830-n、参照バッファ840、システムバスインタフェース850及びローカルバスインタフェース860を含む。 FIG. 25 is a block diagram illustrating an example of a hardware configuration of an encoder to which the above-described embodiment can be applied. Referring to FIG. 25, the encoder 800 includes a system bus 810, an image processing chip 820, and an off-chip memory 890. The image processing chip 820 includes n (n is 1 or more) processing circuits 830-1, 830-2,..., 830-n, a reference buffer 840, a system bus interface 850, and a local bus interface 860.
 システムバス810は、画像処理チップ820と外部モジュール(例えば、中央制御機能、アプリケーション機能、通信インタフェース又はユーザインタフェースなど)との間の通信路を提供する。処理回路830-1、830-2、…、830-nは、システムバスインタフェース850を介してシステムバス810と接続され、及びローカルバスインタフェース860を介してオフチップメモリ890と接続される。処理回路830-1、830-2、…、830-nは、オンチップメモリ(例えば、SRAM)に相当し得る参照バッファ840にもアクセスすることができる。オフチップメモリ890は、例えば、画像処理チップ820により処理される画像データを記憶するフレームメモリであってよい。 The system bus 810 provides a communication path between the image processing chip 820 and an external module (for example, a central control function, an application function, a communication interface, or a user interface). The processing circuits 830-1, 830-2,..., 830-n are connected to the system bus 810 via the system bus interface 850 and to the off-chip memory 890 via the local bus interface 860. The processing circuits 830-1, 830-2,..., 830-n can also access a reference buffer 840 that may correspond to an on-chip memory (eg, SRAM). The off-chip memory 890 may be a frame memory that stores image data processed by the image processing chip 820, for example.
 一例として、処理回路830-1は上述したイントラ予測部30に、処理回路830-2は上述したインター予測部35に、他の処理回路は直交変換部14に、また別の処理回路は可逆符号化部16に相当し得る。また、別の処理回路は、ループフィルタ24に相当し得る。また、ループフィルタ24を構成する、デブロックフィルタ200、サンプル適応オフセットフィルタ300、及び適応ループフィルタ400のそれぞれを、別の処理回路として構成してもよい。なお、これら処理回路は、同一の画像処理チップ820ではなく、別個のチップ上に形成されてもよい。 As an example, the processing circuit 830-1 is the intra prediction unit 30, the processing circuit 830-2 is the inter prediction unit 35, the other processing circuits are the orthogonal transform unit 14, and the other processing circuit is a lossless code. It can correspond to the conversion unit 16. Another processing circuit may correspond to the loop filter 24. In addition, each of the deblock filter 200, the sample adaptive offset filter 300, and the adaptive loop filter 400 constituting the loop filter 24 may be configured as a separate processing circuit. Note that these processing circuits may be formed not on the same image processing chip 820 but on separate chips.
 <<7.応用例>>
  <7-1.様々な製品への応用>
 上述した実施形態は、衛星回線、ケーブルTV回線、インターネット、若しくはセルラー通信ネットワークなどを用いて映像の符号化ストリームを送信する送信装置、又は映像の符号化ストリームを光ディスク、磁気ディスク若しくはフラッシュメモリなどの媒体に記録する記録装置、といった様々な電子機器に応用され得る。以下、3つの応用例について説明する。
<< 7. Application example >>
<7-1. Application to various products>
In the above-described embodiment, a transmission device that transmits an encoded video stream using a satellite line, a cable TV line, the Internet, a cellular communication network, or the like, The present invention can be applied to various electronic devices such as a recording device for recording on a medium. Hereinafter, three application examples will be described.
   (1)第1の応用例
 図26は、上述した実施形態を適用した携帯電話機の概略的な構成の一例を示している。携帯電話機920は、アンテナ921、通信部922、音声コーデック923、スピーカ924、マイクロホン925、カメラ部926、画像処理部927、多重分離部928、記録再生部929、表示部930、制御部931、操作部932、センサ部933、バス934及びバッテリー935を備える。
(1) First Application Example FIG. 26 illustrates an example of a schematic configuration of a mobile phone to which the above-described embodiment is applied. A cellular phone 920 includes an antenna 921, a communication unit 922, an audio codec 923, a speaker 924, a microphone 925, a camera unit 926, an image processing unit 927, a demultiplexing unit 928, a recording / reproducing unit 929, a display unit 930, a control unit 931, an operation Part 932, sensor part 933, bus 934, and battery 935.
 アンテナ921は、通信部922に接続される。スピーカ924及びマイクロホン925は、音声コーデック923に接続される。操作部932は、制御部931に接続される。バス934は、通信部922、音声コーデック923、カメラ部926、画像処理部927、多重分離部928、記録再生部929、表示部930、制御部931及びセンサ部933を相互に接続する。 The antenna 921 is connected to the communication unit 922. The speaker 924 and the microphone 925 are connected to the audio codec 923. The operation unit 932 is connected to the control unit 931. The bus 934 connects the communication unit 922, the audio codec 923, the camera unit 926, the image processing unit 927, the demultiplexing unit 928, the recording / reproducing unit 929, the display unit 930, the control unit 931, and the sensor unit 933 to each other.
 携帯電話機920は、音声通話モード、データ通信モード、撮影モード及びテレビ電話モードを含む様々な動作モードで、音声信号の送受信、電子メール又は画像データの送受信、画像の撮像、及びデータの記録などの動作を行う。 The mobile phone 920 has various operation modes including a voice call mode, a data communication mode, a shooting mode, and a videophone mode, and is used for sending and receiving voice signals, sending and receiving e-mail or image data, taking images, and recording data. Perform the action.
 音声通話モードにおいて、マイクロホン925により生成されるアナログ音声信号は、音声コーデック923に供給される。音声コーデック923は、アナログ音声信号を音声データへ変換し、変換された音声データをA/D変換し圧縮する。そして、音声コーデック923は、圧縮後の音声データを通信部922へ出力する。通信部922は、音声データを符号化及び変調し、送信信号を生成する。そして、通信部922は、生成した送信信号をアンテナ921を介して基地局(図示せず)へ送信する。また、通信部922は、アンテナ921を介して受信される無線信号を増幅し及び周波数変換し、受信信号を取得する。そして、通信部922は、受信信号を復調及び復号して音声データを生成し、生成した音声データを音声コーデック923へ出力する。音声コーデック923は、音声データを伸張し及びD/A変換し、アナログ音声信号を生成する。そして、音声コーデック923は、生成した音声信号をスピーカ924に供給して音声を出力させる。 In the voice call mode, the analog voice signal generated by the microphone 925 is supplied to the voice codec 923. The audio codec 923 converts an analog audio signal into audio data, A / D converts the compressed audio data, and compresses it. Then, the audio codec 923 outputs the compressed audio data to the communication unit 922. The communication unit 922 encodes and modulates the audio data and generates a transmission signal. Then, the communication unit 922 transmits the generated transmission signal to a base station (not shown) via the antenna 921. In addition, the communication unit 922 amplifies a radio signal received via the antenna 921 and performs frequency conversion to acquire a received signal. Then, the communication unit 922 demodulates and decodes the received signal to generate audio data, and outputs the generated audio data to the audio codec 923. The audio codec 923 expands the audio data and performs D / A conversion to generate an analog audio signal. Then, the audio codec 923 supplies the generated audio signal to the speaker 924 to output audio.
 また、データ通信モードにおいて、例えば、制御部931は、操作部932を介するユーザによる操作に応じて、電子メールを構成する文字データを生成する。また、制御部931は、文字を表示部930に表示させる。また、制御部931は、操作部932を介するユーザからの送信指示に応じて電子メールデータを生成し、生成した電子メールデータを通信部922へ出力する。通信部922は、電子メールデータを符号化及び変調し、送信信号を生成する。そして、通信部922は、生成した送信信号をアンテナ921を介して基地局(図示せず)へ送信する。また、通信部922は、アンテナ921を介して受信される無線信号を増幅し及び周波数変換し、受信信号を取得する。そして、通信部922は、受信信号を復調及び復号して電子メールデータを復元し、復元した電子メールデータを制御部931へ出力する。制御部931は、表示部930に電子メールの内容を表示させると共に、電子メールデータを記録再生部929の記憶媒体に記憶させる。 Further, in the data communication mode, for example, the control unit 931 generates character data constituting the e-mail in response to an operation by the user via the operation unit 932. In addition, the control unit 931 causes the display unit 930 to display characters. In addition, the control unit 931 generates e-mail data in response to a transmission instruction from the user via the operation unit 932, and outputs the generated e-mail data to the communication unit 922. The communication unit 922 encodes and modulates email data and generates a transmission signal. Then, the communication unit 922 transmits the generated transmission signal to a base station (not shown) via the antenna 921. In addition, the communication unit 922 amplifies a radio signal received via the antenna 921 and performs frequency conversion to acquire a received signal. Then, the communication unit 922 demodulates and decodes the received signal to restore the email data, and outputs the restored email data to the control unit 931. The control unit 931 displays the content of the electronic mail on the display unit 930 and stores the electronic mail data in the storage medium of the recording / reproducing unit 929.
 記録再生部929は、読み書き可能な任意の記憶媒体を有する。例えば、記憶媒体は、RAM又はフラッシュメモリなどの内蔵型の記憶媒体であってもよく、ハードディスク、磁気ディスク、光磁気ディスク、光ディスク、USBメモリ、又はメモリカードなどの外部装着型の記憶媒体であってもよい。 The recording / reproducing unit 929 has an arbitrary readable / writable storage medium. For example, the storage medium may be a built-in storage medium such as a RAM or a flash memory, or an externally mounted storage medium such as a hard disk, a magnetic disk, a magneto-optical disk, an optical disk, a USB memory, or a memory card. May be.
 また、撮影モードにおいて、例えば、カメラ部926は、被写体を撮像して画像データを生成し、生成した画像データを画像処理部927へ出力する。画像処理部927は、カメラ部926から入力される画像データを符号化し、符号化ストリームを記録再生部929の記憶媒体に記憶させる。 In the shooting mode, for example, the camera unit 926 images a subject to generate image data, and outputs the generated image data to the image processing unit 927. The image processing unit 927 encodes the image data input from the camera unit 926 and stores the encoded stream in the storage medium of the recording / playback unit 929.
 また、テレビ電話モードにおいて、例えば、多重分離部928は、画像処理部927により符号化された映像ストリームと、音声コーデック923から入力される音声ストリームとを多重化し、多重化したストリームを通信部922へ出力する。通信部922は、ストリームを符号化及び変調し、送信信号を生成する。そして、通信部922は、生成した送信信号をアンテナ921を介して基地局(図示せず)へ送信する。また、通信部922は、アンテナ921を介して受信される無線信号を増幅し及び周波数変換し、受信信号を取得する。これら送信信号及び受信信号には、符号化ビットストリームが含まれ得る。そして、通信部922は、受信信号を復調及び復号してストリームを復元し、復元したストリームを多重分離部928へ出力する。多重分離部928は、入力されるストリームから映像ストリーム及び音声ストリームを分離し、映像ストリームを画像処理部927、音声ストリームを音声コーデック923へ出力する。画像処理部927は、映像ストリームを復号し、映像データを生成する。映像データは、表示部930に供給され、表示部930により一連の画像が表示される。音声コーデック923は、音声ストリームを伸張し及びD/A変換し、アナログ音声信号を生成する。そして、音声コーデック923は、生成した音声信号をスピーカ924に供給して音声を出力させる。 Further, in the videophone mode, for example, the demultiplexing unit 928 multiplexes the video stream encoded by the image processing unit 927 and the audio stream input from the audio codec 923, and the multiplexed stream is the communication unit 922. Output to. The communication unit 922 encodes and modulates the stream and generates a transmission signal. Then, the communication unit 922 transmits the generated transmission signal to a base station (not shown) via the antenna 921. In addition, the communication unit 922 amplifies a radio signal received via the antenna 921 and performs frequency conversion to acquire a received signal. These transmission signal and reception signal may include an encoded bit stream. Then, the communication unit 922 demodulates and decodes the received signal to restore the stream, and outputs the restored stream to the demultiplexing unit 928. The demultiplexing unit 928 separates the video stream and the audio stream from the input stream, and outputs the video stream to the image processing unit 927 and the audio stream to the audio codec 923. The image processing unit 927 decodes the video stream and generates video data. The video data is supplied to the display unit 930, and a series of images is displayed on the display unit 930. The audio codec 923 decompresses the audio stream and performs D / A conversion to generate an analog audio signal. Then, the audio codec 923 supplies the generated audio signal to the speaker 924 to output audio.
 センサ部933は、加速度センサ及びジャイロセンサなどのセンサ群を含み、携帯電話機920の動きを表す指標を出力する。バッテリー935は、図中では省略されている電力供給ラインを介して、通信部922、音声コーデック923、カメラ部926、画像処理部927、多重分離部928、記録再生部929、表示部930、制御部931及びセンサ部933に電力を供給する。 Sensor unit 933 includes a sensor group such as an acceleration sensor and a gyro sensor, and outputs an index representing the movement of mobile phone 920. The battery 935 includes a communication unit 922, an audio codec 923, a camera unit 926, an image processing unit 927, a demultiplexing unit 928, a recording / reproducing unit 929, a display unit 930, and a control via a power supply line which is omitted in the drawing. Power is supplied to the unit 931 and the sensor unit 933.
 このように構成された携帯電話機920において、画像処理部927は、上述した実施形態に係る画像符号化装置10の機能を有する。それにより、携帯電話機920において、適用するSAOのモードと、適用するオフセット値とを決定するためのコスト計算の処理量を低減し、ひいては、携帯電話機920の消費電力や回路規模を低減することが可能となる。 In the mobile phone 920 configured as described above, the image processing unit 927 has the function of the image encoding device 10 according to the above-described embodiment. Thereby, in the mobile phone 920, the amount of cost calculation for determining the SAO mode to be applied and the offset value to be applied can be reduced, and consequently the power consumption and circuit scale of the mobile phone 920 can be reduced. It becomes possible.
   (2)第2の応用例
 図27は、上述した実施形態を適用した記録再生装置の概略的な構成の一例を示している。記録再生装置940は、例えば、受信した放送番組の音声データ及び映像データを符号化して記録媒体に記録する。また、記録再生装置940は、例えば、他の装置から取得される音声データ及び映像データを符号化して記録媒体に記録してもよい。また、記録再生装置940は、例えば、ユーザの指示に応じて、記録媒体に記録されているデータをモニタ及びスピーカ上で再生する。このとき、記録再生装置940は、音声データ及び映像データを復号する。
(2) Second Application Example FIG. 27 shows an example of a schematic configuration of a recording / reproducing apparatus to which the above-described embodiment is applied. For example, the recording / reproducing device 940 encodes audio data and video data of a received broadcast program and records the encoded data on a recording medium. In addition, the recording / reproducing device 940 may encode audio data and video data acquired from another device and record them on a recording medium, for example. In addition, the recording / reproducing device 940 reproduces data recorded on the recording medium on a monitor and a speaker, for example, in accordance with a user instruction. At this time, the recording / reproducing device 940 decodes the audio data and the video data.
 記録再生装置940は、チューナ941、外部インタフェース942、エンコーダ943、HDD(Hard Disk Drive)944、ディスクドライブ945、セレクタ946、デコーダ947、OSD(On-Screen Display)948、制御部949、及びユーザインタフェース950を備える。 The recording / reproducing apparatus 940 includes a tuner 941, an external interface 942, an encoder 943, an HDD (Hard Disk Drive) 944, a disk drive 945, a selector 946, a decoder 947, an OSD (On-Screen Display) 948, a control unit 949, and a user interface. 950.
 チューナ941は、アンテナ(図示せず)を介して受信される放送信号から所望のチャンネルの信号を抽出し、抽出した信号を復調する。そして、チューナ941は、復調により得られた符号化ビットストリームをセレクタ946へ出力する。即ち、チューナ941は、記録再生装置940における伝送手段としての役割を有する。 Tuner 941 extracts a signal of a desired channel from a broadcast signal received via an antenna (not shown), and demodulates the extracted signal. Then, the tuner 941 outputs the encoded bit stream obtained by the demodulation to the selector 946. That is, the tuner 941 has a role as a transmission unit in the recording / reproducing apparatus 940.
 外部インタフェース942は、記録再生装置940と外部機器又はネットワークとを接続するためのインタフェースである。外部インタフェース942は、例えば、IEEE1394インタフェース、ネットワークインタフェース、USBインタフェース、又はフラッシュメモリインタフェースなどであってよい。例えば、外部インタフェース942を介して受信される映像データ及び音声データは、エンコーダ943へ入力される。即ち、外部インタフェース942は、記録再生装置940における伝送手段としての役割を有する。 The external interface 942 is an interface for connecting the recording / reproducing apparatus 940 to an external device or a network. The external interface 942 may be, for example, an IEEE 1394 interface, a network interface, a USB interface, or a flash memory interface. For example, video data and audio data received via the external interface 942 are input to the encoder 943. That is, the external interface 942 serves as a transmission unit in the recording / reproducing device 940.
 エンコーダ943は、外部インタフェース942から入力される映像データ及び音声データが符号化されていない場合に、映像データ及び音声データを符号化する。そして、エンコーダ943は、符号化ビットストリームをセレクタ946へ出力する。 The encoder 943 encodes video data and audio data when the video data and audio data input from the external interface 942 are not encoded. Then, the encoder 943 outputs the encoded bit stream to the selector 946.
 HDD944は、映像及び音声などのコンテンツデータが圧縮された符号化ビットストリーム、各種プログラム及びその他のデータを内部のハードディスクに記録する。また、HDD944は、映像及び音声の再生時に、これらデータをハードディスクから読み出す。 The HDD 944 records an encoded bit stream in which content data such as video and audio is compressed, various programs, and other data on an internal hard disk. Also, the HDD 944 reads out these data from the hard disk when playing back video and audio.
 ディスクドライブ945は、装着されている記録媒体へのデータの記録及び読み出しを行う。ディスクドライブ945に装着される記録媒体は、例えばDVDディスク(DVD-Video、DVD-RAM、DVD-R、DVD-RW、DVD+R、DVD+RW等)又はBlu-ray(登録商標)ディスクなどであってよい。 The disk drive 945 performs recording and reading of data to and from the mounted recording medium. The recording medium loaded in the disk drive 945 may be, for example, a DVD disk (DVD-Video, DVD-RAM, DVD-R, DVD-RW, DVD + R, DVD + RW, etc.) or a Blu-ray (registered trademark) disk. .
 セレクタ946は、映像及び音声の記録時には、チューナ941又はエンコーダ943から入力される符号化ビットストリームを選択し、選択した符号化ビットストリームをHDD944又はディスクドライブ945へ出力する。また、セレクタ946は、映像及び音声の再生時には、HDD944又はディスクドライブ945から入力される符号化ビットストリームをデコーダ947へ出力する。 The selector 946 selects an encoded bit stream input from the tuner 941 or the encoder 943 when recording video and audio, and outputs the selected encoded bit stream to the HDD 944 or the disk drive 945. In addition, the selector 946 outputs the encoded bit stream input from the HDD 944 or the disk drive 945 to the decoder 947 during video and audio reproduction.
 デコーダ947は、符号化ビットストリームを復号し、映像データ及び音声データを生成する。そして、デコーダ947は、生成した映像データをOSD948へ出力する。また、デコーダ904は、生成した音声データを外部のスピーカへ出力する。 The decoder 947 decodes the encoded bit stream and generates video data and audio data. Then, the decoder 947 outputs the generated video data to the OSD 948. The decoder 904 outputs the generated audio data to an external speaker.
 OSD948は、デコーダ947から入力される映像データを再生し、映像を表示する。また、OSD948は、表示する映像に、例えばメニュー、ボタン又はカーソルなどのGUIの画像を重畳してもよい。 The OSD 948 reproduces the video data input from the decoder 947 and displays the video. Further, the OSD 948 may superimpose a GUI image such as a menu, a button, or a cursor on the video to be displayed.
 制御部949は、CPUなどのプロセッサ、並びにRAM及びROMなどのメモリを有する。メモリは、CPUにより実行されるプログラム、及びプログラムデータなどを記憶する。メモリにより記憶されるプログラムは、例えば、記録再生装置940の起動時にCPUにより読み込まれ、実行される。CPUは、プログラムを実行することにより、例えばユーザインタフェース950から入力される操作信号に応じて、記録再生装置940の動作を制御する。 The control unit 949 includes a processor such as a CPU and memories such as a RAM and a ROM. The memory stores a program executed by the CPU, program data, and the like. The program stored in the memory is read and executed by the CPU when the recording / reproducing apparatus 940 is activated, for example. The CPU controls the operation of the recording / reproducing device 940 according to an operation signal input from the user interface 950, for example, by executing the program.
 ユーザインタフェース950は、制御部949と接続される。ユーザインタフェース950は、例えば、ユーザが記録再生装置940を操作するためのボタン及びスイッチ、並びに遠隔制御信号の受信部などを有する。ユーザインタフェース950は、これら構成要素を介してユーザによる操作を検出して操作信号を生成し、生成した操作信号を制御部949へ出力する。 The user interface 950 is connected to the control unit 949. The user interface 950 includes, for example, buttons and switches for the user to operate the recording / reproducing device 940, a remote control signal receiving unit, and the like. The user interface 950 detects an operation by the user via these components, generates an operation signal, and outputs the generated operation signal to the control unit 949.
 このように構成された記録再生装置940において、エンコーダ943は、上述した実施形態に係る画像符号化装置10の機能を有する。それにより、記録再生装置940において、適用するSAOのモードと、適用するオフセット値とを決定するためのコスト計算の処理量を低減し、ひいては、記録再生装置940の消費電力や回路規模を低減することが可能となる。 In the recording / reproducing apparatus 940 configured in this way, the encoder 943 has the function of the image encoding apparatus 10 according to the above-described embodiment. Thereby, in the recording / reproducing apparatus 940, the processing amount of the cost calculation for determining the SAO mode to be applied and the offset value to be applied is reduced, and consequently, the power consumption and circuit scale of the recording / reproducing apparatus 940 are reduced. It becomes possible.
   (3)第3の応用例
 図28は、上述した実施形態を適用した撮像装置の概略的な構成の一例を示している。撮像装置960は、被写体を撮像して画像を生成し、画像データを符号化して記録媒体に記録する。
(3) Third Application Example FIG. 28 illustrates an example of a schematic configuration of an imaging apparatus to which the above-described embodiment is applied. The imaging device 960 images a subject to generate an image, encodes the image data, and records it on a recording medium.
 撮像装置960は、光学ブロック961、撮像部962、信号処理部963、画像処理部964、表示部965、外部インタフェース966、メモリ967、メディアドライブ968、OSD969、制御部970、ユーザインタフェース971、センサ972、バス973及びバッテリー974を備える。 The imaging device 960 includes an optical block 961, an imaging unit 962, a signal processing unit 963, an image processing unit 964, a display unit 965, an external interface 966, a memory 967, a media drive 968, an OSD 969, a control unit 970, a user interface 971, and a sensor 972. , A bus 973 and a battery 974.
 光学ブロック961は、撮像部962に接続される。撮像部962は、信号処理部963に接続される。表示部965は、画像処理部964に接続される。ユーザインタフェース971は、制御部970に接続される。バス973は、画像処理部964、外部インタフェース966、メモリ967、メディアドライブ968、OSD969、制御部970及びセンサ972を相互に接続する。 The optical block 961 is connected to the imaging unit 962. The imaging unit 962 is connected to the signal processing unit 963. The display unit 965 is connected to the image processing unit 964. The user interface 971 is connected to the control unit 970. The bus 973 connects the image processing unit 964, the external interface 966, the memory 967, the media drive 968, the OSD 969, the control unit 970, and the sensor 972 to each other.
 光学ブロック961は、フォーカスレンズ及び絞り機構などを有する。光学ブロック961は、被写体の光学像を撮像部962の撮像面に結像させる。撮像部962は、CCD又はCMOSなどのイメージセンサを有し、撮像面に結像した光学像を光電変換によって電気信号としての画像信号に変換する。そして、撮像部962は、画像信号を信号処理部963へ出力する。 The optical block 961 includes a focus lens and a diaphragm mechanism. The optical block 961 forms an optical image of the subject on the imaging surface of the imaging unit 962. The imaging unit 962 includes an image sensor such as a CCD or a CMOS, and converts an optical image formed on the imaging surface into an image signal as an electrical signal by photoelectric conversion. Then, the imaging unit 962 outputs the image signal to the signal processing unit 963.
 信号処理部963は、撮像部962から入力される画像信号に対してニー補正、ガンマ補正、色補正などの種々のカメラ信号処理を行う。信号処理部963は、カメラ信号処理後の画像データを画像処理部964へ出力する。 The signal processing unit 963 performs various camera signal processing such as knee correction, gamma correction, and color correction on the image signal input from the imaging unit 962. The signal processing unit 963 outputs the image data after the camera signal processing to the image processing unit 964.
 画像処理部964は、信号処理部963から入力される画像データを符号化し、符号化データを生成する。そして、画像処理部964は、生成した符号化データを外部インタフェース966又はメディアドライブ968へ出力する。また、画像処理部964は、外部インタフェース966又はメディアドライブ968から入力される符号化データを復号し、画像データを生成する。そして、画像処理部964は、生成した画像データを表示部965へ出力する。また、画像処理部964は、信号処理部963から入力される画像データを表示部965へ出力して画像を表示させてもよい。また、画像処理部964は、OSD969から取得される表示用データを、表示部965へ出力する画像に重畳してもよい。 The image processing unit 964 encodes the image data input from the signal processing unit 963 and generates encoded data. Then, the image processing unit 964 outputs the generated encoded data to the external interface 966 or the media drive 968. The image processing unit 964 also decodes encoded data input from the external interface 966 or the media drive 968 to generate image data. Then, the image processing unit 964 outputs the generated image data to the display unit 965. In addition, the image processing unit 964 may display the image by outputting the image data input from the signal processing unit 963 to the display unit 965. Further, the image processing unit 964 may superimpose display data acquired from the OSD 969 on an image output to the display unit 965.
 OSD969は、例えばメニュー、ボタン又はカーソルなどのGUIの画像を生成して、生成した画像を画像処理部964へ出力する。 The OSD 969 generates a GUI image such as a menu, a button, or a cursor, for example, and outputs the generated image to the image processing unit 964.
 外部インタフェース966は、例えばUSB入出力端子として構成される。外部インタフェース966は、例えば、画像の印刷時に、撮像装置960とプリンタとを接続する。また、外部インタフェース966には、必要に応じてドライブが接続される。ドライブには、例えば、磁気ディスク又は光ディスクなどのリムーバブルメディアが装着され、リムーバブルメディアから読み出されるプログラムが、撮像装置960にインストールされ得る。さらに、外部インタフェース966は、LAN又はインターネットなどのネットワークに接続されるネットワークインタフェースとして構成されてもよい。即ち、外部インタフェース966は、撮像装置960における伝送手段としての役割を有する。 The external interface 966 is configured as a USB input / output terminal, for example. The external interface 966 connects the imaging device 960 and a printer, for example, when printing an image. Further, a drive is connected to the external interface 966 as necessary. For example, a removable medium such as a magnetic disk or an optical disk is attached to the drive, and a program read from the removable medium can be installed in the imaging device 960. Further, the external interface 966 may be configured as a network interface connected to a network such as a LAN or the Internet. That is, the external interface 966 has a role as a transmission unit in the imaging device 960.
 メディアドライブ968に装着される記録媒体は、例えば、磁気ディスク、光磁気ディスク、光ディスク、又は半導体メモリなどの、読み書き可能な任意のリムーバブルメディアであってよい。また、メディアドライブ968に記録媒体が固定的に装着され、例えば、内蔵型ハードディスクドライブ又はSSD(Solid State Drive)のような非可搬性の記憶部が構成されてもよい。 The recording medium mounted on the media drive 968 may be any readable / writable removable medium such as a magnetic disk, a magneto-optical disk, an optical disk, or a semiconductor memory. Further, a recording medium may be fixedly attached to the media drive 968, and a non-portable storage unit such as an internal hard disk drive or an SSD (Solid State Drive) may be configured.
 制御部970は、CPUなどのプロセッサ、並びにRAM及びROMなどのメモリを有する。メモリは、CPUにより実行されるプログラム、及びプログラムデータなどを記憶する。メモリにより記憶されるプログラムは、例えば、撮像装置960の起動時にCPUにより読み込まれ、実行される。CPUは、プログラムを実行することにより、例えばユーザインタフェース971から入力される操作信号に応じて、撮像装置960の動作を制御する。 The control unit 970 includes a processor such as a CPU and memories such as a RAM and a ROM. The memory stores a program executed by the CPU, program data, and the like. The program stored in the memory is read and executed by the CPU when the imaging device 960 is activated, for example. The CPU controls the operation of the imaging device 960 according to an operation signal input from the user interface 971, for example, by executing the program.
 ユーザインタフェース971は、制御部970と接続される。ユーザインタフェース971は、例えば、ユーザが撮像装置960を操作するためのボタン及びスイッチなどを有する。ユーザインタフェース971は、これら構成要素を介してユーザによる操作を検出して操作信号を生成し、生成した操作信号を制御部970へ出力する。 The user interface 971 is connected to the control unit 970. The user interface 971 includes, for example, buttons and switches for the user to operate the imaging device 960. The user interface 971 detects an operation by the user via these components, generates an operation signal, and outputs the generated operation signal to the control unit 970.
 センサ972は、加速度センサ及びジャイロセンサなどのセンサ群を含み、撮像装置960の動きを表す指標を出力する。バッテリー974は、図中では省略されている電力供給ラインを介して、撮像部962、信号処理部963、画像処理部964、表示部965、メディアドライブ968、OSD969、制御部970及びセンサ972に電力を供給する。 The sensor 972 includes a sensor group such as an acceleration sensor and a gyro sensor, and outputs an index representing the movement of the imaging device 960. The battery 974 supplies power to the imaging unit 962, the signal processing unit 963, the image processing unit 964, the display unit 965, the media drive 968, the OSD 969, the control unit 970, and the sensor 972 via a power supply line that is omitted in the drawing. Supply.
 このように構成された撮像装置960において、画像処理部964は、上述した実施形態に係る画像符号化装置10の機能を有する。それにより、撮像装置960において、適用するSAOのモードと、適用するオフセット値とを決定するためのコスト計算の処理量を低減し、ひいては、撮像装置960の消費電力や回路規模を低減することが可能となる。 In the imaging device 960 configured as described above, the image processing unit 964 has the function of the image encoding device 10 according to the above-described embodiment. Thereby, in the imaging device 960, it is possible to reduce the amount of cost calculation processing for determining the SAO mode to be applied and the offset value to be applied, and thus reduce the power consumption and circuit scale of the imaging device 960. It becomes possible.
  <7-2.様々な実装レベル>
 本開示に係る技術は、例えば、システムLSI(Large Scale Integration)などのプロセッサ、複数のプロセッサを用いるモジュール、複数のモジュールを用いるユニット、ユニットにさらにその他の機能を付加したセットなどの様々な実装レベルにおいて実現されてよい。
<7-2. Various implementation levels>
The technology according to the present disclosure includes various implementation levels such as, for example, a processor such as a system LSI (Large Scale Integration), a module using a plurality of processors, a unit using a plurality of modules, and a set in which other functions are further added to the unit. May be implemented.
   (1)ビデオセット
 本開示に係る技術をセットとして実現する場合の例について、図29を参照して説明する。図29は、ビデオセットの概略的な構成の一例を示すブロック図である。
(1) Video Set An example of realizing the technology according to the present disclosure as a set will be described with reference to FIG. FIG. 29 is a block diagram illustrating an example of a schematic configuration of a video set.
 近年、電子機器は多機能化している。電子機器の開発又は製造は、個々の機能ごとに行われた後、複数の機能を統合する段階へと進む。従って、電子機器の一部のみを製造し又は販売する事業者が存在する。当該事業者は、単一の機能若しくは互いに関連する複数の機能を有する構成要素を提供し、又は統合的な機能群を有するセットを提供する。図29に示したビデオセット1300は、画像の符号化及び復号(いずれか一方でもよい)のための構成要素と、それら機能に関連する他の機能を有する構成要素とを統合的に含むセットである。 In recent years, electronic devices have become multifunctional. Development or manufacture of an electronic device is performed for each function, and then proceeds to a stage where a plurality of functions are integrated. Accordingly, there are businesses that manufacture or sell only a part of electronic devices. The operator provides a component having a single function or a plurality of functions related to each other, or provides a set having an integrated function group. The video set 1300 shown in FIG. 29 is a set that includes components for encoding and / or decoding images (which may be either) and components having other functions related to these functions. is there.
 図29を参照すると、ビデオセット1300は、ビデオモジュール1311、外部メモリ1312、パワーマネージメントモジュール1313、及びフロントエンドモジュール1314を含むモジュール群と、コネクティビティモジュール1321、カメラ1322、及びセンサ1323を含む関連機能のためのデバイス群と、を有する。 Referring to FIG. 29, the video set 1300 includes a module group including a video module 1311, an external memory 1312, a power management module 1313, and a front end module 1314, and a related function including a connectivity module 1321, a camera 1322, and a sensor 1323. A device group.
 モジュールは、互いに関連するいくつかの機能のための部品を集約することにより形成される構成要素である。モジュールは、どのような物理的構成を有していてもよい。一例として、モジュールは、同一の又は異なる機能を有する複数のプロセッサと、抵抗及びコンデンサなどの電子回路素子と、その他のデバイスとを回路基板に一体的に配置することにより形成され得る。モジュールに他のモジュール又はプロセッサなどを組合せることにより、別のモジュールが形成されてもよい。 A module is a component formed by aggregating parts for several functions related to each other. The module may have any physical configuration. As an example, the module may be formed by integrally arranging a plurality of processors having the same or different functions, electronic circuit elements such as resistors and capacitors, and other devices on a circuit board. Another module may be formed by combining another module or a processor with the module.
 図29の例では、ビデオモジュール1311において、画像処理に関する機能のための部品が集約されている。ビデオモジュール1311は、アプリケーションプロセッサ1331、ビデオプロセッサ1332、ブロードバンドモデム1333、及びベースバンドモジュール1334を有する。 In the example of FIG. 29, in the video module 1311, parts for functions related to image processing are collected. The video module 1311 includes an application processor 1331, a video processor 1332, a broadband modem 1333, and a baseband module 1334.
 プロセッサは、例えばSOC(System On a Chip)又はシステムLSI(Large Scale Integration)であってよい。SoC又はシステムLSIは、所定のロジックを実装するハードウェアを含んでもよい。また、SoC又はシステムLSIは、CPUと、当該CPUに所定の機能を実行させるためのプログラムを記憶する非一時的な有形の媒体(non-transitory tangible media)とを含んでもよい。プログラムは、例えば、ROMにより記憶され、実行時にRAM(Random Access Memory)に読み込まれた上でCPUにより実行され得る。 The processor may be, for example, an SOC (System On a Chip) or a system LSI (Large Scale Integration). The SoC or the system LSI may include hardware that implements predetermined logic. The SoC or the system LSI may include a CPU and a non-transitory tangible medium that stores a program for causing the CPU to execute a predetermined function. The program is stored in, for example, a ROM, and can be executed by the CPU after being read into a RAM (Random Access Memory) at the time of execution.
 アプリケーションプロセッサ1331は、画像処理に関するアプリケーションを実行するプロセッサである。アプリケーションプロセッサ1331において実行されるアプリケーションは、画像処理のための何らかの演算に加えて、例えばビデオプロセッサ1332及びその他の構成要素の制御を行ってもよい。ビデオプロセッサ1332は、画像の符号化及び復号に関する機能を有するプロセッサである。なお、アプリケーションプロセッサ1331及びビデオプロセッサ1332は、1つのプロセッサに一体化されてもよい(図中の点線1341参照)。 Application processor 1331 is a processor that executes an application related to image processing. An application executed in the application processor 1331 may control, for example, the video processor 1332 and other components in addition to some calculation for image processing. The video processor 1332 is a processor having functions relating to image encoding and decoding. Note that the application processor 1331 and the video processor 1332 may be integrated into one processor (see a dotted line 1341 in the figure).
 ブロードバンドモデム1333は、インターネット又は公衆交換電話網などのネットワークを介する通信に関する処理を行うモジュールである。例えば、ブロードバンドモデム1333は、送信データを含むデジタル信号をアナログ信号に変換するためのデジタル変調、及び受信データを含むアナログ信号をデジタル信号に変換するためのデジタル復調を実行する。ブロードバンドモデム1333により処理される送信データ及び受信データは、例えば、画像データ、画像データの符号化ストリーム、アプリケーションデータ、アプリケーションプログラム及び設定データなどの任意の情報を含み得る。 The broadband modem 1333 is a module that performs processing related to communication via a network such as the Internet or a public switched telephone network. For example, the broadband modem 1333 performs digital modulation for converting a digital signal including transmission data into an analog signal, and digital demodulation for converting an analog signal including reception data into a digital signal. Transmission data and reception data processed by the broadband modem 1333 may include arbitrary information such as image data, an encoded stream of image data, application data, an application program, and setting data, for example.
 ベースバンドモジュール1334は、フロントエンドモジュール1314を介して送受信されるRF(Radio Frequency)信号のためのベースバンド処理を行うモジュールである。例えば、ベースバンドモジュール1334は、送信データを含む送信ベースバンド信号を変調し及びRF信号へと周波数変換して、RF信号をフロントエンドモジュール1314へ出力する。また、ベースバンドモジュール1334は、フロントエンドモジュール1314から入力されるRF信号を周波数変換し及び復調して、受信データを含む受信ベースバンド信号を生成する。 The baseband module 1334 is a module that performs baseband processing for an RF (Radio Frequency) signal transmitted / received via the front end module 1314. For example, the baseband module 1334 modulates a transmission baseband signal including transmission data, converts the frequency into an RF signal, and outputs the RF signal to the front end module 1314. In addition, the baseband module 1334 frequency-converts and demodulates the RF signal input from the front end module 1314 to generate a reception baseband signal including reception data.
 外部メモリ1312は、ビデオモジュール1311の外部に設けられる、ビデオモジュール1311からアクセス可能なメモリデバイスである。多数のフレームを含む映像データのような大規模データが外部メモリ1312に格納される場合、外部メモリ1312は、例えばDRAM(Dynamic Random Access Memory)のような比較的安価で大容量の半導体メモリを含み得る。 The external memory 1312 is a memory device provided outside the video module 1311 and accessible from the video module 1311. When large-scale data such as video data including a large number of frames is stored in the external memory 1312, the external memory 1312 includes a relatively inexpensive and large-capacity semiconductor memory such as a DRAM (Dynamic Random Access Memory). obtain.
 パワーマネージメントモジュール1313は、ビデオモジュール1311及びフロントエンドモジュール1314への電力供給を制御するモジュールである。 The power management module 1313 is a module that controls power supply to the video module 1311 and the front end module 1314.
 フロントエンドモジュール1314は、ベースバンドモジュール1334に接続され、フロントエンド機能を提供するモジュールである。図29の例において、フロントエンドモジュール1314は、アンテナ部1351、フィルタ1352及び増幅部1353を有する。アンテナ部1351は、無線信号を送信し又は受信する1つ以上のアンテナ素子と、アンテナスイッチなどの関連する構成要素とを有する。アンテナ部1351は、増幅部1353により増幅されるRF信号を無線信号として送信する。また、アンテナ部1351は、無線信号として受信されるRF信号をフィルタ1352へ出力し、当該RF信号をフィルタ1352にフィルタリングさせる。 The front end module 1314 is a module that is connected to the baseband module 1334 and provides a front end function. In the example of FIG. 29, the front end module 1314 includes an antenna unit 1351, a filter 1352, and an amplification unit 1353. The antenna unit 1351 includes one or more antenna elements that transmit or receive radio signals and related components such as an antenna switch. The antenna unit 1351 transmits the RF signal amplified by the amplification unit 1353 as a radio signal. Further, the antenna unit 1351 outputs an RF signal received as a radio signal to the filter 1352 and causes the filter 1352 to filter the RF signal.
 コネクティビティモジュール1321は、ビデオセット1300の外部接続に関する機能を有するモジュールである。コネクティビティモジュール1321は、任意の外部接続プロトコルをサポートしてよい。例えば、コネクティビティモジュール1321は、Bluetooth(登録商標)、IEEE802.11(例えばWi-Fi(登録商標))、NFC(Near Field Communication)又はIrDA(InfraRed Data Association)などの無線接続プロトコルをサポートするサブモジュールと、対応するアンテナとを有していてもよい。また、コネクティビティモジュール1321は、USB(Universal Serial Bus)又はHDMI(登録商標)(High-Definition Multimedia Interface)などの有線接続プロトコルをサポートするサブモジュールと、対応する接続端子とを有していてもよい。 The connectivity module 1321 is a module having a function related to the external connection of the video set 1300. The connectivity module 1321 may support any external connection protocol. For example, the connectivity module 1321 is a sub-module that supports a wireless connection protocol such as Bluetooth (registered trademark), IEEE 802.11 (for example, Wi-Fi (registered trademark)), NFC (Near Field Communication), or IrDA (InfraRed Data Association). And a corresponding antenna. In addition, the connectivity module 1321 may include a sub module that supports a wired connection protocol such as USB (Universal Serial Bus) or HDMI (registered trademark) (High-Definition Multimedia Interface) and a corresponding connection terminal. .
 また、コネクティビティモジュール1321は、磁気ディスク、光ディスク、光磁気ディスク、若しくは半導体メモリなどの記憶媒体、又はSSD(Solid State Drive)若しくはNAS(Network Attached Storage)などのストレージデバイスへのデータの書込み及び当該記憶媒体からのデータの読出しを行うドライブを含んでもよい。コネクティビティモジュール1321は、これら記憶媒体又はストレージデバイスを含んでもよい。また、コネクティビティモジュール1321は、画像を出力するディスプレイ又は音声を出力するスピーカへの接続性を提供してもよい。 In addition, the connectivity module 1321 writes and stores data to a storage medium such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, or a storage device such as an SSD (Solid State Drive) or NAS (Network Attached Storage). A drive for reading data from the medium may be included. The connectivity module 1321 may include these storage media or storage devices. In addition, the connectivity module 1321 may provide connectivity to a display that outputs an image or a speaker that outputs sound.
 カメラ1322は、被写体を撮像することにより撮像画像を取得するモジュールである。カメラ1322により取得される一連の撮像画像は、映像データを構成する。カメラ1322により生成される映像データは、例えば、必要に応じてビデオプロセッサ1332により符号化され、外部メモリ1312により又はコネクティビティモジュール1321に接続される記憶媒体により記憶され得る。 The camera 1322 is a module that acquires a captured image by imaging a subject. A series of captured images acquired by the camera 1322 constitutes video data. Video data generated by the camera 1322 may be encoded by the video processor 1332 as necessary and stored by the external memory 1312 or a storage medium connected to the connectivity module 1321, for example.
 センサ1323は、例えば、GPSセンサ、音声センサ、超音波センサ、光センサ、照度センサ、赤外線センサ、角速度センサ、角加速度センサ、速度センサ、加速度センサ、ジャイロセンサ、地磁気センサ、衝撃センサ及び温度センサのうちの1つ以上を含み得るモジュールである。センサ1323により生成されるセンサデータは、例えば、アプリケーションプロセッサ1331によりアプリケーションの実行のために利用され得る。 The sensor 1323 is, for example, a GPS sensor, an audio sensor, an ultrasonic sensor, an optical sensor, an illuminance sensor, an infrared sensor, an angular velocity sensor, an angular acceleration sensor, a velocity sensor, an acceleration sensor, a gyro sensor, a geomagnetic sensor, an impact sensor, or a temperature sensor. A module that may include one or more of them. The sensor data generated by the sensor 1323 can be used by the application processor 1331 to execute an application, for example.
 このように構成されたビデオセット1300において、本開示に係る技術は、例えば、ビデオプロセッサ1332において利用され得る。この場合、ビデオセット1300は、本開示に係る技術を適用したセットとなる。 In the video set 1300 configured as described above, the technology according to the present disclosure can be used in the video processor 1332, for example. In this case, the video set 1300 is a set to which the technology according to the present disclosure is applied.
 なお、ビデオセット1300は、画像データを処理する様々な種類の装置として実現されてよい。例えば、ビデオセット1300は、図26~図28を用いて説明した携帯電話機920、記録再生装置940又は撮像装置960に相当してもよい。 Note that the video set 1300 may be realized as various types of devices that process image data. For example, the video set 1300 may correspond to the mobile phone 920, the recording / reproducing device 940, or the imaging device 960 described with reference to FIGS.
   (2)ビデオプロセッサ
 図30は、ビデオプロセッサ1332の概略的な構成の一例を示すブロック図である。ビデオプロセッサ1332は、入力映像信号及び入力音声信号をそれぞれ符号化して映像データ及び音声データを生成する機能と、符号化された映像データ及び音声データを復号して出力映像信号及び出力音声信号を生成する機能と、を有する。
(2) Video Processor FIG. 30 is a block diagram illustrating an example of a schematic configuration of the video processor 1332. The video processor 1332 encodes an input video signal and an input audio signal to generate video data and audio data, and decodes the encoded video data and audio data to generate an output video signal and an output audio signal. And a function to perform.
 図30を参照すると、ビデオプロセッサ1332は、ビデオ入力処理部1401、第1スケーリング部1402、第2スケーリング部1403、ビデオ出力処理部1404、フレームメモリ1405、メモリ制御部1406、エンコード・デコードエンジン1407、ビデオES(Elementary Stream)バッファ1408A及び1408B、オーディオESバッファ1409A及び1409B、オーディオエンコーダ1410、オーディオデコーダ1411、多重化部(MUX)1412、逆多重化部(DEMUX)1413、並びに、ストリームバッファ1414を有する。 Referring to FIG. 30, the video processor 1332 includes a video input processing unit 1401, a first scaling unit 1402, a second scaling unit 1403, a video output processing unit 1404, a frame memory 1405, a memory control unit 1406, an encoding / decoding engine 1407, Video ES (Elementary Stream) buffers 1408A and 1408B, audio ES buffers 1409A and 1409B, an audio encoder 1410, an audio decoder 1411, a multiplexing unit (MUX) 1412, a demultiplexing unit (DEMUX) 1413, and a stream buffer 1414 .
 ビデオ入力処理部1401は、例えばコネクティビティモジュール1321から入力された映像信号をデジタル画像データに変換する。第1スケーリング部1402は、ビデオ入力処理部1401から入力される画像データについてフォーマット変換及びスケーリング(拡大/縮小)を行う。第2スケーリング部1403は、ビデオ出力処理部1404へ出力される画像データについてのフォーマット変換及びスケーリング(拡大/縮小)を行う。第1スケーリング部1402及び第2スケーリング部1403におけるフォーマット変換は、例えば、4:2:2/Y-Cb-Cr方式と4:2:0/Y-Cb-Cr方式との間の変換などであってよい。ビデオ出力処理部1404は、デジタル画像データを出力映像信号に変換し、出力映像信号を例えばコネクティビティモジュール1321へ出力する。 The video input processing unit 1401 converts, for example, a video signal input from the connectivity module 1321 into digital image data. The first scaling unit 1402 performs format conversion and scaling (enlargement / reduction) on the image data input from the video input processing unit 1401. The second scaling unit 1403 performs format conversion and scaling (enlargement / reduction) on the image data output to the video output processing unit 1404. The format conversion in the first scaling unit 1402 and the second scaling unit 1403 is, for example, conversion between 4: 2: 2 / Y-Cb-Cr system and 4: 2: 0 / Y-Cb-Cr system. It may be. The video output processing unit 1404 converts the digital image data into an output video signal and outputs the output video signal to, for example, the connectivity module 1321.
 フレームメモリ1405は、ビデオ入力処理部1401、第1スケーリング部1402、第2スケーリング部1403、ビデオ出力処理部1404、及びエンコード・デコードエンジン1407によって共用される、画像データを記憶するメモリデバイスである。フレームメモリ1405は、例えばDRAMなどの半導体メモリを用いて実現されてよい。 The frame memory 1405 is a memory device that stores image data shared by the video input processing unit 1401, the first scaling unit 1402, the second scaling unit 1403, the video output processing unit 1404, and the encoding / decoding engine 1407. The frame memory 1405 may be realized using a semiconductor memory such as a DRAM, for example.
 メモリ制御部1406は、エンコード・デコードエンジン1407から入力される同期信号に基づき、アクセス管理テーブル1406Aに記憶されるフレームメモリ1405についてのアクセススケジュールに従って、フレームメモリ1405へのアクセスを制御する。アクセス管理テーブル1406Aは、エンコード・デコードエンジン1407、第1スケーリング部1402及び第2スケーリング部1403などにおいて実行される処理に依存し、メモリ制御部1406により更新される。 The memory control unit 1406 controls access to the frame memory 1405 according to the access schedule for the frame memory 1405 stored in the access management table 1406A based on the synchronization signal input from the encode / decode engine 1407. The access management table 1406A is updated by the memory control unit 1406 depending on processing executed in the encoding / decoding engine 1407, the first scaling unit 1402, the second scaling unit 1403, and the like.
 エンコード・デコードエンジン1407は、画像データを符号化して符号化映像ストリームを生成するためのエンコード処理、並びに、符号化映像ストリームから画像データを復号するためのデコード処理を行う。例えば、エンコード・デコードエンジン1407は、フレームメモリ1405から読み出した画像データを符号化し、符号化映像ストリームをビデオESバッファ1408Aに順次書き込む。また、例えば、ビデオESバッファ1408Bから符号化映像ストリームを順次読み出し、復号した画像データをフレームメモリ1405に書き込む。エンコード・デコードエンジン1407は、これら処理において、フレームメモリ1405を作業領域として使用し得る。エンコード・デコードエンジン1407は、例えば、各LCU(Largest Coding Unit)の処理を開始するタイミングで、メモリ制御部1406へ同期信号を出力する。 The encoding / decoding engine 1407 performs an encoding process for encoding image data to generate an encoded video stream, and a decoding process for decoding image data from the encoded video stream. For example, the encoding / decoding engine 1407 encodes the image data read from the frame memory 1405 and sequentially writes the encoded video stream to the video ES buffer 1408A. Also, for example, the encoded video stream is sequentially read from the video ES buffer 1408B, and the decoded image data is written in the frame memory 1405. The encoding / decoding engine 1407 can use the frame memory 1405 as a work area in these processes. For example, the encoding / decoding engine 1407 outputs a synchronization signal to the memory control unit 1406 at the timing of starting processing of each LCU (Largest Coding Unit).
 ビデオESバッファ1408Aは、エンコード・デコードエンジン1407によって生成された符号化映像ストリームをバッファリングする。ビデオESバッファ1408Aによりバッファリングされる符号化映像ストリームは、多重化部1412へ出力される。ビデオESバッファ1408Bは、逆多重化部1413から入力される符号化映像ストリームをバッファリングする。ビデオESバッファ1408Bによりバッファリングされる符号化映像ストリームは、エンコード・デコードエンジン1407へ出力される。 The video ES buffer 1408A buffers the encoded video stream generated by the encoding / decoding engine 1407. The encoded video stream buffered by the video ES buffer 1408A is output to the multiplexing unit 1412. The video ES buffer 1408B buffers the encoded video stream input from the demultiplexer 1413. The encoded video stream buffered by the video ES buffer 1408B is output to the encoding / decoding engine 1407.
 オーディオESバッファ1409Aは、オーディオエンコーダ1410によって生成された符号化音声ストリームをバッファリングする。オーディオESバッファ1409Aによりバッファリングされる符号化音声ストリームは、多重化部1412へ出力される。オーディオESバッファ1409Bは、逆多重化部1413から入力される符号化音声ストリームをバッファリングする。オーディオESバッファ1409Bによりバッファリングされる符号化音声ストリームは、オーディオデコーダ1411へ出力される。 The audio ES buffer 1409A buffers the encoded audio stream generated by the audio encoder 1410. The encoded audio stream buffered by the audio ES buffer 1409A is output to the multiplexing unit 1412. The audio ES buffer 1409B buffers the encoded audio stream input from the demultiplexer 1413. The encoded audio stream buffered by the audio ES buffer 1409B is output to the audio decoder 1411.
 オーディオエンコーダ1410は、例えばコネクティビティモジュール1321から入力される入力音声信号をデジタル変換し、例えばMPEGオーディオ方式又はAC3(Audio Code number 3)方式などの音声符号化方式に従って入力音声信号を符号化する。オーディオエンコーダ1410は、符号化音声ストリームをオーディオESバッファ1409Aに順次書き込む。オーディオデコーダ1411は、オーディオESバッファ1409Bから入力される符号化音声ストリームから音声データを復号し、アナログ信号へ変換する。オーディオデコーダ1411は、再生されたアナログ音声信号として、例えばコネクティビティモジュール1321へ音声信号を出力する。 The audio encoder 1410 digitally converts the input audio signal input from the connectivity module 1321, for example, and encodes the input audio signal according to an audio encoding method such as an MPEG audio method or an AC3 (Audio Code number 3) method. The audio encoder 1410 sequentially writes the encoded audio stream to the audio ES buffer 1409A. The audio decoder 1411 decodes audio data from the encoded audio stream input from the audio ES buffer 1409B and converts it into an analog signal. The audio decoder 1411 outputs an audio signal to the connectivity module 1321, for example, as a reproduced analog audio signal.
 多重化部1412は、符号化映像ストリームと符号化音声ストリームとを多重化して、多重化ビットストリームを生成する。多重化ビットストリームのフォーマットは、いかなるフォーマットであってもよい。多重化部1412は、所定のヘッダ情報をビットストリームに付加してもよい。また、多重化部1412は、ストリームのフォーマットを変換してもよい。例えば、多重化部1412は、符号化映像ストリームと符号化音声ストリームとが多重化されたトランスポートストリーム(転送用フォーマットのビットストリーム)を生成し得る。また、多重化部1412は、符号化映像ストリームと符号化音声ストリームとが多重化されたファイルデータ(記録用フォーマットのデータ)を生成し得る。 The multiplexing unit 1412 multiplexes the encoded video stream and the encoded audio stream to generate a multiplexed bit stream. The format of the multiplexed bit stream may be any format. The multiplexing unit 1412 may add predetermined header information to the bit stream. Further, the multiplexing unit 1412 may convert the stream format. For example, the multiplexing unit 1412 can generate a transport stream (a bit stream in a transfer format) in which an encoded video stream and an encoded audio stream are multiplexed. Further, the multiplexing unit 1412 can generate file data (recording format data) in which the encoded video stream and the encoded audio stream are multiplexed.
 逆多重化部1413は、多重化部1412による多重化とは逆の手法で、多重化ビットストリームから符号化映像ストリーム及び符号化音声ストリームを逆多重化する。即ち、逆多重化部1413は、ストリームバッファ1414から読み出されるビットストリームから映像ストリームと音声ストリームとを抽出(又は分離)する。逆多重化部1413は、ストリームのフォーマットを変換(逆変換)してもよい。例えば、逆多重化部1413は、コネクティビティモジュール1321又はブロードバンドモデム1333から入力され得るトランスポートストリームをストリームバッファ1414を介して取得し、当該トランスポートストリームを映像ストリームと音声ストリームとに変換してもよい。また、逆多重化部1413は、コネクティビティモジュール1321により記憶媒体から読み出されるファイルデータをストリームバッファ1414を介して取得し、当該ファイルデータを映像ストリームと音声ストリームとに変換してもよい。 The demultiplexing unit 1413 demultiplexes the encoded video stream and the encoded audio stream from the multiplexed bit stream by a method reverse to the multiplexing performed by the multiplexing unit 1412. That is, the demultiplexer 1413 extracts (or separates) the video stream and the audio stream from the bit stream read from the stream buffer 1414. The demultiplexer 1413 may convert the stream format (inverse conversion). For example, the demultiplexing unit 1413 may acquire a transport stream that can be input from the connectivity module 1321 or the broadband modem 1333 via the stream buffer 1414, and convert the transport stream into a video stream and an audio stream. . Further, the demultiplexing unit 1413 may acquire file data read from the storage medium by the connectivity module 1321 via the stream buffer 1414 and convert the file data into a video stream and an audio stream.
 ストリームバッファ1414は、ビットストリームをバッファリングする。例えば、ストリームバッファ1414は、多重化部1412から入力されるトランスポートストリームをバッファリングし、所定のタイミングで又は外部からの要求に応じて、例えばコネクティビティモジュール1321又はブロードバンドモデム1333へトランスポートストリームを出力する。また、例えば、ストリームバッファ1414は、多重化部1412から入力されるファイルデータをバッファリングし、所定のタイミングで又は外部からの要求に応じて、例えばコネクティビティモジュール1321へ、当該ファイルデータを記録のために出力する。さらに、ストリームバッファ1414は、例えばコネクティビティモジュール1321又はブロードバンドモデム1333を介して取得されるトランスポートストリームをバッファリングし、所定のタイミングで又は外部からの要求に応じて、当該トランスポートストリームを逆多重化部1413へ出力する。また、ストリームバッファ1414は、例えばコネクティビティモジュール1321により記憶媒体から読み出されたファイルデータをバッファリングし、所定のタイミングで又は外部からの要求に応じて、当該ファイルデータを逆多重化部1413へ出力する。 Stream buffer 1414 buffers the bit stream. For example, the stream buffer 1414 buffers the transport stream input from the multiplexing unit 1412 and outputs the transport stream to, for example, the connectivity module 1321 or the broadband modem 1333 at a predetermined timing or in response to an external request. To do. Further, for example, the stream buffer 1414 buffers the file data input from the multiplexing unit 1412 and records the file data to the connectivity module 1321, for example, at a predetermined timing or in response to an external request. Output to. Further, the stream buffer 1414 buffers a transport stream acquired through, for example, the connectivity module 1321 or the broadband modem 1333, and demultiplexes the transport stream at a predetermined timing or in response to an external request. Output to the unit 1413. Also, the stream buffer 1414 buffers file data read from the storage medium by the connectivity module 1321, for example, and outputs the file data to the demultiplexing unit 1413 at a predetermined timing or in response to an external request. To do.
 このように構成されたビデオプロセッサ1332において、本開示に係る技術は、例えば、エンコード・デコードエンジン1407において利用され得る。この場合、ビデオプロセッサ1332は、本開示に係る技術を適用したチップ又はモジュールとなる。 In the video processor 1332 configured as described above, the technology according to the present disclosure can be used in the encode / decode engine 1407, for example. In this case, the video processor 1332 is a chip or a module to which the technology according to the present disclosure is applied.
 図31は、ビデオプロセッサ1332の概略的な構成の他の例を示すブロック図である。図31の例において、ビデオプロセッサ1332は、映像データを所定の方式で符号化し及び復号する機能を有する。 FIG. 31 is a block diagram showing another example of a schematic configuration of the video processor 1332. In the example of FIG. 31, the video processor 1332 has a function of encoding and decoding video data by a predetermined method.
 図31を参照すると、ビデオプロセッサ1332は、制御部1511、ディスプレイインタフェース1512、ディスプレイエンジン1513、画像処理エンジン1514、内部メモリ1515、コーデックエンジン1516、メモリインタフェース1517、多重化/逆多重化部1518、ネットワークインタフェース1519、及びビデオインタフェース1520を有する。 Referring to FIG. 31, the video processor 1332 includes a control unit 1511, a display interface 1512, a display engine 1513, an image processing engine 1514, an internal memory 1515, a codec engine 1516, a memory interface 1517, a multiplexing / demultiplexing unit 1518, a network. An interface 1519 and a video interface 1520 are included.
 制御部1511は、ディスプレイインタフェース1512、ディスプレイエンジン1513、画像処理エンジン1514、及びコーデックエンジン1516などの、ビデオプロセッサ1332内の様々な処理部の動作を制御する。制御部1511は、例えば、メインCPU1531、サブCPU1532及びシステムコントローラ1533を有する。メインCPU1531は、ビデオプロセッサ1332内の各処理部の動作を制御するためのプログラムを実行する。メインCPU1531は、プログラムの実行を通じて生成される制御信号を各処理部に供給する。サブCPU1532は、メインCPU1531の補助的な役割を果たす。例えば、サブCPU1532は、メインCPU1531が実行するプログラムの子プロセス及びサブルーチンを実行する。システムコントローラ1533は、メインCPU1531及びサブCPU1532によるプログラムの実行を管理する。 The control unit 1511 controls operations of various processing units in the video processor 1332 such as the display interface 1512, the display engine 1513, the image processing engine 1514, and the codec engine 1516. The control unit 1511 includes, for example, a main CPU 1531, a sub CPU 1532, and a system controller 1533. The main CPU 1531 executes a program for controlling the operation of each processing unit in the video processor 1332. The main CPU 1531 supplies a control signal generated through execution of the program to each processing unit. The sub CPU 1532 plays an auxiliary role of the main CPU 1531. For example, the sub CPU 1532 executes a child process and a subroutine of a program executed by the main CPU 1531. The system controller 1533 manages execution of programs by the main CPU 1531 and the sub CPU 1532.
 ディスプレイインタフェース1512は、制御部1511による制御の下、画像データを例えばコネクティビティモジュール1321へ出力する。例えば、ディスプレイインタフェース1512は、デジタル画像データから変換されるアナログ画像信号又はデジタル画像データそのものを、コネクティビティモジュール1321に接続されるディスプレイへ出力する。ディスプレイエンジン1513は、制御部1511による制御の下、画像データの属性が出力先のディスプレイの仕様に適合するように、画像データについてのフォーマット変換、サイズ変換及び色域変換などを実行する。画像処理エンジン1514は、制御部1511による制御の下、画像データについて、画質改善などの目的を有するフィルタリング処理を含み得る画像処理を実行する。 The display interface 1512 outputs the image data to, for example, the connectivity module 1321 under the control of the control unit 1511. For example, the display interface 1512 outputs an analog image signal converted from digital image data or the digital image data itself to a display connected to the connectivity module 1321. Under the control of the control unit 1511, the display engine 1513 executes format conversion, size conversion, color gamut conversion, and the like for the image data so that the attributes of the image data match the specifications of the output display. The image processing engine 1514 performs image processing that may include filtering processing having an object such as image quality improvement on the image data under the control of the control unit 1511.
 内部メモリ1515は、ディスプレイエンジン1513、画像処理エンジン1514、及びコーデックエンジン1516により共用される、ビデオプロセッサ1332の内部に設けられるメモリデバイスである。内部メモリ1515は、例えば、ディスプレイエンジン1513、画像処理エンジン1514、及びコーデックエンジン1516の間で画像データを入出力する際に利用される。内部メモリ1515は、いかなる種類のメモリデバイスであってもよい。例えば、内部メモリ1515は、ブロック単位の画像データ及び関連するパラメータを記憶するための、比較的小さいメモリサイズを有していてもよい。内部メモリ1515は、例えばSRAM(Static Random Access Memory)のような(例えば、外部メモリ1312に対して相対的に)小容量だが応答速度の速いメモリであってもよい。 The internal memory 1515 is a memory device provided inside the video processor 1332 that is shared by the display engine 1513, the image processing engine 1514, and the codec engine 1516. The internal memory 1515 is used when inputting / outputting image data among the display engine 1513, the image processing engine 1514, and the codec engine 1516, for example. The internal memory 1515 may be any type of memory device. For example, the internal memory 1515 may have a relatively small memory size for storing block unit image data and associated parameters. The internal memory 1515 may be a memory having a small capacity but a fast response speed such as SRAM (Static Random Access Memory) (for example, relative to the external memory 1312).
 コーデックエンジン1516は、画像データを符号化して符号化映像ストリームを生成するためのエンコード処理、並びに、符号化映像ストリームから画像データを復号するためのデコード処理を行う。コーデックエンジン1516によりサポートされる画像符号化方式は、任意の1つ又は複数の方式であってよい。図31の例において、コーデックエンジン1516は、MPEG-2 Video用ブロック1541、AVC/H.264用ブロック1542、HEVC/H.265用ブロック1543、HEVC/H.265(スケーラブル)用ブロック1544、HEVC/H.265(マルチビュー)用ブロック1545、及びMPEG-DASH用ブロック1551を有する。これら機能ブロックは、それぞれ、対応する画像符号化方式に従って画像データを符号化し及び復号する。 The codec engine 1516 performs an encoding process for encoding image data to generate an encoded video stream, and a decoding process for decoding image data from the encoded video stream. The image encoding scheme supported by the codec engine 1516 may be any one or a plurality of schemes. In the example of FIG. 31, the codec engine 1516 includes an MPEG-2 Video block 1541, an AVC / H. H.264 block 1542, HEVC / H. H.265 block 1543, HEVC / H. 265 (scalable) block 1544, HEVC / H. 265 (multi-view) block 1545 and MPEG-DASH block 1551. Each of these functional blocks encodes and decodes image data according to a corresponding image encoding method.
 MPEG-DASH用ブロック1551は、画像データをMPEG-DASH方式に従って伝送することを可能とするための機能ブロックである。MPEG-DASH用ブロック1551は、標準仕様に準拠するストリームの生成、及び生成したストリームの伝送の制御を実行する。伝送される画像データの符号化及び復号は、コーデックエンジン1516に含まれる他の機能ブロックにより実行されてよい。 The MPEG-DASH block 1551 is a functional block that enables image data to be transmitted according to the MPEG-DASH system. The MPEG-DASH block 1551 executes generation of a stream conforming to the standard specification and control of transmission of the generated stream. The encoding and decoding of the image data to be transmitted may be performed by other functional blocks included in the codec engine 1516.
 メモリインタフェース1517は、ビデオプロセッサ1332を外部メモリ1312と接続するためのインタフェースである。画像処理エンジン1514又はコーデックエンジン1516により生成されるデータは、メモリインタフェース1517を介して外部メモリ1312へ出力される。また、外部メモリ1312から入力されるデータは、メモリインタフェース1517を介して画像処理エンジン1514又はコーデックエンジン1516へ供給される。 The memory interface 1517 is an interface for connecting the video processor 1332 to the external memory 1312. Data generated by the image processing engine 1514 or the codec engine 1516 is output to the external memory 1312 via the memory interface 1517. Data input from the external memory 1312 is supplied to the image processing engine 1514 or the codec engine 1516 via the memory interface 1517.
 多重化/逆多重化部1518は、符号化映像ストリーム及び関連するビットストリームの多重化及び逆多重化を行う。多重化の際に、多重化/逆多重化部1518は、多重化ストリームに所定のヘッダ情報を付加してもよい。また、逆多重化の際に、多重化/逆多重化部1518は、分離された個々のストリームに所定のヘッダ情報を付加してもよい。即ち、多重化/逆多重化部1518は、多重化又は逆多重化と共にフォーマット変換を実行し得る。例えば、多重化/逆多重化部1518は、複数のビットストリームと転送用フォーマットを有する多重化ストリームであるトランスポートストリームとの間の変換及び逆変換、並びに、複数のビットストリームと記録用フォーマットを有するファイルデータとの間の変換及び逆変換をサポートしてもよい。 The multiplexing / demultiplexing unit 1518 multiplexes and demultiplexes the encoded video stream and the related bit stream. At the time of multiplexing, the multiplexing / demultiplexing unit 1518 may add predetermined header information to the multiplexed stream. Also, at the time of demultiplexing, the multiplexing / demultiplexing unit 1518 may add predetermined header information to each separated stream. That is, the multiplexing / demultiplexing unit 1518 can perform format conversion together with multiplexing or demultiplexing. For example, the multiplexing / demultiplexing unit 1518 performs conversion and inverse conversion between a plurality of bit streams and a transport stream, which is a multiplexed stream having a transfer format, and a plurality of bit streams and a recording format. You may support conversion and reverse conversion to and from file data.
 ネットワークインタフェース1519は、例えば、ビデオプロセッサ1332をブロードバンドモデム1333又はコネクティビティモジュール1321へ接続するためのインタフェースである。ビデオインタフェース1520は、例えば、ビデオプロセッサ1332をコネクティビティモジュール1321又はカメラ1322へ接続するためのインタフェースである。 The network interface 1519 is an interface for connecting the video processor 1332 to the broadband modem 1333 or the connectivity module 1321, for example. The video interface 1520 is an interface for connecting the video processor 1332 to the connectivity module 1321 or the camera 1322, for example.
 このように構成されたビデオプロセッサ1332において、本開示に係る技術は、例えば、コーデックエンジン1516において利用され得る。この場合、ビデオプロセッサ1332は、本開示に係る技術を適用したチップ又はモジュールとなる。 In the video processor 1332 configured as described above, the technology according to the present disclosure may be used in, for example, the codec engine 1516. In this case, the video processor 1332 is a chip or a module to which the technology according to the present disclosure is applied.
 なお、ビデオプロセッサ1332の構成は、上述した2つの例に限定されない。例えば、ビデオプロセッサ1332は、1つの半導体チップとして実現されてもよく、又は複数の半導体チップとして実現されてもよい。また、ビデオプロセッサ1332は、複数の半導体を積層することにより形成される3次元積層LSI、又は複数のLSIの組合せとして実現されてもよい。 Note that the configuration of the video processor 1332 is not limited to the two examples described above. For example, the video processor 1332 may be realized as a single semiconductor chip, or may be realized as a plurality of semiconductor chips. Further, the video processor 1332 may be realized as a three-dimensional stacked LSI formed by stacking a plurality of semiconductors, or a combination of a plurality of LSIs.
 <<8.むすび>>
 以上、図1~図31を参照して、本開示の各実施形態に係る画像符号化装置について詳細に説明した。
<< 8. Conclusion >>
Heretofore, the image encoding device according to each embodiment of the present disclosure has been described in detail with reference to FIGS. 1 to 31.
 なお、本開示に係る技術は、スケーラブル符号化技術に応用されてもよい。HEVCのスケーラブル符号化技術を、SHVC(Scalable HEVC)ともいう。例えば、上述した実施形態は、マルチレイヤの符号化ストリームに含まれる個々のレイヤ(ベースレイヤ及びエンハンスメントレイヤ)に適用可能である。決定されたSAOのモードやオフセット値に関する情報は、レイヤごとに生成され符号化されてもよく、又はレイヤ間で再利用されてもよい。また、本開示に係る技術は、マルチビュー符号化技術に応用されてもよい。例えば、上述した実施形態は、マルチビューの符号化ストリームに含まれる個々のビュー(ベースビュー及びノンベースビュー)に適用可能である。決定されたSAOのモードやオフセット値に関する情報は、ビューごとに生成され符号化されてもよく、又はビュー間で再利用されてもよい。 Note that the technique according to the present disclosure may be applied to a scalable coding technique. HEVC scalable coding technology is also referred to as SHVC (Scalable HEVC). For example, the above-described embodiments can be applied to individual layers (base layer and enhancement layer) included in a multi-layer encoded stream. Information regarding the determined SAO mode and offset value may be generated and encoded for each layer, or may be reused between layers. Further, the technology according to the present disclosure may be applied to a multi-view encoding technology. For example, the above-described embodiments can be applied to individual views (base view and non-base view) included in a multi-view encoded stream. Information regarding the determined SAO mode and offset value may be generated and encoded for each view, or may be reused between views.
 本明細書に記述したCU、PU及びTUとの用語は、HEVCにおいて、個々のブロックに関連付けられるシンタックスをも含む論理的な単位を意味する。画像の一部分としての個々のブロックのみに着目する場合、これらは、CB(Coding Block)、PB(Prediction Block)及びTB(Transform Block)との用語にそれぞれ置き換えられてもよい。CBは、CTB(Coding Tree Block)を四分木(Quad-Tree)状に階層的に分割することにより形成される。1つの四分木の全体がCTBに相当し、CTBに対応する論理的な単位はCTU(Coding Tree Unit)と呼ばれる。 The terms CU, PU, and TU described in this specification mean a logical unit that also includes syntax associated with individual blocks in HEVC. When focusing only on individual blocks as a part of an image, these may be replaced by the terms CB (Coding Block), PB (Prediction Block), and TB (Transform Block), respectively. The CB is formed by hierarchically dividing a CTB (Coding Tree Block) into a quad-tree shape. An entire quadtree corresponds to CTB, and a logical unit corresponding to CTB is called CTU (Coding Tree Unit).
 また、本明細書では、決定されたSAOのモードやオフセット値に関する情報が、符号化ストリームのヘッダに多重化されて、符号化側から復号側へ伝送される例について主に説明した。しかしながら、これら情報を伝送する手法はかかる例に限定されない。例えば、これら情報は、符号化ビットストリームに多重化されることなく、符号化ビットストリームと関連付けられた別個のデータとして伝送され又は記録されてもよい。ここで、「関連付ける」という用語は、ビットストリームに含まれる画像(スライス若しくはブロックなど、画像の一部であってもよい)と当該画像に対応する情報とを復号時にリンクさせ得るようにすることを意味する。即ち、情報は、画像(又はビットストリーム)とは別の伝送路上で伝送されてもよい。また、情報は、画像(又はビットストリーム)とは別の記録媒体(又は同一の記録媒体の別の記録エリア)に記録されてもよい。さらに、情報と画像(又はビットストリーム)とは、例えば、複数フレーム、1フレーム、又はフレーム内の一部分などの任意の単位で互いに関連付けられてよい。 Also, in this specification, an example in which information regarding the determined SAO mode and offset value is multiplexed in the header of the encoded stream and transmitted from the encoding side to the decoding side has been mainly described. However, the method for transmitting such information is not limited to such an example. For example, these pieces of information may be transmitted or recorded as separate data associated with the encoded bitstream without being multiplexed into the encoded bitstream. Here, the term “associate” means that an image (which may be a part of an image such as a slice or a block) included in the bitstream and information corresponding to the image can be linked at the time of decoding. Means. That is, information may be transmitted on a transmission path different from that of the image (or bit stream). Information may be recorded on a recording medium (or another recording area of the same recording medium) different from the image (or bit stream). Furthermore, the information and the image (or bit stream) may be associated with each other in an arbitrary unit such as a plurality of frames, one frame, or a part of the frame.
 以上、添付図面を参照しながら本開示の好適な実施形態について詳細に説明したが、本開示の技術的範囲はかかる例に限定されない。本開示の技術分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本開示の技術的範囲に属するものと了解される。 The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the technical scope of the present disclosure is not limited to such examples. It is obvious that a person having ordinary knowledge in the technical field of the present disclosure can come up with various changes or modifications within the scope of the technical idea described in the claims. Of course, it is understood that it belongs to the technical scope of the present disclosure.
 また、本明細書に記載された効果は、あくまで説明的または例示的なものであって限定的ではない。つまり、本開示に係る技術は、上記の効果とともに、または上記の効果に代えて、本明細書の記載から当業者には明らかな他の効果を奏しうる。 In addition, the effects described in this specification are merely illustrative or illustrative, and are not limited. That is, the technology according to the present disclosure can exhibit other effects that are apparent to those skilled in the art from the description of the present specification in addition to or instead of the above effects.
 なお、以下のような構成も本開示の技術的範囲に属する。
(1)
 画像のビット深度が閾値に応じて、当該画像を量子化する際に用いられる量子化パラメタに基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定する設定部と、
 前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行するフィルタ処理部と、
 を備える、画像処理装置。
(2)
 前記設定部は、前記量子化パラメタに応じて、隣接する前記候補間の間隔を制御する、前記(1)に記載の画像処理装置。
(3)
 前記設定部は、前記画像のビット深度に応じて前記オフセット値を拡大または縮小するためのパラメタを、前記量子化パラメタに基づき設定することで、当該オフセット値の候補の範囲を設定する、前記(1)または(2)に記載の画像処理装置。
(4)
 前記設定部は、前記量子化パラメタがより大きいほど、前記オフセット値の候補の範囲がより広くなるように当該範囲を設定する、前記(1)~(3)のいずれか一項に記載の画像処理装置。
(5)
 前記設定部は、前記画像のビット深度に応じて前記オフセット値の候補の数を制限し、前記量子化パラメタに基づき、当該オフセット値の候補を設定する、前記(1)~(4)のいずれか一項に記載の画像処理装置。
(6)
 前記設定部は、前記画像のビット深度である第1のビット深度の場合における前記オフセット値の候補の数を、前記第1のビット深度よりも小さい第2のビット深度の場合における前記オフセット値の候補の数に制限する、前記(5)に記載の画像処理装置。
(7)
 前記設定部は、前記画像のビット深度が閾値よりも大きい場合に、前記量子化パラメタに基づき、前記オフセット値の候補の範囲を設定する、前記(1)~(6)のいずれか一項に記載の画像処理装置。
(8)
 前記設定部は、前記画像のビット深度が10ビットよりも大きい場合に、前記量子化パラメタに基づき、前記オフセット値の候補の範囲を設定する、前記(7)に記載の画像処理装置。
(9)
 前記設定部は、既に符号化処理が施された画像の画素に対して適用された前記オフセット値に応じて、前記復号画像の画素に対して適用される前記オフセット値の候補の範囲を設定する、前記(1)~(8)のいずれかに記載の画像処理装置。
(10)
 前記設定部は、既に符号化処理が施された画像の画素に対して適用された前記オフセット値において、閾値よりも小さい当該オフセット値の適用頻度がより高いほど、前記復号画像の画素に対して適用される前記オフセット値の候補の範囲がより狭くなるように当該範囲を設定する、前記(9)に記載の画像処理装置。
(11)
 前記設定部は、前記画像の特徴量に基づき、当該画像に適用される前記オフセット値の候補の範囲を設定する、前記(1)~(10)のいずれかに記載の画像処理装置。
(12)
 前記設定部は、前記画像の特徴量がより大きいほど、当該画像に適用される前記オフセット値の候補の範囲がより広くなるように当該範囲を設定する、前記(11)に記載の画像処理装置。
(13)
 プロセッサが、
 画像のビット深度に応じて、当該画像を量子化する際に用いられる量子化パラメタに基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定することと、
 前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行することと、
 を含む、画像処理方法。
(14)
 画像のビット深度に応じて、既に符号化処理が施された画像の画素に対して適用されたオフセット値に応じて、復号された復号画像の画素に対して適用する前記オフセット値の候補の範囲を設定する設定部と、
 前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行するフィルタ処理部と、
 を備える、画像処理装置。
(15)
 画像のビット深度に応じて、前記画像の特徴量に基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定する設定部と、
 前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行するフィルタ処理部と、
 を備える、画像処理装置。
(16)
 プロセッサが、
 画像のビット深度に応じて、既に符号化処理が施された画像の画素に対して適用されたオフセット値に応じて、復号された復号画像の画素に対して適用する前記オフセット値の候補の範囲を設定することと、
 前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行することと、
 を含む、画像処理方法。
(17)
 プロセッサが、
 画像のビット深度に応じて、前記画像の特徴量に基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定することと、
 前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行することと、
 を含む、画像処理方法。
The following configurations also belong to the technical scope of the present disclosure.
(1)
A setting unit that sets a range of candidate offset values to be applied to pixels of a decoded image based on a quantization parameter used when the image bit depth is quantized according to a threshold value; ,
A filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image;
An image processing apparatus comprising:
(2)
The image processing apparatus according to (1), wherein the setting unit controls an interval between the adjacent candidates according to the quantization parameter.
(3)
The setting unit sets a range of candidates for the offset value by setting a parameter for enlarging or reducing the offset value according to the bit depth of the image based on the quantization parameter. The image processing apparatus according to 1) or (2).
(4)
The image according to any one of (1) to (3), wherein the setting unit sets the range such that the range of the candidate offset value is wider as the quantization parameter is larger. Processing equipment.
(5)
The setting unit restricts the number of offset value candidates according to the bit depth of the image, and sets the offset value candidates based on the quantization parameter, any of (1) to (4) An image processing apparatus according to claim 1.
(6)
The setting unit sets the number of offset value candidates in the case of a first bit depth that is the bit depth of the image to the offset value in the case of a second bit depth that is smaller than the first bit depth. The image processing apparatus according to (5), wherein the number is limited to the number of candidates.
(7)
The setting unit sets a range of candidates for the offset value based on the quantization parameter when the bit depth of the image is larger than a threshold, according to any one of (1) to (6), The image processing apparatus described.
(8)
The said setting part is an image processing apparatus as described in said (7) which sets the range of the said candidate of an offset value based on the said quantization parameter, when the bit depth of the said image is larger than 10 bits.
(9)
The setting unit sets a range of candidates for the offset value applied to the pixel of the decoded image according to the offset value applied to the pixel of the image that has already been subjected to the encoding process. The image processing apparatus according to any one of (1) to (8).
(10)
In the offset value applied to the pixel of the image that has already been subjected to the encoding process, the setting unit applies to the pixel of the decoded image as the application frequency of the offset value that is smaller than the threshold is higher. The image processing apparatus according to (9), wherein the range is set so that a range of candidates for the offset value to be applied becomes narrower.
(11)
The image processing apparatus according to any one of (1) to (10), wherein the setting unit sets a range of candidates for the offset value applied to the image based on a feature amount of the image.
(12)
The image processing apparatus according to (11), wherein the setting unit sets the range such that the larger the feature amount of the image is, the wider the range of candidates for the offset value applied to the image is. .
(13)
Processor
According to the bit depth of the image, based on the quantization parameter used when quantizing the image, setting a range of candidate offset values to be applied to the decoded image pixels;
Executing a filtering process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image;
Including an image processing method.
(14)
The range of candidate offset values to be applied to the decoded image pixels in accordance with the offset value applied to the image pixels that have already been encoded according to the image bit depth. A setting section for setting
A filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image;
An image processing apparatus comprising:
(15)
A setting unit that sets a range of candidate offset values to be applied to the decoded pixels of the decoded image based on the feature amount of the image according to the bit depth of the image;
A filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image;
An image processing apparatus comprising:
(16)
Processor
The range of candidate offset values to be applied to the decoded image pixels in accordance with the offset value applied to the image pixels that have already been encoded according to the image bit depth. Setting
Executing a filtering process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image;
Including an image processing method.
(17)
Processor
Setting a range of candidate offset values to be applied to the decoded pixels of the decoded image based on the feature amount of the image according to the bit depth of the image;
Executing a filtering process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image;
Including an image processing method.
 10  画像符号化装置
 11  並び替えバッファ
 13  減算部
 14  直交変換部
 15  量子化部
 16  可逆符号化部
 17  蓄積バッファ
 18  レート制御部
 21  逆量子化部
 22  逆直交変換部
 23  加算部
 24  ループフィルタ
 25  フレームメモリ
 26  選択部
 27  選択部
 30  イントラ予測部
 35  インター予測部
 100 原画像保持部
 200 デブロックフィルタ
 300 サンプル適応オフセットフィルタ
 310 制御部
 320 解析部
 330 統計量取得部
 340 モード判定部
 350 オフセット判定部
 351 オフセット測定部
 353 オフセット決定部
 355 候補制御部
 360 判定部
 390 フィルタ処理部
 400 適応ループフィルタ
 
DESCRIPTION OF SYMBOLS 10 Image coding apparatus 11 Rearrangement buffer 13 Subtraction part 14 Orthogonal transformation part 15 Quantization part 16 Lossless encoding part 17 Accumulation buffer 18 Rate control part 21 Inverse quantization part 22 Inverse orthogonal transformation part 23 Adder part 24 Loop filter 25 Frame Memory 26 Selection Unit 27 Selection Unit 30 Intra Prediction Unit 35 Inter Prediction Unit 100 Original Image Holding Unit 200 Deblock Filter 300 Sample Adaptive Offset Filter 310 Control Unit 320 Analysis Unit 330 Statistics Acquisition Unit 340 Mode Determination Unit 350 Offset Determination Unit 351 Offset Measurement unit 353 Offset determination unit 355 Candidate control unit 360 Determination unit 390 Filter processing unit 400 Adaptive loop filter

Claims (17)

  1.  画像のビット深度に応じて、当該画像を量子化する際に用いられる量子化パラメタに基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定する設定部と、
     前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行するフィルタ処理部と、
     を備える、画像処理装置。
    A setting unit that sets a range of candidate offset values to be applied to the decoded image pixels based on the quantization parameter used when the image is quantized according to the bit depth of the image;
    A filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image;
    An image processing apparatus comprising:
  2.  前記設定部は、前記量子化パラメタに応じて、隣接する前記候補間の間隔を制御する、請求項1に記載の画像処理装置。 The image processing device according to claim 1, wherein the setting unit controls an interval between the adjacent candidates according to the quantization parameter.
  3.  前記設定部は、前記画像のビット深度に応じて前記オフセット値を拡大または縮小するためのパラメタを、前記量子化パラメタに基づき設定することで、当該オフセット値の候補の範囲を設定する、請求項1に記載の画像処理装置。 The setting unit sets a range of candidates for the offset value by setting a parameter for enlarging or reducing the offset value according to the bit depth of the image based on the quantization parameter. The image processing apparatus according to 1.
  4.  前記設定部は、前記量子化パラメタがより大きいほど、前記オフセット値の候補の範囲がより広くなるように当該範囲を設定する、請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the setting unit sets the range such that the range of the candidate offset value is wider as the quantization parameter is larger.
  5.  前記設定部は、前記画像のビット深度に応じて前記オフセット値の候補の数を制限し、前記量子化パラメタに基づき、当該オフセット値の候補を設定する、請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the setting unit limits the number of offset value candidates according to a bit depth of the image, and sets the offset value candidates based on the quantization parameter.
  6.  前記設定部は、前記画像のビット深度である第1のビット深度の場合における前記オフセット値の候補の数を、前記第1のビット深度よりも小さい第2のビット深度の場合における前記オフセット値の候補の数に制限する、請求項5に記載の画像処理装置。 The setting unit sets the number of offset value candidates in the case of a first bit depth that is the bit depth of the image to the offset value in the case of a second bit depth that is smaller than the first bit depth. The image processing apparatus according to claim 5, wherein the number is limited to the number of candidates.
  7.  前記設定部は、前記画像のビット深度が閾値よりも大きい場合に、前記量子化パラメタに基づき、前記オフセット値の候補の範囲を設定する、請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the setting unit sets a range of candidates for the offset value based on the quantization parameter when the bit depth of the image is larger than a threshold value.
  8.  前記設定部は、前記画像のビット深度が10ビットよりも大きい場合に、前記量子化パラメタに基づき、前記オフセット値の候補の範囲を設定する、請求項7に記載の画像処理装置。 The image processing apparatus according to claim 7, wherein the setting unit sets a range of candidates for the offset value based on the quantization parameter when the bit depth of the image is larger than 10 bits.
  9.  前記設定部は、既に符号化処理が施された画像の画素に対して適用された前記オフセット値に応じて、前記復号画像の画素に対して適用される前記オフセット値の候補の範囲を設定する、請求項1に記載の画像処理装置。 The setting unit sets a range of candidates for the offset value applied to the pixel of the decoded image according to the offset value applied to the pixel of the image that has already been subjected to the encoding process. The image processing apparatus according to claim 1.
  10.  前記設定部は、既に符号化処理が施された画像の画素に対して適用された前記オフセット値において、閾値よりも小さい当該オフセット値の適用頻度がより高いほど、前記復号画像の画素に対して適用される前記オフセット値の候補の範囲がより狭くなるように当該範囲を設定する、請求項9に記載の画像処理装置。 In the offset value applied to the pixel of the image that has already been subjected to the encoding process, the setting unit applies to the pixel of the decoded image as the application frequency of the offset value that is smaller than the threshold is higher. The image processing apparatus according to claim 9, wherein the range is set so that the range of the offset value candidates to be applied becomes narrower.
  11.  前記設定部は、前記画像の特徴量に基づき、当該画像に適用される前記オフセット値の候補の範囲を設定する、請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the setting unit sets a range of candidates for the offset value to be applied to the image based on the feature amount of the image.
  12.  前記設定部は、前記画像の特徴量がより大きいほど、当該画像に適用される前記オフセット値の候補の範囲がより広くなるように当該範囲を設定する、請求項11に記載の画像処理装置。 12. The image processing apparatus according to claim 11, wherein the setting unit sets the range such that the larger the feature amount of the image, the wider the range of candidates for the offset value applied to the image.
  13.  プロセッサが、
     画像のビット深度に応じて、当該画像を量子化する際に用いられる量子化パラメタに基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定することと、
     前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行することと、
     を含む、画像処理方法。
    Processor
    According to the bit depth of the image, based on the quantization parameter used when quantizing the image, setting a range of candidate offset values to be applied to the decoded image pixels;
    Executing a filtering process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image;
    Including an image processing method.
  14.  画像のビット深度に応じて、既に符号化処理が施された画像の画素に対して適用されたオフセット値に応じて、復号された復号画像の画素に対して適用する前記オフセット値の候補の範囲を設定する設定部と、
     前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行するフィルタ処理部と、
     を備える、画像処理装置。
    The range of candidate offset values to be applied to the decoded image pixels in accordance with the offset value applied to the image pixels that have already been encoded according to the image bit depth. A setting section for setting
    A filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image;
    An image processing apparatus comprising:
  15.  画像のビット深度に応じて、前記画像の特徴量に基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定する設定部と、
     前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行するフィルタ処理部と、
     を備える、画像処理装置。
    A setting unit that sets a range of candidate offset values to be applied to the decoded pixels of the decoded image based on the feature amount of the image according to the bit depth of the image;
    A filter processing unit that executes a filter process for applying the offset value selected from the candidates included in the set range to the pixels of the decoded image;
    An image processing apparatus comprising:
  16.  プロセッサが、
     画像のビット深度に応じて、既に符号化処理が施された画像の画素に対して適用されたオフセット値に応じて、復号された復号画像の画素に対して適用する前記オフセット値の候補の範囲を設定することと、
     前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行することと、
     を含む、画像処理方法。
    Processor
    The range of candidate offset values to be applied to the decoded image pixels in accordance with the offset value applied to the image pixels that have already been encoded according to the image bit depth. Setting
    Executing a filtering process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image;
    Including an image processing method.
  17.  プロセッサが、
     画像のビット深度に応じて、前記画像の特徴量に基づき、復号された復号画像の画素に対して適用するオフセット値の候補の範囲を設定することと、
     前記復号画像の画素に対して、設定された前記範囲に含まれる前記候補の中から選択された前記オフセット値を適用するフィルタ処理を実行することと、
     を含む、画像処理方法。
     
    Processor
    Setting a range of candidate offset values to be applied to the decoded pixels of the decoded image based on the feature amount of the image according to the bit depth of the image;
    Executing a filtering process that applies the offset value selected from the candidates included in the set range to the pixels of the decoded image;
    Including an image processing method.
PCT/JP2017/008270 2016-06-01 2017-03-02 Image processing apparatus and image processing method WO2017208549A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016-109714 2016-06-01
JP2016109714 2016-06-01

Publications (1)

Publication Number Publication Date
WO2017208549A1 true WO2017208549A1 (en) 2017-12-07

Family

ID=60479279

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/008270 WO2017208549A1 (en) 2016-06-01 2017-03-02 Image processing apparatus and image processing method

Country Status (1)

Country Link
WO (1) WO2017208549A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019179401A1 (en) * 2018-03-19 2019-09-26 华为技术有限公司 Image filtering method and apparatus, and video codec

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014168812A1 (en) * 2013-04-08 2014-10-16 Qualcomm Incorporated Sample adaptive offset scaling based on bit-depth
WO2014204584A1 (en) * 2013-06-19 2014-12-24 Apple Inc. Sample adaptive offset control
JP2015216627A (en) * 2014-04-23 2015-12-03 ソニー株式会社 Image processing device and image processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014168812A1 (en) * 2013-04-08 2014-10-16 Qualcomm Incorporated Sample adaptive offset scaling based on bit-depth
WO2014204584A1 (en) * 2013-06-19 2014-12-24 Apple Inc. Sample adaptive offset control
JP2015216627A (en) * 2014-04-23 2015-12-03 ソニー株式会社 Image processing device and image processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019179401A1 (en) * 2018-03-19 2019-09-26 华为技术有限公司 Image filtering method and apparatus, and video codec

Similar Documents

Publication Publication Date Title
US20180005408A1 (en) Image processing device and method
RU2653464C2 (en) Image processing device and method of image processing
US10448057B2 (en) Image processing device and method
WO2014002898A1 (en) Decoding device, and decoding method
WO2011145601A1 (en) Image processor and image processing method
US20200221126A1 (en) Image processing apparatus and image processing method
KR20140019388A (en) Image processing device and image processing method
WO2015163047A1 (en) Image processing device and image processing method
WO2015137145A1 (en) Image coding device and method, and image decoding device and method
WO2015146278A1 (en) Image processing device and image processing method
WO2015105003A1 (en) Decoding device and decoding method, and encoding device and encoding method
WO2015053116A1 (en) Decoding device, decoding method, encoding device, and encoding method
JPWO2015005025A1 (en) Image processing apparatus and image processing method
WO2013047325A1 (en) Image processing device and method
WO2018235405A1 (en) Image processing device and image processing method
US20190208206A1 (en) Image processing apparatus, image processing method, and program
WO2015053112A1 (en) Decoding device and decoding method, and encoding device and encoding method
WO2017208549A1 (en) Image processing apparatus and image processing method
WO2015005024A1 (en) Image processing device and image processing method
JP6477930B2 (en) Encoding apparatus and encoding method
WO2016199574A1 (en) Image processing apparatus and image processing method
JP6402802B2 (en) Image processing apparatus and method, program, and recording medium

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17806111

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17806111

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP