From 91823a6efd6a036e76bca0b6bb7bc98de3a8cf8c Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 9 Dec 2007 05:54:59 +0000 Subject: [PATCH] Add 4x4 IDCT Originally committed as revision 11198 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/simple_idct.c | 14 ++++++++++++++ libavcodec/simple_idct.h | 1 + 2 files changed, 15 insertions(+) diff --git a/libavcodec/simple_idct.c b/libavcodec/simple_idct.c index 50d785761a..7bf0836aa4 100644 --- a/libavcodec/simple_idct.c +++ b/libavcodec/simple_idct.c @@ -585,3 +585,17 @@ void ff_simple_idct48_add(uint8_t *dest, int line_size, DCTELEM *block) } } +void ff_simple_idct44_add(uint8_t *dest, int line_size, DCTELEM *block) +{ + int i; + + /* IDCT4 on each line */ + for(i=0; i<4; i++) { + idct4row(block + i*8); + } + + /* IDCT4 and store */ + for(i=0; i<4; i++){ + idct4col_add(dest + i, line_size, block + i); + } +} diff --git a/libavcodec/simple_idct.h b/libavcodec/simple_idct.h index 806bde723f..6ae48a24e5 100644 --- a/libavcodec/simple_idct.h +++ b/libavcodec/simple_idct.h @@ -42,5 +42,6 @@ void ff_simple_idct248_put(uint8_t *dest, int line_size, DCTELEM *block); void ff_simple_idct84_add(uint8_t *dest, int line_size, DCTELEM *block); void ff_simple_idct48_add(uint8_t *dest, int line_size, DCTELEM *block); +void ff_simple_idct44_add(uint8_t *dest, int line_size, DCTELEM *block); #endif /* FFMPEG_SIMPLE_IDCT_H */