diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-09-26 10:01:40 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-09-26 10:01:40 +0000 |
commit | 1aa8c57b4acc212bc5a3726f18f98922cd39d810 (patch) | |
tree | ed592209fc6849e66089685ce46c4719cf9d19d1 /libavcodec/dsputil.c | |
parent | 6aeb03d887b37cc20d0744200742a6fffcbbf99a (diff) | |
download | ffmpeg-1aa8c57b4acc212bc5a3726f18f98922cd39d810.tar.gz |
1/8 resolution decoding
Originally committed as revision 3511 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 9bf409d65e..3db04c00a7 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -3382,6 +3382,19 @@ static void ff_jref_idct2_add(uint8_t *dest, int line_size, DCTELEM *block) add_pixels_clamped2_c(block, dest, line_size); } +static void ff_jref_idct1_put(uint8_t *dest, int line_size, DCTELEM *block) +{ + uint8_t *cm = cropTbl + MAX_NEG_CROP; + + dest[0] = cm[(block[0] + 4)>>3]; +} +static void ff_jref_idct1_add(uint8_t *dest, int line_size, DCTELEM *block) +{ + uint8_t *cm = cropTbl + MAX_NEG_CROP; + + dest[0] = cm[dest[0] + ((block[0] + 4)>>3)]; +} + /* init static data */ void dsputil_static_init(void) { @@ -3430,6 +3443,11 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) c->idct_add= ff_jref_idct2_add; c->idct = j_rev_dct2; c->idct_permutation_type= FF_NO_IDCT_PERM; + }else if(avctx->lowres==3){ + c->idct_put= ff_jref_idct1_put; + c->idct_add= ff_jref_idct1_add; + c->idct = j_rev_dct1; + c->idct_permutation_type= FF_NO_IDCT_PERM; }else{ if(avctx->idct_algo==FF_IDCT_INT){ c->idct_put= ff_jref_idct_put; |