Embodiments described herein relate generally to a decoding device and an encoding device.
Regarding an image having a luminance component and a color-difference component, the image is sometimes encoded after converting a resolution of the color-difference component. In the same manner, the image is decoded after converting the resolution of the color-difference. The resolution of the color-difference component has various formats such as a 4:4:4 format, a 4:2:2 format, and a 4:2:0 format.
If resolution conversion is performed repeatedly with respect to the color-difference component, it leads to deterioration of the image. For that reason, in the past, there have been attempts to suppress the image deterioration. More particularly, a technology has been disclosed in which a filter that meets the conditions for suppressing the image deterioration is designed as the filter to be used in performing resolution conversion with respect to the color-difference component.
However, in the past, image deterioration occurs depending on the resolution of the color-difference component of the image to be output.
According to an embodiment, a decoding device includes an acquiring unit configured to acquire first format information, encoded data, and first filter information, the first format information indicating a resolution of a color-difference component of the encoded data; a decoding unit configured to decode the encoded data to obtain a decoded image; and a converting unit configured to convert a color-difference format of the decoded image represented by a first color-difference format by using a filter identified by the filter information.
Next, a hardware configuration of the device (the decoding device, and the encoding device) according to the present embodiment will be described with reference to
The hardware configuration illustrated in
The functional configuration of the device (the decoding device, and the encoding device) will be described in detail below.
The encoding device 10 performs encoding after changing the resolution of the color-difference component of an original image. Herein, the original image contains the luminescence component and the color-difference component. The resolution of the color-difference component has various color-difference formats such as the 4:4:4 format, the 4:2:2 format, and the 4:2:0 format. An original image having any one of those color-difference formats is input to the encoding device 10.
The explanation is given for an example in which an original image that has the 4:4:4 format as the color-difference format is input to the encoding device 10. However, that is not the only possible case.
The encoding device 10 includes a converting unit 12, an encoding unit 14, a generating unit 16, a NAL unit generating unit 18, and a transmission information generating unit 20.
The converting unit 12 performs filter processing with respect to an original image so as to perform resolution conversion with respect to the color-difference component of the original image. Then, the converting unit 12 outputs the original image that has the converted resolution of the color-difference component as a color-difference conversion image. The explanation is given for a case in which the converting unit 12 increases the resolution of the color-difference component (i.e., performs up-sampling) of an original image.
The converting unit 12 includes one or more converting units that convert resolution of the color-difference component of an original image that is input to the encoding device 10. Meanwhile, resolution conversion performed by the converting unit 12 with respect to the color-difference component is sometimes referred to as color-difference format conversion. The converting unit 12 includes a converting unit 12A, a converting unit 12B, and an output adjusting unit 12C.
The converting unit 12A converts the original image having the 4:4:4 format into an image having the 4:2:2 format. More specifically, with respect to the color-difference component of each pixel constituting the original image having the 4:4:4 format, the converting unit 12A performs filter processing using a filter that decimates the color-difference component to half in the horizontal direction. That is, the converting unit 12A performs down-sampling that decimates the color-difference component of the pixels, which constitute the original image having the 4:4:4 format, to half in the horizontal direction and converts the original image into an image having the 4:2:2 format. Then, the converting unit 12A outputs the image having the 4:2:2 format to the converting unit 12B.
Thus, the converting unit 12B receives an image having the 4:2:2 format from the converting unit 12A. Then, the converting unit 12B converts the image having the 4:2:2 format into an image having the 4:2:0 format. More specifically, with respect to the color-difference component of each pixel constituting the image having the 4:2:2 format, the converting unit 12B performs filter processing using a filter that decimates the color-difference component to half in the vertical direction. That is, the converting unit 12B performs down-sampling that decimates the color-difference component of the pixels, which constitute the image having the 4:2:2 format, to half in the vertical and converts that image into an image having the 4:2:0 format. Then, the converting unit 12B outputs the image having the 4:2:0 format to the output adjusting unit 12C.
Then, the output adjusting unit 12C performs a clipping operation so as to ensure that the value of each pixel constituting the received image, which has the 4:2:0 format and which is received from the converting unit 12B, falls in a range between the smallest value and the largest value set according to a standard. Then, to the encoding unit 14, the output adjusting unit 12C outputs the post-clipping image as a color-difference conversion image that has been subjected to color-difference conversion in the converting unit 12. Thus, the color-difference conversion image points to the original image after the converting unit 12 has converted resolution of the color-difference component.
Returning to the explanation with reference to
The color-difference signal information contains filter information that is used in filter processing performed by the converting unit 12. The color-difference signal information contains the following: the original image that has the 4:4:4 format and that is received by the converting unit 12A; filter information that is used in filter processing performed by the converting unit 12A; the image that has the 4:2:2 format and that is received by the converting unit 12B; and filter information that is used in filter processing performed by the converting unit 12B.
The filter information used in filter processing performed by the converting unit 12A is horizontal down-sampling filter information. Similarly, the filter information used in filter processing performed by the converting unit 12B is vertical down-sampling filter information.
The encoding unit 14 receives a color-difference conversion image from the converting unit 12. Then, the encoding unit 14 encodes the color-difference conversion image and generates encoded data. The encoding unit 14 divides a single frame into slices each of which is made of a plurality of pixel areas, and performs encoding on a slice-by-slice basis.
The encoding unit 14 includes a subtracting unit 14A, a transform/quantization unit 14B, an entropy encoding unit 14C, an inverse quantization/inverse transform unit 14D, an adding unit 14E, a frame memory 14F, a predicted image generating unit 14G, and a motion vector searching unit 14H.
The subtracting unit 14A receives a color-difference conversion image from the converting unit 12. Then, the subtracting unit 14A obtains the difference between the color-difference conversion image and a predicted image, which is generated by the predicted image generating unit 14G; and generates an error image representing that difference.
The transform/quantization unit 14B performs transform with respect to the error image to generate transform coefficients, and quantizes the transform coefficients to generate quantized coefficients. Examples of the method for performing transform with respect to the error image include orthogonal transformation using the discrete cosine transform (DCT), wavelet transform, and independent component analysis. The transform/quantization unit 14B performs conversion with respect to the error image by implementing any one of those methods. Moreover, the transform/quantization unit 14B quantizes the transform coefficients using a quantization parameter set in advance.
Then, the transform/quantization unit 14B outputs the quantized coefficients to the entropy encoding unit 14C and the inverse quantization/inverse transform unit 14D.
Thus, the entropy encoding unit 14C receives the quantized coefficients from the transform/quantization unit 14B. Moreover, the entropy encoding unit 14C receives motion vector information from the motion vector searching unit 14H (described later). Then, the entropy encoding unit 14C performs entropy encoding with respect to the quantized coefficients and the motion vector information according to a predetermined syntax, and generates encoded data. Herein, the syntax points to the setting rules regarding the encoded data.
Meanwhile, the entropy encoding unit 14C performs entropy encoding using, for example, Huffman encoding or arithmetic encoding.
Then, the entropy encoding unit 14C outputs the generated encoded data to the NAL unit generating unit 18.
The inverse quantization/inverse transform unit 14D performs inverse quantization with respect to the quantized coefficients and then performs inverse transform to generate an error image. That is, with respect to the quantized coefficients, the inverse quantization/inverse transform unit 14D performs opposite processing to the processing performed by the transform/quantization unit 14B. More particularly, when the transform/quantization unit 14B performs wavelet transform and quantization in that order, the inverse quantization/inverse transform unit 14D performs inverse quantization and inverse wavelet transform in that order.
The adding unit 14E receives the error image from the inverse quantization/inverse transform unit 14D and receives the predicted image from the predicted image generating unit 14G. Then, the adding unit 14E adds the error image and the predicted image to obtain a decoded image. Subsequently, the decoded image is stored in the frame memory 14F.
The frame memory 14F performs filter processing with respect to the decoded image and stores it as a reference image. Then, the frame memory 14F outputs the reference image to the predicted image generating unit 14G and the motion vector searching unit 14H.
The motion vector searching unit 14H generates motion vector information by referring to the color-difference conversion image received from the converting unit 12 and the reference image received from the frame memory 14F. Then, the motion vector searching unit 14H outputs the motion vector information to the predicted image generating unit 14G and the entropy encoding unit 14C.
The predicted image generating unit 14G generates a predicted image by referring to the reference image and the motion vector information. Then, the predicted image generating unit 14G outputs the predicted image to the adding unit 14E and the subtracting unit 14A.
Meanwhile, the reference image generated by the frame memory 14F has the same color-difference format as that of the color-difference conversion image. That is, the reference image has the 4:2:0 format, which is the same as the color-difference format of the color-difference conversion image obtained when the converting unit 12 performs resolution conversion with respect to the color-difference component. The frame memory 14F outputs the reference image, which has the 4:2:0 formation, to the generating unit 16.
Returning to the explanation with reference to
The color-difference conversion information contains a first color-difference format, and contains filter information of the filter used to convert the color-difference format of a decoded image that is obtained by decoding the encoded data.
The explanation is given for an example in which the color-difference conversion format contains the first color-difference format, a second color-difference format, and the filter information.
The first color-difference format indicates the resolution of the color-difference component of the encoded data, that is, indicates the color-difference format of the encoded data obtained by the encoding unit 14 by means of encoding. In other words, the first color-difference format is the color-difference format of a color-difference conversion image. The first color-difference format points to the 4:2:0 format. Meanwhile, in the following explanation, the resolution of the color-difference component is sometimes simply referred to as the color-difference format.
The second color-difference format is a color-difference format in which the decoded image of the encoded data is output. More particularly, the second color-difference format is used to reproduce the decoded image obtained by decoding the encoded data. The second color-difference format is determined depending on the mode of reproduction, the type of the reproducing device, etc. The second color-difference formation is set in advance in the generating unit 16. Alternatively, the second color-difference format may be received by the encoding device 10 along with the original image. Still alternatively, the second color-difference format may be received from an external device via a communication unit (not illustrated).
The filter information is including information to specify the filter. Or the filter information is including a filter coefficient. In this embodiment, the filter information is used to identify a filter that is used in converting color-difference format of a decoded image.
The explanation is given for an example in which the filter information is used to identify a filter that is used in converting a decoded image having the first color-difference format into a decoded image having the second color-difference format. Thus, the explanation is given for an example in which the filter information is information that is used while converting a decoded image having the first color-difference format into a decoded image having the second color-difference format. The filter information contains, for example, filter coefficients.
Moreover, the filter information may also contain information for the second color-difference format. Herein, the filter information may be information such as a flag that is used to identify the second color-difference format, or may be the second color-difference format itself.
The generating unit 16 receives color-difference signal information from the converting unit 12. Moreover, the generating unit 16 receives, from the encoding unit 14, a reference image having the same color-difference format (i.e., the 4:2:0 format) as the format of the color-difference conversion image.
As described above, the color-difference signal information contains the following: the original image that has the 4:4:4 format and that is received by the converting unit 12A; filter information that is used in filter processing performed by the converting unit 12A; the image that has the 4:2:2 format and that is received by the converting unit 12B; and filter information that is used in filter processing performed by the converting unit 12B.
The generating unit 16 includes a vertical filter information generating unit 16A, a converting unit 16B, a horizontal filter information generating unit 16C, and a generating unit 16D.
The vertical filter information generating unit 16A receives, from the color-difference signal information, the image having the 4:2:2 format and the filter information used in filter processing performed by the converting unit 12B (i.e., vertical down-sampling filter information). Moreover, the vertical filter information generating unit 16A receives, from the encoding unit 14, a reference image having the same color-difference format (i.e., the 4:2:0 format) as the format of the color-difference conversion image.
Then, the vertical filter information generating unit 16A refers to the image having the 4:2:2 format, refers to vertical down-sampling filter information used in filter processing performed by the converting unit 12B, and refers to the reference image having the 4:2:0 format that is the image having the color-difference format after the conversion performed by the converting unit 12B; and designs filter information that is used in converting an image having the 4:2:0 format into an image having the 4:2:2 format.
That is, the vertical filter information generating unit 16A performs vertical up-sampling with respect to the reference image having the 4:2:0 format, and designs filter information to be used in obtaining an image having the 4:2:2 format. Then, the vertical filter information generating unit 16A outputs vertical filter information, which is the filter information that has been designed, to the converting unit 16B and the generating unit 16D.
While designing the filter information, Equations (1) to (3) given below are used.
Herein, Equations (1) to (3) are formulae for calculating a filter corresponding to the least mean square of the difference between the color-difference component of a pre-filter-processing image and the color-difference component of a post-filter-processing image. That is, Equations (1) to (3) are formulae for calculating a Wiener filter.
In Equation (1), F represents a filter coefficient set; f1 to fn represent filter coefficients; and n is an integer equal to or greater than one.
In Equation (2), S represents the color-difference component of a post-filter-processing image; and x represents the position of a pixel. In Equations (2) and (3), SF(x) represents a post-filter-processing image signal. In Equation (3), Sorg represents the color-difference component of a pre-filter-processing image.
The converting unit 16B receives, from the encoding unit 14, the reference image having the same color-difference format (i.e., the 4:2:0 format) as the format of the color-difference conversion image. Moreover, the converting unit 16B receives the vertical filter information from the vertical filter information generating unit 16A.
Then, the converting unit 16B performs filter processing using the vertical filter information and converts the reference image, which has the same color-difference format (i.e., the 4:2:0 format) as the format of the color-difference conversion image, into an image having the 4:2:2 format. Then, the converting unit 16B outputs the image having the 4:2:2 format to the horizontal filter information generating unit 16C.
The horizontal filter information generating unit 16C receives, from the color-difference signal information, the original image that has the 4:4:4 format and that is received by the converting unit 12A; and the filter information used in filter processing performed by the converting unit 12A (i.e., the horizontal down-sampling filter information). Moreover, the horizontal filter information generating unit 16C receives the image having the 4:2:2 from the converting unit 16B.
The horizontal filter information generating unit 16C refers to the image having the 4:4:4 format, refers to the horizontal down-sampling filter information, and refers to the image having the 4:2:2 format; and designs filter information that is used in converting an image having the 4:2:2 format into an image having the 4:4:4 format. While designing the filter information, Equations (1) to (3) given above are used.
That is, the horizontal filter information generating unit 16C performs horizontal up-sampling with respect to the reference image having the 4:2:2 format, and designs filter information to be used in obtaining an image having the 4:4:4 format. Then, the horizontal filter information generating unit 16C outputs horizontal filter information, which is the filter information that has been designed, to the generating unit 16D.
The generating unit 16D generates color-difference conversion information. More specifically, as the first color-difference format of the encoded data encoded by the encoding unit 14, the generating unit 16D uses the color-difference format of the reference image received by the encoding unit 14 (i.e., the 4:2:0 format). Moreover, the generating unit 16D reads, from a memory (not illustrated), the second color-difference format that is used when a decoded image that is obtained by decoding the encoded data is output. Furthermore, as the filter information, the generating unit 16D makes use of the vertical filter information, which is received from the vertical filter information generating unit 16A, and makes use of the horizontal filter information, which is received from the horizontal filter information generating unit 16C. Then, the generating unit 16D generates the color-difference conversion information that contains the first color-difference format, the second color-difference format, and the filter information.
Herein, the generating unit 16D generates the color-difference conversion information according to predetermined setting rules (syntax).
As illustrated in
Herein, coded_format_idc represents the first color-difference format.
For example, when the value of coded_format_idc is equal to “0”, it indicates that the first color-difference format is a monochrome format having only the luminescence specified. However, when the value of coded_format_idc is equal to “1”, it indicates that the first color-difference format is the 4:2:0 format. Moreover, when the value of coded_format_idc is equal to “2”, it indicates that the first color-difference format is the 4:2:2 format. Furthermore, when the value of coded_format_idc is equal to “3”, it indicates that the first color-difference format is the 4:4:4 format.
Meanwhile, coded_data_bit_depth represents the pixel bit length of the encoded data.
Moreover, target_format_idc represents the second color-difference format, which is the color-difference format that is used when a decoded image obtained by decoding the encoded data is output. Furthermore, target_bit_depth represents the pixel bit length at the time of output. Moreover, max_value represents the maximum value of the color-difference component at the time of output. Furthermore, min_value represents the minimum value of the color-difference component at the time of output.
Moreover, progressive_flag is a flag that indicates whether or not the encoded data is a progressive signal. For example, when the value of progressive_flag is equal to “0”, it indicates that the encoded data is not a progressive signal but an interlaced signal, which means that the color-difference conversion operation needs to be performed on a field-by-field basis.
Meanwhile, implicit_vertical_flag, interpolation_vertical_idc, tap_length_vertical_minus1, ver_filter_coeff, implicit_horizontal_flag, interpolation_horizontal_idc, tap_length_horizontal_minus1, and hor_filter_coeff represent the filter information.
Herein, implicit_vertical_flag is a flag that indicates the use of predefined filter information in the vertical direction. Moreover, interpolation_vertical_idc represents identification information that is used to identify the predefined filter information in the vertical direction. Furthermore, tap_length_vertical_minus1 represents the value smaller by one than the tap length of the filter coefficients in the vertical direction.
Moreover, ver_filter_coeff represents the filter coefficients in the vertical direction. Furthermore, implicit_horizontal_flag is a flag that indicates the use of predefined filter information in the horizontal direction. Moreover, interpolation_horizontal_idc represents identification information that is used to identify the predefined filter information in the horizontal direction. Furthermore, tap_length_horizontal_minus1 represents the value smaller by one than the tap length of the filter coefficients in the horizontal direction. Moreover, hor_filter_coeff represents the filter coefficients in the horizontal direction.
For example, it is assumed that the value of coded_format_idc is equal to “1”. That is, it is assumed that the first color-difference format, which is the format of the encoded data, is the 4:2:0 format. Moreover, it is assumed that the value of target_format_idc is equal to or greater than “1”. That is, it is assumed that the second color-difference format that is used when the decoded image is output is either the 4:2:2 format or the 4:4:4 format. In this case, it is necessary to perform up-sampling in the vertical direction. For that reason, in this case, the generating unit 16 generates the filter information in the vertical direction (i.e., generates the vertical up-sampling filter information) as the filter information.
Alternatively, it is assumed that the value of coded_format_idc is greater than “1”. That is, it is assumed that the first color-difference format, which is the format of the encoded data, is either the 4:2:2 format or the 4:4:4 format. Moreover, it is assumed that the value of target_format_idc is equal to “1”. That is, it is assumed that the second color-difference format that is used when the decoded image is output is the 4:2:0 format. In this case, the filter information points to the filter information in the vertical direction (the vertical down-sampling filter information).
Still alternatively, it is assumed that the value of coded_format_idc is equal to “1” or “2”. That is, it is assumed that the first color-difference format is either the 4:2:0 format or the 4:2:2 format. Moreover, it is assumed that the value of target_format_idc is equal to “3”. That is, it is assumed that the second color-difference format is the 4:4:4 format. In this case, the filter information points to the filter information in the horizontal direction (the horizontal up-sampling filter information).
Still alternatively, it is assumed that the value of coded_format_idc is equal to “3”. That is, it is assumed that the first color-difference format is the 4:4:4 format. Moreover, it is assumed that the value of target_format_idc is equal to “1” or “2”. That is, it is assumed that the second color-difference format is either the 4:2:0 format or the 4:2:2 format. In this case, the filter information points to the filter information in the horizontal direction (the horizontal down-sampling filter information).
Meanwhile, in
In a memory (not illustrated) of the generating unit 16, the encoding device 10 stores in advance a definition table in which the predefined filter information in the vertical direction, the predefined filter information in the horizontal direction, and the identification information that is used to identify such filter information is stored in a corresponding manner.
The definition information points to a table in which “value”, “tap length”, and “filter coefficients” are stored in a corresponding manner.
Herein, “value” points to the identification information of the filter information, and corresponds to the value indicated by interpolation_vertical_idc or interpolation_horizontal_idc.
Moreover, “tap length” represents the tap length of the filter coefficients corresponding to the value of “value” that is the identification information of the filter information. Furthermore, “filter coefficients” represents the filter coefficients corresponding to the value of “value” that is the identification information of the filter information.
Meanwhile, the color-difference conversion information may not contain the information obtained from the encoded data or the output information that has been standardized.
More particularly, the color-difference conversion information illustrated in
Thus, in the example illustrated in
As described above, as long as the color-difference conversion information contains the first color-difference format that indicates the resolution of the color-difference component of the encoded data, and contains the filter information of the filter to be used in converting the color-difference format of a decoded image that is obtained by decoding the encoded data; it serves the purpose.
In the example illustrated in
Herein, chroma_loc_info_present_flag is a flag that indicates whether or not the pixel position of a color-difference signal is present and indicates whether or not the filter information related to color-difference conversion is present. For example, when the value of chroma_loc_info_present_flag is equal to “1”, it indicates that the pixel position of a color-difference signal is present as well as the filter information related to color-difference conversion is present. In contrast, when the value of chroma_loc_info_present_flag is equal to “0”, it indicates that neither the pixel position of a color-difference signal is present nor the filter information related to color-difference conversion is present.
Moreover, chroma_sample_loc_type_top_field indicates the pixel sample position of the color-difference component of the top field (i.e., the pixel position of the target for sampling) when the encoded data is obtained by encoding with the use of interlaced scanning. Regarding the pixel sample position of the color-difference component of the top field, in all there are six known combinations by taking into consideration the combinations with the pixel sample position of the luminescence component.
Furthermore, chroma_sample_loc_type_bottom_field indicates the pixel sample position of the color-difference component of the bottom field (i.e., the pixel position of the target for sampling) when the encoded data is obtained by encoding with the use of interlaced scanning. In an identical manner to the case of the top field, regarding the pixel sample position of the color-difference component of the top field, in all there are six known combinations by taking into consideration the combinations with the pixel sample position of the luminescence component.
Moreover, chroma_filter_info_present_flag is a flag that indicates whether or not the filter information related to color-difference conversion is present. When the value of chroma_filter_info_present_flag is equal to “1”, it indicates that the filter information related to color-difference conversion is present. In contrast, when the value of chroma_filter_info_present_flag is equal to “0”, it indicates that the filter information related to color-difference conversion does not exist.
Furthermore, chroma_filter_info is the identification information of color-difference conversion filter information. The color-difference conversion filter information that corresponds to the identification information of color-difference conversion filter information is set in advance in color-difference conversion filter definition information.
Besides, in the example illustrated in
Herein, “tap length” represents the tap length of the filter coefficients. Moreover, “filter coefficients” represents the filter coefficients. Furthermore, “divisor” represents the value of the denominator used when division is performed during filter processing. Moreover, “phase shift” represents the phase information of the filter. Furthermore, “purpose” represents the type of filter. More particularly, “purpose” represents the down-sampling filter or the up-sampling filter while performing color-difference format conversion.
In the example illustrated in
In the color-difference conversion filter definition information illustrated in
In this case, when “value” representing the identification information in the color-difference conversion filter definition information illustrated in
The color-difference conversion filter information illustrated in
Herein, target_format_idc is identical to the earlier description. Moreover, num_of_filter_minus1 represents the value smaller by one than the color-difference conversion filter count. Furthermore, tap_length_minus1 represents the value smaller by one than the tap length of the filter coefficients. Moreover, filter_coeff represents the filter coefficients.
In the example illustrated in
Herein, chroma_filter_info_present_flag is a flag that indicates whether or not the filter information related to color-difference conversion is present separately. When the value of chroma_filter_info_present_flag is equal to “1”, it indicates that the filter information related to color-difference conversion is present. In contrast, when the value of chroma_filter_info_present_flag is equal to “0”, it indicates that the filter information related to color-difference conversion does not exist.
The color-difference conversion filter information illustrated in
Herein, num_of_filter_set_minus1 represents the value smaller by one than the filter set count. Moreover, implicit_filter_set_flag is a flag indicating that the information of a predefined filter set is used. Furthermore, filter_set_idc represents identification information that is used to identify the information of the predefined filter set. Moreover, num_of_filter_minus1 represents the value smaller by one than the color-difference conversion filter count. Furthermore, implicit_filter_flag is a flag that indicates the use of predefined filter information. Moreover, filter_idc represents the identification information of the predefined filter information. Furthermore, tap_length_minus1 represents the value smaller by one than the tap length of the filter coefficients. Moreover, filter_coeff represents the filter coefficients.
Herein, “filter_set_idc” represents the identification information that is used to identify the information of the filter set. The value of “filter_set_idc” corresponds to filter_set_idc illustrated in
Moreover, “filter_idc” represents the identification information that is used to identify the filter information. The value of “filter_idc” corresponds to filter_idc illustrated in
Furthermore, “tap length” represents the tap length of the filter coefficients as described above. Moreover, “filter coefficients” represents the filter coefficients. Furthermore, “divisor” represents the value of the denominator used when division is performed during filter processing. Moreover, “phase shift” represents the phase information of the filter. Furthermore, “purpose” represents the purpose of the filter, and indicates the down-sampling filter or the up-sampling filter while performing color-difference format conversion.
The color-difference conversion filter information illustrated in
Herein, in an identical manner to
Meanwhile, chroma_format_idc is included in the encoded data, and represents the first color-difference format.
Moreover, implicit_vertical_flag is a flag that indicates the use of predefined filter information in the vertical direction. Furthermore, vertical filter_idc represents the identification information that is used to identify the predefined filter information in the vertical direction. Moreover, tap_length_vertical_minus1 represents the value smaller by one than the tap length of the filter coefficients in the vertical direction.
Furthermore, ver_filter_coeff represents the filter coefficient set in the vertical direction. Moreover, second_filter_flag is a flag defined regarding a field signal in the case when different filter sets in the vertical direction are used in the top field and the bottom field. If the value of second_filter_flag is set to “1”, then it is possible to define a second vertical filter.
Furthermore, second_vertical filter_idc represents the identification information that is used to identify the second set of predefined filter information in the vertical direction. Moreover, tap_length_second_vertical_minus1 represents the value smaller by one than the tap length of the second filter coefficient set in the vertical direction. Furthermore, second_ver_filter_coeff represents the second filter coefficient set in the vertical direction.
Furthermore, implicit_horizontal_flag is a flag that indicates the use of predefined filter information in the horizontal direction.
Moreover, horizontal_filter_idc represents the identification information that is used to identify the predefined filter information in the horizontal direction. Furthermore, tap_length_horizontal_minus1 represents the value smaller by one than the tap length of the filter coefficients in the horizontal direction. Moreover, hor_filter_coeff represents the filter coefficients in the horizontal direction.
For example, it is assumed that the value of chroma_format_idc is equal to “1”. That is, it is assumed that the first color-difference format, which is the format of the encoded data, is the 4:2:0 format. Moreover, it is assumed that the value of target_format_idc is equal to or greater than “1”. That is, it is assumed that the second color-difference format that is used when the decoded image is output is either the 4:2:2 format or the 4:4:4 format. In that case, it is necessary to perform up-sampling in the vertical direction. For that reason, in this case, the generating unit 16 generates the filter information in the vertical direction (i.e., generates the vertical up-sampling filter information) as the filter information.
Alternatively, it is assumed that the value of coded_format_idc is greater than “1”. That is, it is assumed that the first color-difference format, which is the format of the encoded data, is either the 4:2:2 format or the 4:4:4 format. Moreover, it is assumed that the value of target_format_idc is equal to “1”. That is, it is assumed that the second color-difference format that is used when the decoded image is output is the 4:2:0 format. In this case, the filter information points to the filter information in the vertical direction (the vertical down-sampling filter information).
Still alternatively, it is assumed that the value of chroma_format_idc is equal to “1” or “2”. That is, it is assumed that the first color-difference format is either the 4:2:0 format or the 4:2:2 format. Moreover, it is assumed that the value of target_format_idc is equal to “3”. That is, it is assumed that the second color-difference format is the 4:4:4 format. In this case, the filter information points to the filter information in the horizontal direction (the horizontal up-sampling filter information).
Still alternatively, it is assumed that the value of chroma_format_idc is equal to “3”. That is, it is assumed that the first color-difference format is the 4:4:4 format. Moreover, it is assumed that the value of target_format_idc is equal to “1” or “2”. That is, it is assumed that the second color-difference format is either the 4:2:0 format or the 4:2:2 format. In this case, the filter information points to the filter information in the horizontal direction (the horizontal down-sampling filter information).
In the example illustrated in
Herein, “filter_idc” represents the identification information that is used to identify the information of the filter set information. The value of “filter_idc” corresponds to vertical filter_idc, second_filter_idc, and horizontal_filter_idc specified in the color-difference conversion information illustrated in
Moreover, “tap length” represents the tap length of the filter coefficients. Furthermore, “filter coefficients” represents the filter coefficients. Moreover, “divisor” represents the value of the denominator used when division is performed during filter processing. Furthermore, “phase shift” represents the phase information of the filter. Moreover, “purpose” represents the purpose of the filter, and indicates a down-sampling filter or an up-sampling filter while performing color-difference format conversion.
Returning to the explanation with reference to
The NAL unit generating unit 18 receives the encoded data from the encoding unit 14. Moreover, the NAL unit generating unit 18 receives the color-difference conversion information from the generating unit 16.
Then, the NAL unit generating unit 18 generates NAL unit information (where NAL stands for Network Abstraction Layer) that contains the encoded data received from the encoding unit 14, contains the color-difference conversion information received from the generating unit 16, and contains byte alignment information which is header information and adjustment information at the time of performing reading and writing. Then, the NAL unit generating unit 18 outputs the NAL unit information to the transmission information generating unit 20.
Herein, the NAL unit information is information corresponding to a high-level syntax included in the transmission information (described later) that is output by the encoding device 10. In the structure (syntax) of the transmission information, the high-level syntax is located at an upper level than the slice syntax, and contains parameters that affect the entire frame of the transmission information. As described above, the NAL unit information contains the encoded data, contains the color-difference conversion information received from the generating unit 16, and contains byte alignment information which is header information and adjustment information at the time of performing reading and writing.
The transmission information generating unit 20 receives the NAL unit information from the NAL unit generating unit 18. Then, the transmission information generating unit 20 converts the NAL unit information into the information of a system of the MPEG-2 system or the ISO file format, and generates transmission information. Then, the transmission information generating unit 20 outputs the transmission information.
Given below is the explanation of an encoding operation performed in the encoding device 10.
Firstly, the converting unit 12 performs a color-difference converting operation for converting the resolution of the color-difference component of the original image received by the encoding device 10 (Step S100). Then, to the encoding unit 14, the converting unit 12 outputs the original image having the converted resolution of the color-difference component as a color-difference conversion image. Moreover, the converting unit 12 outputs the color-difference signal information to the generating unit 16.
Then, the encoding unit 14 encodes the color-difference conversion image received from the converting unit 12, and generates encoded data (Step S102). Subsequently, the encoding unit 14 outputs the encoded data to the NAL unit generating unit 18. Moreover, the encoding unit 14 outputs a reference image, which has the same color-difference format (i.e., the 4:2:0 format) as the format of the color-difference conversion image, to the generating unit 16.
Then, the generating unit 16 generates color-difference conversion information by referring to the color-difference signal information received from the converting unit 12 and by referring to the reference image that has the color-difference format of the color-difference conversion image and that is received from the encoding unit 14 (Step S104). Subsequently, the generating unit 16 outputs the color-difference conversion information to the NAL unit generating unit 18.
Then, the NAL unit generating unit 18 generates NAL unit information that contains the encoded data received from the encoding unit 14, contains the color-difference conversion information received from the generating unit 16, and contains byte alignment information which is header information and adjustment information at the time of performing reading and writing (Step S106). Then, the NAL unit generating unit 18 outputs the NAL unit information to the transmission information generating unit 20.
Subsequently, the transmission information generating unit 20 converts the NAL unit information into the information of a system layer, and generates transmission information (Step S108) Then, the transmission information generating unit 20 outputs the transmission information.
As described above, in the encoding device 10 according to the first embodiment, the encoding unit 14 encodes a color-difference conversion image and generates encoded data. Then, the generating unit 16 generates color-difference conversion information that contains a first color-difference format indicating the resolution of the color-difference component of the encoded data; a second color-difference format indicating the resolution of the color-difference component that is used when a decoded image which is obtained by decoding the encoded data is output; and filter information that is used to identify a filter that is used in converting the decoded image of the encoded data having the first color-difference format into a decoded image having the second color-difference format.
For that reason, when outputting the decoded image that is obtained by decoding the encoded data encoded by the encoding device 10, the decoded image of the encoded data having the first color-difference format is converted into an image having the second color-difference format using a filter that is identified by the filter information which is included in the color-difference conversion information. As a result, it becomes possible to suppress the image deterioration occurring due to resolution conversion.
Thus, in the encoding device 10 according to the first embodiment, it becomes possible to suppress the image deterioration.
First Modification
In the first embodiment, the explanation is given for a case in which the filter information points to filter information that is used in converting a decoded image having the first color-difference format into a decoded image having the second color-difference format.
However, as long as the filter information is information that is used to identify the filter used in converting a decoded image having the first color-difference format into a decoded image having the second color-difference format, it serves the purpose. For example, the specific information can be identification information that is used to identify the filter information used in converting a decoded image having the first color-difference format into a decoded image having the second color-difference format.
In that case, the abovementioned definition information, in which filter information is held in a corresponding manner to identification information of the filter information, may be stored in advance in the encoding device 10 as well as in a decoding device that decodes the encoded data (i.e., in a decoding device described later). Then, in the decoding device that decodes the encoded data, the decoded image obtained by decoding the encoded data can be subjected to filter processing using the filter information identified by the identification information included in the filter information. With that, the color-difference format of the decoded image can be converted.
Meanwhile, the filter information may also be filter information that is used in filter processing performed by the converting unit 12.
In that case, in a decoding device that decodes the encoded data, a filter that is used in converting the decoded image having the first color-difference format into a decoded image having the second color-difference format is set by referring to the filter information included in the filter information. Then, the decoding device can convert the color-difference format of the decoded image using the filter that has been set.
In a second embodiment, the explanation is given about generating the color-difference conversion information by implementing a different method than the method implemented in the first embodiment.
The encoding device 10A includes a converting unit 120, the encoding unit 14, a generating unit 160, the NAL unit generating unit 18, and the transmission information generating unit 20.
Thus, in the encoding device 10A; the converting unit 12 is replaced with the converting unit 120, and the generating unit 16 is replaced with the generating unit 160. Apart from that, the configuration of the encoding device 10A is identical to the configuration of the encoding device 10 according to the first embodiment.
As far as the converting unit 120 is concerned, apart from the point that filter information used by the converting unit 120 is output as color-difference signal information to the generating unit 160, the configuration of the converting unit 120 is identical to the configuration of the converting unit 12. More particularly, to the generating unit 160, the converting unit 120 outputs the color-difference signal information that contains the filter information used in filter processing performed by the converting unit 12A and the filter information used in filter processing performed by the converting unit 12B. Meanwhile, in the second embodiment, in an identical manner to the first embodiment, the filter information used in filter processing performed by the converting unit 12A is horizontal down-sampling filter information; while the filter information used in filter processing performed by the converting unit 12B is vertical down-sampling filter information.
The generating unit 160 receives the color-difference signal information from the converting unit 120. Then, the generating unit 160 generates the color-difference conversion information by referring to the color-difference signal information.
The generating unit 160 includes a vertical filter information generating unit 160A, a horizontal filter information generating unit 160B, and a generating unit 160C.
The vertical filter information generating unit 160A receives, from the color-difference signal information, the filter information that is used in filter processing performed by the converting unit 12B (i.e., the vertical down-sampling filter information).
Then, the vertical filter information generating unit 160A refers to the vertical down-sampling filter information used in filter processing performed by the converting unit 12B, and designs filter information that is used in converting an image having the 4:2:0 format into an image having the 4:2:2 format. That is, the vertical filter information generating unit 160A performs vertical up-sampling with respect to a decoded image having the 4:2:0 format, and designs filter information to be used in obtaining an image having the 4:2:2 format. Herein, while designing the filter information, Equation (4) given below is used. Subsequently, the vertical filter information generating unit 160A outputs vertical filter information, which is the filter information that has been designed, to the generating unit 160C.
The horizontal filter information generating unit 160B refers to the filter information (horizontal down-sampling filter information), which is used in filter processing performed by the converting unit 12A, in the color-difference signal information; and designs filter information that is used in converting the image having the 4:2:2 format into the original image having the 4:4:4 format. That is, the horizontal filter information generating unit 160B performs horizontal up-sampling with respect to the image having the 4:2:2 format, and designs filter information to be used in obtaining the original image having the 4:4:4 format. Then, the horizontal filter information generating unit 160B outputs horizontal filter information, which is the filter information that has been designed, to the generating unit 160C.
Herein, Equation (4) is a filter calculation formula that is used by the vertical filter information generating unit 160A and the horizontal filter information generating unit 160B while designing filters.
More particularly, Equation (4) is a formula that enables designing of filter information in such a way that a one-dimensional image has the same image quality as an image that is obtained by first up-sampling to double the color-difference component of each pixel constituting the one-dimensional image and then down-sampling to halve the color-difference component of each pixel.
In Equation (4), D represents a vector of down-sampling filter coefficients, and d1 to d2n (where n is an integer equal to or greater than one) represent the filter coefficients of the down-sampling filter. Moreover, U and V represent vectors of up-sampling filter coefficients; u1 to un (where n is an integer equal to or greater than one) represent the filter coefficients used in top field up-sampling; and v1 to vn (where n is an integer equal to or greater than one) represent the filter coefficients used in bottom field up-sampling.
Furthermore, in Equation (4), X represents a matrix of 2n rows and (2n−1) columns and has the up-sampling filter coefficients as the elements. Moreover, I represents a vector in which the element count is 2n−1; in which the n-th element is 1; and in which the remainder is 0.
In order to design the filter information; D, U, and V are designed in such a way that DX=I is satisfied.
With the use of Equation (4), from the down-sampling filter coefficients, the corresponding up-sampling filter coefficients can be obtained. Conversely, from the up-sampling filter coefficients, the corresponding down-sampling filter coefficients can also be obtained.
The generating unit 160C generates color-difference conversion information. More specifically, the generating unit 160C uses the color-difference format of the reference image (i.e., the 4:2:0 format), which is received from the encoding unit 14, as the first color-difference format of the encoded data obtained by encoding performed by the encoding unit 14. Moreover, the generating unit 160C reads the second color-difference format from a memory (not illustrated). Furthermore, as the filter information, the generating unit 160C makes use of the vertical filter information received from the vertical filter information generating unit 160A and the horizontal filter information received from the horizontal filter information generating unit 160B. Then, the generating unit 160 generates the color-difference conversion information that contains the first color-difference format, the second color-difference format, and the filter information; and outputs the color-difference conversion information to the NAL unit generating unit 18.
As described above, in the encoding device 10A according to the second embodiment, the generating unit 160 receives the filter information, which is used in the converting unit 120, as the color-difference signal information. Then, the generating unit 160 generates the color-difference conversion information by referring to the color-difference signal information.
Hence, when outputting a decoded image that is obtained by decoding the encoded data encoded by the encoding device 10A, the decoded image of the encoded data having the first color-difference format is converted into a decoded image having the second color-difference format using the filter information that is identified by the filter information included in the color-difference conversion information. As a result, it becomes possible to suppress the image deterioration occurring due to resolution conversion.
Thus, even in the case when the color-difference conversion information is generated by implementing a different method than the method implemented in the first embodiment, it is possible to achieve the same effect as the effect achieved in the first embodiment.
Besides, in addition to the effect achieved in the encoding device 10 according to the first embodiment, it also becomes possible to simplify the configuration of the generating unit 160 (the generating unit 16).
Second Modification
Meanwhile, in the first embodiment, the explanation is given for a case in which the converting unit 12 includes two converting units (namely, the converting units 12A and 12B), and the resolution of the color-difference component is converted more than once. However, alternatively, the converting unit 12 can be a functional unit that converts the color difference only once. Moreover, in the first embodiment, the explanation is given for a case in which the converting unit 12 performs filter processing to reduce the resolution of the color-difference component (i.e., to perform down-sampling). However, alternatively, the converting unit 12 can be configured to perform filter processing to increase the resolution of the color-difference component (i.e., to perform up-sampling).
In this case, as illustrated in
For example, the converting unit 122 receives an original image having the 4:2:0 format. Then, the converting unit 122A converts the original image having the 4:2:0 format into an image having the 4:2:2 format. Herein, with respect to the color-difference component of each pixel constituting the original image having the 4:2:0 format, the converting unit 122A performs filter processing using filter information regarding pixel interpolation in the vertical direction. With that, the converting unit 122A performs up-sampling in which the color-difference component of each pixel constituting the original image having the 4:2:0 format is interpolated in the vertical direction. That is, the converting unit 122A converts the original image having the 4:2:0 format into an image having the 4:2:2 format. Then, the converting unit 122A outputs the post-conversion image having the 4:2:2 format to the output adjusting unit 122B.
The output adjusting unit 122B performs a clipping operation so as to ensure that the value of each pixel constituting the received image, which has the 4:2:2 format and which is received from the converting unit 122A, falls in a range between the smallest value and the largest value set according to a standard. Then, to the encoding unit 14, the output adjusting unit 122B outputs the post-clipping image as a color-difference conversion image that has been subjected to color-difference conversion in the converting unit 122.
Moreover, the output adjusting unit 122B outputs the color-difference signal information, which contains the filter information used in filter processing performed by the converting unit 122A, to the generating unit 162.
Given below is the explanation about the generating unit 162.
The generating unit 162 includes a horizontal filter information generating unit 162A and a generating unit 162B.
The horizontal filter information generating unit 162A receives, as the color-difference signal information, the filter information used in filter processing performed by the converting unit 122A (i.e., receives the horizontal down-sampling filter information).
Then, from the horizontal down-sampling filter information used in filter processing performed by the converting unit 122A, the horizontal filter information generating unit 162A designs filter information to be used in converting an image having the 4:2:2 format into an image having the 4:2:0 format. That is, the horizontal filter information generating unit 162A performs horizontal down-sampling with respect to an image having the 4:2:2 format, and designs the filter information to be used in obtaining an image having the 4:2:0 format. Then, the horizontal filter information generating unit 162A outputs horizontal filter information, which is the filter information that has been designed, to the generating unit 162B.
The generating unit 162B generates color-difference conversion information. More specifically, the generating unit 162B uses the color-difference format of the reference image (i.e., the 4:2:2 format), which is received by the encoding unit 14, as the first color-difference format of the encoded data encoded by the encoding unit 14. Moreover, the generating unit 162B reads the second color-difference format from a memory (not illustrated). Furthermore, as the filter information, the generating unit 162B makes use of the horizontal filter information received from the horizontal filter information generating unit 162A.
Then, the generating unit 162B generates the color-difference conversion information that contains the first color-difference format, the second color-difference format, and the filter information. Subsequently, the generating unit 162B outputs the color-difference conversion information to the NAL unit generating unit 18.
In this way, even in the case when the converting unit 122 performs filter processing to increase the resolution of the color-difference component (i.e., performs up-sampling), the generating unit 162 generates the color-difference conversion information that contains the first color-difference format, the second color-difference format, and the filter information.
Hence, in the second modification, it becomes possible to achieve the same effect as the effect achieved in the first embodiment.
Third Modification
In the embodiments described above, the explanation is given for a case in which color-difference conversion is performed in the encoding device 10 or the encoding device 10A. However, alternatively, the configuration may be such that the converting unit 12 (the converting unit 120 or the converting unit 122) that performs color-difference conversion is not disposed.
The encoding device 10B includes the encoding unit 14, the NAL unit generating unit 18, the transmission information generating unit 20, and the generating unit 16.
Apart from the fact that the converting unit 12 is not disposed, the encoding device 10B has the same configuration as the configuration of the encoding device 10 according to the first embodiment. In this embodiment, the encoding unit 14 of the encoding device 10B receives the color-difference conversion information from an external device. Moreover, the generating unit 16 receives the color-difference conversion information from an external device.
In this way, the encoding device 10B can be configured to not include the converting unit 12.
In a third embodiment, the explanation is given about a decoding device that decodes the encoded data included in the transmission information which is generated by any one of the encoding devices 10, 10A, and 10B.
The transmission information decoding unit 52 acquire transmission information. In the third embodiment, the explanation is given for an example in which the transmission information decoding unit 52 acquires transmission information from the encoding device 10 according to the first embodiment. Moreover, in the third embodiment, the explanation is given for an example in which the transmission information received from the encoding device 10 contains the color-difference conversion information illustrated in
The NAL unit decoding unit 54 receives the NAL unit information from the transmission information decoding unit 52, and decodes the NAL unit information. As a result, the NAL unit decoding unit 54 obtains the encoded data, the color-difference conversion information, and the byte alignment information.
Then, the NAL unit decoding unit 54 outputs the encoded data, which is obtained from the NAL unit information, to the decoding unit 56. Moreover, the NAL unit decoding unit 54 outputs the color-difference conversion information, which is obtained from the NAL unit information, to the decoding unit 58.
The decoding unit 58 decodes the color-difference conversion information; and obtains the first color-difference format, the second-color difference format, and the filter information. Then, the decoding unit 58 outputs the obtained information to the converting unit 60.
As illustrated in
Meanwhile, if the filter information included in the color-difference conversion information points to the filter information to be used in converting a decoded image having the first color-difference format into a decoded image having the second color-difference format, then the decoding unit 58A outputs the filter information without modification to the converting unit 60.
In contrast, if the filter information included in the color-difference conversion information points to the identification information that is used to identify the filter information to be used in converting a decoded image having the first color-difference format into a decoded image having the second color-difference format, then the decoding unit 58A reads the filter information identified by the identification information from definition information that is stored in advance in a memory (not illustrated). Then, as the filter information, the decoding unit 58A outputs the read filter information to the converting unit 60.
Alternatively, if the filter information included in the color-difference conversion information points to the filter information that is used in filter processing performed by the converting unit 12 of the encoding device 10; then the decoding unit 58A designs, from that filter information, filter information to be used in converting a decoded image having the first color-difference format into a decoded image having the second color-difference format. Then, as the filter information, the decoding unit 58A outputs the designed filter information to the converting unit 60.
Returning to the explanation with reference to
As illustrated in
The entropy decoding unit 56A receives the encoded data from the NAL unit decoding unit 54. Then, the entropy decoding unit 56A performs entropy decoding with respect to the received encoded data according a predetermined syntax. As a result, the entropy decoding unit 56A obtains quantized coefficients and motion vector information.
Then, the entropy decoding unit 56A outputs the quantized coefficients to the inverse quantization/inverse transform unit 56B, and outputs the motion vector information to the predicted image generating unit 56E.
The inverse quantization/inverse transform unit 56B performs inverse quantization with respect to the quantized coefficients and then performs inverse transform to generate an error image. The adding unit 56C receives the error image from the inverse quantization/inverse transform unit 56B and receives a predicted image from the predicted image generating unit 56E. Then, the adding unit 56C adds the error image and the predicted image to obtain a decoded image. Subsequently, the decoded image is stored in the frame memory 56D, and is then output to the converting unit 60 and the predicted image generating unit 56E.
The predicted image generating unit 56E generates a predicted image by referring to the decoded image and the motion vector information. Then, the predicted image generating unit 56E outputs that predicted image to the adding unit 56C.
Returning to the explanation with reference to
The converting unit 60 includes a converting unit 60A, a converting unit 60B, and an output adjusting unit 60C.
The converting unit 60A converts a decoded image having the 4:2:0 format into a decoded image having the 4:2:2 format. More particularly, from the color-difference conversion information received from the decoding unit 58, the converting unit 60A reads, as the filter information, the filter information used in filter processing performed by the converting unit 12B. Then, the converting unit 60A performs filter processing using the read filter information and converts a decoded image having the 4:2:0 format into a decoded image having the 4:2:2 format.
Then, the converting unit 60A outputs the decoded image, which has the 4:2:2 format obtained by means of resolution conversion, to the converting unit 60B. Subsequently, from the color-difference conversion information received from the decoding unit 58, the converting unit 60B reads, as the filter information, the filter information used in filter processing performed by the converting unit 12A. Then, the converting unit 60B performs filter processing using the read filter information and converts the decoded image having the 4:2:2 format into a decoded image having the 4:4:4 format. Then, the converting unit 60B outputs the decoded image, which has the 4:4:4 format obtained by means of resolution conversion, to the output adjusting unit 60C.
The output adjusting unit 60C either reads, from the color-difference conversion information, the pixel bit length at the time of output, the maximum value of the color-difference component at the time of output, and the minimum value of the color-difference component at the time of output; or performs a clipping operation with respect to the decoded image in such a way that the pixel bit length, the maximum value, and the minimum value according to the specifications of a predetermined color-difference format are satisfied. Then, the output adjusting unit 60C outputs the post-clipping decoded image as the reproducible image.
Given below is the explanation of a decoding operation performed in the decoding device 50.
Firstly, the transmission information decoding unit 52 decodes the transmission information received from the encoding device 10 (Step S200). As a result of the operation performed at Step S200, the NAL unit information is obtained.
Then, the NAL unit decoding unit 54 decodes the NAL unit information obtained at Step S200 (Step S202). As a result of the operation performed at Step S202, the NAL unit decoding unit 54 obtains the encoded data, the color-difference conversion information, and the byte alignment information.
Subsequently, the decoding unit 56 decodes the encoded data received from the NAL unit decoding unit 54, and obtains a decoded image (Step S204).
Then, the decoding unit 58 decodes the color-difference conversion information (Step S206). As a result of the operation performed at Step S206, the decoding unit 58 reads the first color-difference format, the second color-difference format, and the filter information from the color-difference conversion information. Subsequently, to the converting unit 60, the decoding unit 58 outputs the color-difference conversion information that contains the first color-difference format, the second color-difference format, and the filter information.
Then, the converting unit 60 performs color-difference conversion to convert the decoded image received from the decoding unit 56 into a decoded image having the second color-difference format specified in the color-difference conversion information (Step S208). Subsequently, the converting unit 60 outputs the reproducible image, which is obtained by converting color-difference of the decoded image, to a reproducing device. That marks the end of the routine.
As described above, the decoding device 50 receives transmission information that contains color-difference conversion information and encoded data. Then, the decoding device 50 makes use of the filter that is identified by the filter information included in the color-difference conversion information; and converts the decoded image that has the first color-difference format and that is obtained by the decoding of the encoded data into a decoded image having the second color-difference format. With that, the decoding device 50 becomes able to suppress the image deterioration occurring due to resolution conversion.
Consequently, the decoding device 50 according to the third embodiment can suppress the image deterioration.
Fourth Modification
Given below is the explanation of the operations performed by the decoding unit 58 and the decoding unit 58A (see
In this case, the decoding unit 58A decodes the color-difference conversion information according to the syntax illustrated in
As described above, in the color-difference conversion information illustrated in
Moreover, as described above, chroma_filter_info_present_flag is a flag that indicates whether or not the filter information related to color-difference conversion is present. Thus, when the value of chroma_filter_infopresent_flag is “0”, it indicates that the filter information related to color-difference conversion does not exist. Hence, the decoding unit 58 skips the value of chroma_filter_info_present_flag. On the other hand, when the value of chroma_filter_info_present_flag is “1”, it indicates that the filter information related to color-difference conversion is present. In that case, the decoding unit 58A reads, from the color-difference conversion filter definition information illustrated in
More particularly, from the color-difference conversion filter definition information illustrated in
Meanwhile, as described above, the color-difference conversion filter definition information illustrated in
More particularly, in the color-difference conversion filter definition information illustrated in
Then, the decoding unit 58A outputs the read values to the converting unit 60. The subsequent operations performed by the converting unit 60 are identical to the operations described above.
In this way, even in the case when transmission information containing the color-difference conversion information illustrated in
Fifth Modification
Given below is the explanation of the operations performed by the decoding unit 58 and the decoding unit 58A (see
In this case, the decoding unit 58A decodes the color-difference conversion information according to the syntax illustrated in
As described above, in the color-difference conversion information illustrated in
On the other hand, when the value of chroma_loc_infopresent_flag is “1”, the pixel position of a color-difference signal is present as well as the filter information related to color-difference conversion is present. Hence, in this case, the decoding unit 58A identifies the pixel sample position of the color difference according to the values indicated by chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field.
Moreover, chroma_filter_info_present_flag is a flag that indicates whether or not the filter information related to color-difference conversion is present. Thus, when the value of chroma_filter_info_present_flag is “1”, the decoding unit 58A performs decoding according to the syntax of the color-difference conversion filter information illustrated in
The following explanation is given for a case when the decoding unit 58A performs decoding according to the syntax of the color-difference conversion filter information illustrated in
As described above, num_of_filter_set_minus1 represents the value smaller by one than the filter set count, and indicates that loop processing is performed for a number of times equal to the filter set count. Moreover, implicit_filter_set_flag is a flag indicating that the information of a predefined filter set is used. When implicit_filter_set_flag is set to “1”, the decoding unit 58A reads filter_set_idc that represents the identification information which is used to identify the information of the predefined filter set. On the other hand, when implicit_filter_set_flag is set to “0”, the decoding unit 58A reads num_of_filter_minus1, which represents the value smaller by one than the color-difference conversion filter count, and implements the following loop of the color-difference conversion filter count.
As described above, implicit_filter_set_flag is a flag indicating that the information of a predefined filter set is used. When implicit_filter_set_flag is set to “1”, the decoding unit 58A reads filter_idc that represents the identification information which is used to identify the predefined filter information. On the other hand, when implicit_filter_set_flag is set to “0”, the decoding unit 58A reads tap_length_minus1 that represents the value smaller by one than the tap length of the filter coefficients. Then, the decoding unit 58A performs looping only for the tap length of the filter coefficients, and reads filter_coeff that represents the filter coefficient value.
Then, corresponding to filter_set_idc and filter_idc, the decoding unit 58A reads the following information of the predefined color-difference conversion filter definition information: the tap length of the filter coefficients (i.e., “tap length”); the filter coefficients (i.e., “filter coefficient”); the denominator while performing filter processing (i.e., “divisor”); the sample position of the color-difference pixel after filter processing (i.e., “phase shift”); and the usage of the filter information and the information on the second color-difference format (i.e., “purpose”). Meanwhile, in filter_set_idc, it is also possible to define the filter coefficients used in filter processing in the encoding device that corresponds to filter processing in the decoding device.
Subsequently, the decoding unit 58A outputs the read values to the converting unit 60. The subsequent operations performed by the converting unit 60 are identical to the operations described above.
In this way, even in the case when transmission information containing the color-difference conversion information illustrated in
Sixth Modification
In the fifth modification, the explanation is given for a case in which the decoding unit 58A performs decoding according to the syntax of the color-difference conversion filter information illustrated in
As described above, target_format_idc represents the second color-difference format; while chroma_format_idc represents the first color-difference format.
When the value of chroma_format_idc is equal to “1” and when the value of target_format_idc is greater than “1”, or when the value of chroma_format_idc is greater than “1” and when the value of target_format_idc is equal to “1”; the decoding unit 58A reads the filter information in the vertical direction.
As described above, implicit_vertical_flag is a flag that indicates the use of predefined filter information in the vertical direction. When the value of implicit_vertical_flag is set to “1”, the decoding unit 58A reads vertical filter_idc that represents the identification information which is used to identify the predefined filter information in the vertical direction. On the other hand, when the value of implicit_vertical_flag is set to “0”, the decoding unit 58A reads tap_length_vertical_minus1, which represents the value smaller by one than the tap length of the filter coefficients in the vertical direction, and reads ver_filter_coeff, which represents the vertical filter coefficients equivalent to the tap length.
Then, if the encoded data points to a field signal, the decoding unit 58A reads second_filter_flag that is a flag defined for a case when different filter sets in the vertical direction are used in the top field and the bottom field. If the value of second_filter_flag is equal to “1”, the value of coded_format_idc is equal to “1”, and the value of target_format_idc is greater than “1”; then it indicates that the second set of filter information is present.
If the value of implicit_vertical_flag is set to “1”, then the decoding unit 58A reads second_vertical filter_idc representing the identification information which is used to identify the second set of predefined filter information in the vertical direction. On the other hand, if the value of implicit_vertical_flag is set to “0”, then the decoding unit 58A reads tap_length_second_vertical_minus1, which represents the value smaller by one than the tap length of the second filter coefficient set in the vertical direction, and reads second_ver_filter_coeff, which represents the vertical filter coefficients equivalent to the tap length.
Meanwhile, when the value of chroma_format_idc is equal to “1” or “2” and when the value of target_format_idc is equal to “3”, or when the value of chroma_format_idc is equal to “3” and when the value of target_format_idc is equal to “1” or “2”; the decoding unit 58A reads the filter information in the horizontal direction.
Herein, implicit_horizontal_flag is a flag that indicates the use of predefined filter information in the horizontal direction. When the value of implicit_horizontal_flag is set to “1”, the decoding unit 58A reads horizontal_filter_idc that represents the identification information which is used to identify the predefined filter information in the horizontal direction. On the other hand, when the value of implicit_horizontal_flag is set to “0”, the decoding unit 58A reads tap_length_horizontal_minus1, which represents the value smaller by one than the tap length of the filter coefficients in the horizontal direction, and reads hor_filter_coeff, which represents the horizontal filter coefficients equivalent to the tap length.
Subsequently, the decoding unit 58A identifies filter_idc, which is illustrated in
Subsequently, the decoding unit 58A outputs the read values to the converting unit 60. The subsequent operations performed by the converting unit 60 are identical to the operations described above.
In this way, even in the case in which decoding is performed according to the syntax of the color-difference conversion filter information illustrated in
Seventh Modification
In the fifth modification, the explanation is given for a case in which the decoding unit 58A performs decoding according to the syntax of the color-difference conversion filter information illustrated in
When the value of chroma_format_idc is equal to “1” and when the value of target_format_idc is greater than “1”, or when the value of chroma_format_idc is greater than “1” and when the value of target_format_idc is equal to “1”; the decoding unit 58A reads the filter information in the vertical direction.
More particularly, the decoding unit 58A reads tap_length_vertical_minus1, which represents the value smaller by one than the tap length of the filter coefficients in the vertical direction, and reads ver_filter_coeff, which represents the vertical filter coefficients equivalent to the tap length.
Then, if the encoded data points to a field signal, the decoding unit 58A reads second_filter_flag that is a flag defined for a case when different filter sets in the vertical direction are used in the top field and the bottom field. If the value of second_filter_flag is equal to “1”, the value of coded_format_idc is equal to “1”, and the value of target_format_idc is greater than “1”; then it indicates that the second set of filter information is present.
Hence, in this case, the decoding unit 58A reads tap_length_second_vertical_minus1, which represents the value smaller by one than the tap length of the second filter coefficient set in the vertical direction, and reads second_ver_filter_coeff, which represents the vertical filter coefficients equivalent to the tap length.
Meanwhile, when the value of chroma_format_idc is equal to “1” or “2” and when the value of target_format_idc is equal to “3”, or when the value of chroma_format_idc is equal to “3” and when the value of target_format_idc is equal to “1” or “2”; the decoding unit 58A reads the filter information in the horizontal direction.
That is, the decoding unit 58A reads tap_length_horizontal_minus1, which represents the value smaller by one than the tap length of the filter coefficients in the horizontal direction, and reads hor_filter_coeff, which represents the horizontal filter coefficients equivalent to the tap length.
Then, the decoding unit 58A outputs the read values to the converting unit 60. The subsequent operations performed by the converting unit 60 are identical to the operations described above.
In this way, even in the case in which decoding is performed according to the syntax of the color-difference conversion filter information illustrated in
Eighth Modification
Given below is concrete explanation of a case in which the decoding device 50 receives transmission information that contains, as the filter information, the filter information used in filter processing performed by the converting unit 12 of the encoding device 10.
In this case, the decoding device 50 can be configured to include a decoding unit 580 in place of the decoding unit 58.
The decoding unit 580A analyzes the color-difference conversion information, and reads the first color-difference format, the second color-difference format, and the filter information from the color-difference conversion information. In the eighth modification, the filter information points to the filter information used in filter processing performed by the converting unit 12 of the encoding device 10. Moreover, in the eighth modification, the vertical down-sampling filter information and the horizontal down-sampling filter information is also included in the filter information.
From the vertical down-sampling filter information included in the filter information, the vertical filter information generating unit 580B generates vertical up-sampling filter information to be used in filter processing in the converting unit 60 of the decoding device 50. Similarly, from the horizontal down-sampling filter information included in the filter information, the horizontal filter information generating unit 580C generates horizontal up-sampling filter information to be used in filter processing in the converting unit 60 of the decoding device 50. Then, to the converting unit 60, the decoding unit 580 outputs the vertical up-sampling filter information generated by the vertical filter information generating unit 580B, the horizontal up-sampling filter information generated by the horizontal filter information generating unit 580C, and the color-difference conversion information containing the first color-difference format, and the second color-difference format.
Then, in an identical manner to the third embodiment, the converting unit 60 reads the first color-difference format, the second color-difference format, and the filter information from the color-difference conversion information. Subsequently, the converting unit 60 makes use of the filter identified by the filter information and converts the resolution of the color-difference component of the decoded image represented by the first color-difference format. With that, the converting unit 60 converts the decoded image having the first color-difference format into a decoded image having the second color-difference format. Then, the converting unit 60 outputs the reproducible image, which is obtained by resolution conversion with respect to the color-difference component of the decoded image, to a reproducing device.
In this way, regarding the filter information used in filter processing performed by the converting unit 60 of the decoding device 50, the filter information can be generated in the decoding device 50.
Meanwhile, assume that the filter information that is included in the color-difference conversion information generated by the decoding unit 58 or the decoding unit 580 contains vertical down-sampling filter information.
In such a case, the decoding device 50 is configured to include a converting unit 600 in place of the converting unit 60.
The converting unit 600 includes a converting unit 600A and an output adjusting unit 600B.
The converting unit 600A receives a decoded image having the 4:2:2 format from the decoding unit 56. Then, the converting unit 600A makes use of the vertical down-sampling filter information included in the filter information that is included in the color-difference conversion information received from the decoding unit 58 or the decoding unit 580, and converts the decoded image having the 4:2:2 format into a decoded image having the 4:2:0 format. That is, with respect to the color-difference component of each pixel constituting the decoded image having the 4:2:2 format, the converting unit 600A performs down-sampling for the purpose of decimating the color-difference component to half in the vertical direction. Then, the converting unit 600A outputs the decoded image having the 4:2:0 format to the output adjusting unit 600B.
The output adjusting unit 600B either reads, from the color-difference conversion information, the pixel bit length at the time of output, the maximum value of the color-difference component at the time of output, and the minimum value of the color-difference component at the time of otuput; or performs a clipping operation with respect to the decoded image in such a way that the pixel bit length, the maximum value, and the minimum value according to the specifications of a predetermined color-difference format are satisfied. Then, the output adjusting unit 600B outputs the post-clipping decoded image as the reproducible image to be reproduced.
Given below is the explanation about a hardware configuration of the encoding device 10, the encoding device 10A, the encoding device 10B, and the decoding device 50.
Each of the encoding device 10, the encoding device 10A, the encoding device 10B, and the decoding device 50 according to the embodiments has the hardware configuration of a commonly-used computer in which a communication interface (I/F) 86, a central processing unit (CPU) 80, a read only memory (ROM) 82, and a random access memory (RAM) 84 are connected to each other by a bus.
The CPU 80 is a processor that controls the overall operations performed in the encoding device 10, the encoding device 10A, the encoding device 10B, or the decoding device 50. The RAM 84 is used to store the data required for various operations performed by the corresponding CPU 80. The ROM 82 is used to store computer programs used in implementing various operations performed by the corresponding CPU 80. The communication I/F 86 is an interface that establishes connection with an external device via a communication line, and sends data to and receives data from that external device.
Meanwhile, a computer program executed in the encoding device 10, the encoding device 10A, and the encoding device 10B for performing the encoding operation as well as a computer program executed in the decoding device 50 for performing the decoding operation is stored in advance in the ROM 82.
Alternatively, the computer program executed in the encoding device 10, the encoding device 10A, and the encoding device 10B for performing the encoding operation as well as a computer program executed in the decoding device 50 for performing the decoding operation may be recorded in the form of an installable file or an executable file in a computer-readable storage medium such as a compact disk read only memory (CD-ROM), a flexible disk (FD), a compact disk readable (CD-R), or a digital versatile disk (DVD); and can be provided as a computer program product.
Still alternatively, the computer program executed in the encoding device 10, the encoding device 10A, and the encoding device 10B for performing the encoding operation as well as a computer program executed in the decoding device 50 for performing the decoding operation may be saved as a downloadable file on a computer connected to the Internet or can be made available for distribution through a network such as the Internet.
Meanwhile, the computer program executed in the encoding device 10, the encoding device 10A, and the encoding device 10B for performing the encoding operation as well as a computer program executed in the decoding device 50 for performing the decoding operation contains a module for each of the respective constituent elements to be implemented in a computer. In practice, for example, the CPU 80 reads the computer programs from the corresponding ROM 82 and runs them such that the computer programs are loaded in a main memory device. As a result, the module for each constituent element is generated in the main memory device.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2012-208837 | Sep 2012 | JP | national |
2012-270314 | Dec 2012 | JP | national |
This application is a continuation application of U.S. application Ser. No. 15/445,767, filed Feb. 28, 2017, which is a continuation application of U.S. application Ser. No. 14/028,687 (now U.S. Pat. No. 9,621,867), filed Sep. 17, 2013, which is based upon and claims the benefit of priority from Japanese Patent Application Nos. 2012-208837, filed on Sep. 21, 2012 and 2012-270314, filed on Dec. 11, 2012; the entire contents of each of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 15445767 | Feb 2017 | US |
Child | 15680039 | US | |
Parent | 14028687 | Sep 2013 | US |
Child | 15445767 | US |