Mercurial > libavcodec.hg
comparison mpegvideo.c @ 2620:08cce4785567 libavcodec
remove duplicate clip to 8bit function
author | michael |
---|---|
date | Wed, 20 Apr 2005 10:05:15 +0000 |
parents | ba6530ae8e34 |
children | bf158d23bbcc |
comparison
equal
deleted
inserted
replaced
2619:c39756a516a5 | 2620:08cce4785567 |
---|---|
5365 /* for mjpeg, we do include qscale in the matrix */ | 5365 /* for mjpeg, we do include qscale in the matrix */ |
5366 s->intra_matrix[0] = ff_mpeg1_default_intra_matrix[0]; | 5366 s->intra_matrix[0] = ff_mpeg1_default_intra_matrix[0]; |
5367 for(i=1;i<64;i++){ | 5367 for(i=1;i<64;i++){ |
5368 int j= s->dsp.idct_permutation[i]; | 5368 int j= s->dsp.idct_permutation[i]; |
5369 | 5369 |
5370 s->intra_matrix[j] = CLAMP_TO_8BIT((ff_mpeg1_default_intra_matrix[i] * s->qscale) >> 3); | 5370 s->intra_matrix[j] = clip_uint8((ff_mpeg1_default_intra_matrix[i] * s->qscale) >> 3); |
5371 } | 5371 } |
5372 convert_matrix(&s->dsp, s->q_intra_matrix, s->q_intra_matrix16, | 5372 convert_matrix(&s->dsp, s->q_intra_matrix, s->q_intra_matrix16, |
5373 s->intra_matrix, s->intra_quant_bias, 8, 8, 1); | 5373 s->intra_matrix, s->intra_quant_bias, 8, 8, 1); |
5374 s->qscale= 8; | 5374 s->qscale= 8; |
5375 } | 5375 } |