diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-09-26 00:18:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-09-26 00:18:12 +0000 |
commit | 9ca358b9511a412a4b45880ce78cd7479087ad92 (patch) | |
tree | f36a9c02d3b3cf30acca2c6c27806dcc275c9b86 /libavcodec/jrevdct.c | |
parent | 8cbd529f12203050780025dfae837e50591d3145 (diff) | |
download | ffmpeg-9ca358b9511a412a4b45880ce78cd7479087ad92.tar.gz |
1/4 resolution decoding
Originally committed as revision 3509 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/jrevdct.c')
-rw-r--r-- | libavcodec/jrevdct.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libavcodec/jrevdct.c b/libavcodec/jrevdct.c index 1c253fee39..8bc0d1657d 100644 --- a/libavcodec/jrevdct.c +++ b/libavcodec/jrevdct.c @@ -1203,8 +1203,6 @@ void j_rev_dct4(DCTBLOCK data) register int *idataptr = (int*)dataptr; - /* WARNING: we do the same permutation as MMX idct to simplify the - video core */ d0 = dataptr[0]; d2 = dataptr[1]; d4 = dataptr[2]; @@ -1627,6 +1625,20 @@ void j_rev_dct4(DCTBLOCK data) } } +void j_rev_dct2(DCTBLOCK data){ + int d00, d01, d10, d11; + + data[0] += 4; + d00 = data[0+0*DCTSTRIDE] + data[1+0*DCTSTRIDE]; + d01 = data[0+0*DCTSTRIDE] - data[1+0*DCTSTRIDE]; + d10 = data[0+1*DCTSTRIDE] + data[1+1*DCTSTRIDE]; + d11 = data[0+1*DCTSTRIDE] - data[1+1*DCTSTRIDE]; + + data[0+0*DCTSTRIDE]= (d00 + d10)>>3; + data[1+0*DCTSTRIDE]= (d01 + d11)>>3; + data[0+1*DCTSTRIDE]= (d00 - d10)>>3; + data[1+1*DCTSTRIDE]= (d01 - d11)>>3; +} #undef FIX #undef CONST_BITS |