CPC H04N 19/124 (2014.11) [H04N 19/126 (2014.11); H04N 19/60 (2014.11)] | 20 Claims |
1. A method comprising:
at an electronic device including one or more processors and non-transitory memory:
receiving an image comprising a plurality of pixels having respective plurality of pixel locations and a respective plurality of pixel values;
applying a frequency transform to a spatial portion of the image to generate a plurality of frequency coefficients respectively associated with a plurality of spatial frequencies;
obtaining a quantization matrix including, for each of the plurality of spatial frequencies, a respective quantization parameter;
determining a category of the spatial portion of the image based on a relation between a plurality of thresholds associated with a plurality of quantization scaling parameters and a bit rate of the spatial portion of the image at the plurality of quantization scaling parameters;
determining a quantization scaling parameter for the spatial portion of the image based the category;
quantizing the plurality of frequency coefficients according to the quantization matrix and the quantization scaling parameter for the spatial portion of the image to generate a plurality of quantized frequency coefficients; and
transmitting the plurality of quantized frequency coefficients.
|