[Mplayer-cvslog] CVS: main/libvo jpeg_enc.c,1.18,1.19

Rik Snel CVS rik at mplayerhq.hu
Fri Oct 31 23:23:12 CET 2003


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv16813

Modified Files:
	jpeg_enc.c 
Log Message:
function convert_matrix() is fixed (off-by-one error) and it is now called with the optimal arguments so that it doesn't do unneeded work, the change was inspired by a comment from Alex

Index: jpeg_enc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/jpeg_enc.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- jpeg_enc.c	24 Oct 2003 16:44:05 -0000	1.18
+++ jpeg_enc.c	31 Oct 2003 22:22:46 -0000	1.19
@@ -79,7 +79,7 @@
 {
     int qscale;
 
-    for(qscale=qmin; qscale<qmax; qscale++){
+    for(qscale=qmin; qscale<=qmax; qscale++){
         int i;
 	if (s->dsp.fdct == ff_jpeg_fdct_islow) {
 		for (i = 0; i < 64; i++) {
@@ -367,7 +367,7 @@
 		j->s->intra_matrix[i] = CLAMP_TO_8BIT(
 			(ff_mpeg1_default_intra_matrix[i]*j->s->qscale) >> 3);
 	convert_matrix(j->s, j->s->q_intra_matrix, j->s->q_intra_matrix16, 
-			j->s->intra_matrix, j->s->intra_quant_bias, 1, 31);
+			j->s->intra_matrix, j->s->intra_quant_bias, 8, 8);
 	return j;
 }	
 



More information about the MPlayer-cvslog mailing list