Offset decoding device, offset coding device, image filtering device
An adaptive offset filter ( 60 ) adds an offset to the pixel value of each pixel forming an input image. The adaptive offset filter ( 60 ) refers to offset-type specifying information, sets offset attributes for a subject unit area of the input image, decodes an offset having a bit width corresponding to an offset value range included in the set offset attributes, and adds the offset to the pixel value of each pixel forming the input image.
1. An image filtering device, comprising:
an offset attribute setting section, configured to set an upmost limit of an offset value range in accordance with a bit depth of pixel values of pixels forming an image that is to be encoded;
an offset encoding section, configured to encode an offset value which is restricted to be within the offset value range, wherein an offset bit depth of the offset value is equal to one of:
the bit depth of the pixel values in a case in which the bit depth of the pixel values is ten or smaller, or
the offset bit depth of the offset value is equal to ten in a case in which the bit depth of the pixel values is eleven or greater;
wherein the offset attribute setting section is configured to set a maximum bit length representing the upmost limit of the offset value range to be (the offset bit depth−K) or smaller, wherein the upmost limit of the offset value range is determined to be (2 (the offset bit depth-K-1) −1), and K is an integer greater than 0.
2. The image filtering device according to claim 1 , wherein a value of K is equal to 4.
3. A non-transitory computer-readable storage medium having stored instructions, which cause a processor to generate a video that has been filtered by an image filtering method, wherein the filtering method comprises:
setting, by a Sample Adaptive Offset (SAO) filter, an upmost limit of an offset value range in accordance with a bit depth of pixel values of pixels for an image that is to be encoded;
encoding, by an encoder, an offset value which is restricted to be within the offset value range, wherein an offset bit depth of the offset value is equal to one of:
the bit depth of the pixel values in a case in which the bit depth of the pixel values is ten or smaller, or the offset bit depth of the offset value is ten in a case in which the bit depth of the pixel values is eleven or greater;
wherein a maximum bit length representing the upmost limit of the offset value range is set by the SAO filter to be (the offset bit depth−K) or smaller, wherein the upmost limit of the offset value range is determined to be (2 (the offset bit depth-K-1) −1), and K is an integer greater than 0.
4. The non-transitory computer-readable storage medium of claim 3 , wherein a value of K is equal to 4.
5. An image filtering device comprising:
a non-transitory memory having processor-executable instructions stored thereon; and
a processor in communication with the non-transitory memory, the processor being configured to execute the processor-executable instructions stored in the non-transitory memory to cause the image filtering device to perform the steps of:
setting an upmost limit of an offset value range in accordance with a bit depth of pixel values of pixels for an image that is to be encoded;
encoding an offset value which is restricted to be within the offset value range, wherein:
an offset bit depth of the offset value is equal to the bit depth of the pixel values in a case in which the bit depth of the pixel values is ten or smaller, or
the offset bit depth of the offset value is equal to ten in a case in which the bit depth of the pixel values is eleven or greater; and, wherein a maximum bit length representing the upmost limit of the offset value range is set by the SAO filter to be (the offset bit depth−K) or smaller,
wherein the upmost limit of the offset value range is determined to be (2 (the offset bit depth-K-1) −1), and K is an integer greater than 0.
6. The image filtering device of claim 5 , wherein a value of K is equal to 4.