Skip to contentSkip to conversation

tinyjpeg: Dynamic luminance quantization table for Pixart JPEG

PATCH Superseded Jean-Francois Moine 1 participant 1 message Apr 11, 2012 Media (V4L/DVB)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tinyjpeg: Dynamic luminance quantization table for Pixart JPEG

In PJPG blocks, a marker gives the quantization tables to use for image decoding. This patch dynamically updates the luminance table when the marker changes.

Note that the values of this table have been guessed from a small number of images and that they may not work fine in some situations, but, in most cases, the images are better rendered.

lib/libv4lconvert/tinyjpeg-internal.h +1 -0
index 702a2a2..4041251 100644
@@ -103,6 +103,7 @@ struct jdec_private {
 #if SANITY_CHECK
 	unsigned int current_cid;			/* For planar JPEG */
 #endif
+	unsigned char marker;			/* for PJPG (Pixart JPEG) */
 
 	/* Temp space used after the IDCT to store each components */
 	uint8_t Y[64 * 4], Cr[64], Cb[64];
lib/libv4lconvert/tinyjpeg.c +52 -4

80 lines not on this page · raw message

Signature · 3 lines
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
t