summaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-10-23 09:11:56 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-10-23 09:11:56 +0000
commitb4c3816cfaee19638f0d8b71a31fced84c34236c (patch)
tree10e449e29a1902d2328051628d2f94ef38f019c7 /libavcodec/mpegvideo.c
parent10becaaf12a5ae7860a62f330a2120d7da3e5c40 (diff)
downloadffmpeg-streaming-b4c3816cfaee19638f0d8b71a31fced84c34236c.zip
ffmpeg-streaming-b4c3816cfaee19638f0d8b71a31fced84c34236c.tar.gz
optionally merge postscale into quantization table for the float aan dct
Originally committed as revision 2420 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 4e86d71..35ee649 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -101,7 +101,11 @@ static void convert_matrix(MpegEncContext *s, int (*qmat)[64], uint16_t (*qmat16
for(qscale=qmin; qscale<=qmax; qscale++){
int i;
- if (s->dsp.fdct == ff_jpeg_fdct_islow || s->dsp.fdct == ff_faandct) {
+ if (s->dsp.fdct == ff_jpeg_fdct_islow
+#ifdef FAAN_POSTSCALE
+ || s->dsp.fdct == ff_faandct
+#endif
+ ) {
for(i=0;i<64;i++) {
const int j= s->dsp.idct_permutation[i];
/* 16 <= qscale * quant_matrix[i] <= 7905 */
@@ -112,7 +116,11 @@ static void convert_matrix(MpegEncContext *s, int (*qmat)[64], uint16_t (*qmat16
qmat[qscale][i] = (int)((uint64_t_C(1) << QMAT_SHIFT) /
(qscale * quant_matrix[j]));
}
- } else if (s->dsp.fdct == fdct_ifast) {
+ } else if (s->dsp.fdct == fdct_ifast
+#ifndef FAAN_POSTSCALE
+ || s->dsp.fdct == ff_faandct
+#endif
+ ) {
for(i=0;i<64;i++) {
const int j= s->dsp.idct_permutation[i];
/* 16 <= qscale * quant_matrix[i] <= 7905 */
OpenPOWER on IntegriCloud