summaryrefslogtreecommitdiff
path: root/libavcodec/dv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-22 21:37:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-22 22:26:55 +0200
commit70d54392f5015b9c6594fcae558f59f952501e3b (patch)
treebf8188c68474cebf9982c80cfe6244b3d4347f23 /libavcodec/dv.c
parent92ef4be4ab9fbb7d901b22e0036a4ca90b00a476 (diff)
lowres2 support.
The new lowres support is limited to decoders where lowres decoding is possible in high quality. I was not able to measure any speed difference, but if one is found the 2-3 lines that might affect speed can be made compile time conditional Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dv.c')
-rw-r--r--libavcodec/dv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index e13026628d..5bb84793b5 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -311,7 +311,13 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx)
/* 248DCT setup */
s->fdct[1] = dsp.fdct248;
s->idct_put[1] = ff_simple_idct248_put; // FIXME: need to add it to DSP
- memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64);
+ if (avctx->lowres){
+ for (i = 0; i < 64; i++){
+ int j = ff_zigzag248_direct[i];
+ s->dv_zigzag[1][i] = dsp.idct_permutation[(j & 7) + (j & 8) * 4 + (j & 48) / 2];
+ }
+ }else
+ memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64);
avctx->coded_frame = &s->picture;
s->avctx = avctx;