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. A video coding method, comprising:
determining an offset bit depth (SAO_DEPTH) based on a pixel bit depth (PIC_DEPTH), wherein when PIC_DEPTH is ten bits or smaller, SAO_DEPTH is set to be equal to PIC_DEPTH, and when PIC_DEPTH is eleven bits or greater, SAO_DEPTH is set to be ten bits, and wherein SAO_DEPTH represents a bit depth of an offset to be added to a pixel;
setting an offset value range by using the offset bit depth, wherein a maximum bit length representing the offset value range is SAO_DEPTH−K, and the value of K is equal to 4; and
generating coded data, wherein the coded data includes the offset restricted to the offset value range.
2. The method of claim 1 , wherein the offset value range is within −2 (SAO_DEPTH-K-1) to 2 (SAO_DEPTH-K-1) −1.
3. The method of claim 1 , wherein the method further comprises:
performing bitwise right shift on the offset by a shift value.
4. The method of claim 3 , wherein the shift value is determined based on PIC_DEPTH.
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:
determining an offset bit depth (SAO_DEPTH) based on a pixel bit depth (PIC_DEPTH), wherein when PIC_DEPTH is ten bits or smaller, an offset bit depth (SAO_DEPTH) of the offset value is set to be equal to PIC_DEPTH, and when PIC_DEPTH is eleven bits or greater, SAO_DEPTH is set to be ten bits, and wherein SAO_DEPTH represents a bit depth of an offset to be added to a pixel;
setting an offset value range by using the offset bit depth, wherein a maximum bit length representing the offset value range is SAO_DEPTH−K, and the value of K is equal to 4; and
generating coded data, wherein the coded data includes the offset restricted to the offset value range.
6. The image filtering device of claim 5 , wherein the offset value range is within −2 (SAO_DEPTH-K-1) to 2 (SAO_DEPTH-K-1) −1.
7. The image filtering device of claim 5 , wherein the processor executes the instructions to perform bitwise right shift on the offset by a shift value.
8. The image filtering device of claim 7 , wherein the shift value is determined based on PIC_DEPTH.
9. A non-transitory computer-readable medium for storing instructions, which cause a processor to generate coded data associated with a video, wherein the coded data includes an offset restricted to an offset value range;
the offset value range is set by using an offset bit depth (SAO_DEPTH), wherein SAO_DEPTH represents a bit depth of an offset to be added to a pixel, and wherein a maximum bit length representing the offset value range is SAO_DEPTH−K, and the value of K is equal to 4;
SAO_DEPTH is determined based on a pixel bit depth (PIC_DEPTH), wherein when PIC_DEPTH is ten bits or smaller, SAO_DEPTH is set to be equal to PIC_DEPTH, and when PIC_DEPTH is eleven bits or greater, SAO_DEPTH is set to be ten bits.
10. The non-transitory computer-readable medium of claim 9 , wherein the offset value range is within −2 (SAO_DEPTH-K-1) to 2 (SAO_DEPTH-K-1) −1.
11. The non-transitory computer-readable medium of claim 9 , wherein a bitwise right shift is performed on the offset by a shift value.
12. The non-transitory computer-readable medium of claim 11 , wherein the shift value is determined based on PIC_DEPTH.
13. The non-transitory computer-readable medium of claim 9 , where the offset is stored in an offset information storage section.