| CPC H04N 19/42 (2014.11) [H04N 19/124 (2014.11); H04N 19/167 (2014.11); H04N 19/182 (2014.11); H04N 19/1887 (2014.11); H04N 19/50 (2014.11)] | 28 Claims |

|
1. A video encoding apparatus for Bayer pattern images, comprising:
a quantizer configured to perform quantization over a difference value D between an input pixel and a current predicted pixel to generate a quantized value Δ in a quantization sequence based on a quantization parameter Q and the following equation: Δ=└(|D|+└Q/2┘+1)×A/N┘;
a predictor coupled to the quantizer and configured to perform a set of first operations comprising: providing the current predicted pixel according to a position of a current segment in a current Bayer pattern image; and
a variable-length coder coupled to the quantizer and configured to perform a set of second operations comprising: (1) counting a number ZR of consecutive zeros that either precede a following non-zero integer in the quantization sequence or are arranged in the end of the quantization sequence; (2) encoding the number ZR of consecutive zeros into a first codeword by a first codeword set; (3) encoding the following non-zero integer into a second codeword by a second codeword set; and, (4) repeating the second operations of (1) to (3) until all the quantized values in the quantization sequence are processed to produce an encoded bitstream;
wherein A satisfies the following equation: (Q×A+1)=N, where N=2d≥2n, n denotes a bit width of the input pixel and d is an integer.
|