[Mplayer-cvslog] CVS: main/libvo jpeg_enc.c,1.9,1.10
Rik Snel CVS
rik at mplayerhq.hu
Mon Sep 30 23:46:57 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv16454
Modified Files:
jpeg_enc.c
Log Message:
libavcodec sync; zigzag_direct and block_permute_op replaced by non-globals in MpegEncContext
Index: jpeg_enc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/jpeg_enc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- jpeg_enc.c 30 Aug 2002 09:55:34 -0000 1.9
+++ jpeg_enc.c 30 Sep 2002 21:46:54 -0000 1.10
@@ -83,7 +83,7 @@
int i;
if (s->fdct == ff_jpeg_fdct_islow) {
for (i = 0; i < 64; i++) {
- const int j = block_permute_op(i);
+ const int j = s->idct_permutation[i];
/* 16 <= qscale * quant_matrix[i] <= 7905
* 19952 <= aanscales[i] * \
* qscale * quant_matrix[i] <= 205026
@@ -96,7 +96,7 @@
}
} else if (s->fdct == fdct_ifast) {
for(i=0;i<64;i++) {
- const int j= block_permute_op(i);
+ const int j = s->idct_permutation[i];
/* 16 <= qscale * quant_matrix[i] <= 7905 */
/* 19952 <= aanscales[i] * qscale * quant_matrix[i] <= 249205026 */
/* (1<<36)/19952 >= (1<<36)/(aanscales[i] * qscale * quant_matrix[i]) >= (1<<36)/249205026 */
@@ -107,13 +107,14 @@
}
} else {
for(i=0;i<64;i++) {
+ const int j = s->idct_permutation[i];
/* We can safely suppose that 16 <= quant_matrix[i] <= 255
So 16 <= qscale * quant_matrix[i] <= 7905
so (1<<19) / 16 >= (1<<19) / (qscale * quant_matrix[i]) >= (1<<19) / 7905
so 32768 >= (1<<19) / (qscale * quant_matrix[i]) >= 67
*/
qmat [qscale][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[i]);
- qmat16[qscale][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[block_permute_op(i)]);
+ qmat16[qscale][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[j]);
if(qmat16[qscale][i]==0 || qmat16[qscale][i]==128*256) qmat16[qscale][i]=128*256-1;
@@ -178,7 +179,7 @@
run = 0;
last_index = s->block_last_index[n];
for(i=1;i<=last_index;i++) {
- j = zigzag_direct[i];
+ j = s->intra_scantable.permutated[i];
val = block[j];
if (val == 0) {
run++;
@@ -220,7 +221,7 @@
const int minlevel= s->min_qcoeff;
for(i=0; i<=last_index; i++){
- const int j = zigzag_direct[i];
+ const int j = s->intra_scantable.permutated[i];
int level = block[j];
if (level>maxlevel) level=maxlevel;
@@ -362,8 +363,8 @@
j->s->intra_matrix[0] = ff_mpeg1_default_intra_matrix[0];
for (i = 1; i < 64; i++)
- j->s->intra_matrix[i] =
- (ff_mpeg1_default_intra_matrix[i]*j->s->qscale) >> 3;
+ 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->q_intra_matrix16_bias,
j->s->intra_matrix, j->s->intra_quant_bias);
More information about the MPlayer-cvslog
mailing list