-
Fergus Simpson authored
A bit and a three bit literal have been added to the uncompressed frame header for use by the frame superres experiment. The bit is true if scaling is to be used, and is immediately followed by a three bit literal that encodes the scale to use. If the first bit is false, scaling is disabled and the scale factor numerator is set to the denominator (ie. 1:1 scaling). No literal follows if scaling is disabled. The denominator has been defined as a constant 16. The literal is biased by a defined constant of 8 - allowing fractions from 1/2 to 15/16 scaling in steps of 1/16 when scaling is used. Experimentation will be needed to discover which of these are useful. The bit and literal are immediately after the optional render_width and render_height, so that the superres parameters can be written and read just after the regular width and height, without interfering with the render_size parameters. This patch also adds an arbitrary write to make the scale 1:1, so as to not trigger any scaling until it's ready. Accompanying encode and decode helper functions are added. Change-Id: I8caa6247c73f5c7f84ef1fde1e80eb9b20bde0e3
e7508413