avcodec/proresdsp & idct: move biasing from after the IDCT into the IDCT

This replaces 64 additions by 8 additions

MSE Changes from 0.04873672 to 0.05012422

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-01-12 01:23:50 +01:00
parent 12bc33d7cd
commit d9e556ebd0
15 changed files with 25 additions and 20 deletions

View File

@ -107,6 +107,9 @@ static void ff_prores_idct_wrap(int16_t *dst){
qmat[i]=4;
}
ff_prores_idct(dst, qmat);
for(i=0; i<64; i++) {
dst[i] -= 512;
}
}
#if ARCH_X86_64 && HAVE_MMX && HAVE_YASM
void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize,

View File

@ -31,7 +31,7 @@
#define CLIP_MIN (1 << (PRORES_BITS_PER_SAMPLE - 8)) ///< minimum value for clipping resulting pixels
#define CLIP_MAX (1 << PRORES_BITS_PER_SAMPLE) - CLIP_MIN - 1 ///< maximum value for clipping resulting pixels
#define CLIP_AND_BIAS(x) (av_clip((x) + BIAS, CLIP_MIN, CLIP_MAX))
#define CLIP_AND_BIAS(x) (av_clip((x), CLIP_MIN, CLIP_MAX))
#if CONFIG_PRORES_DECODER | CONFIG_PRORES_LGPL_DECODER
/**

View File

@ -232,6 +232,8 @@ void ff_prores_idct(int16_t *block, const int16_t *qmat)
for (i = 0; i < 8; i++)
idctRowCondDC_10(block + i*8, 2);
for (i = 0; i < 8; i++)
for (i = 0; i < 8; i++) {
block[i] += 8192;
idctSparseCol_10(block + i);
}
}

View File

@ -1,3 +1,3 @@
#tb 0: 100/2997
0, 0, 0, 1, 8294400, 0xe8e9d448
0, 1, 1, 1, 8294400, 0xe8e9d448
0, 0, 0, 1, 8294400, 0x434ecf5c
0, 1, 1, 1, 8294400, 0x434ecf5c

View File

@ -1,3 +1,3 @@
#tb 0: 100/2997
0, 0, 0, 1, 8294400, 0x817063b0
0, 1, 1, 1, 8294400, 0x817063b0
0, 0, 0, 1, 8294400, 0xd28b6996
0, 1, 1, 1, 8294400, 0xd28b6996

View File

@ -1,3 +1,3 @@
#tb 0: 100/2997
0, 0, 0, 1, 8294400, 0xcd4ccde1
0, 1, 1, 1, 8294400, 0xcd4ccde1
0, 0, 0, 1, 8294400, 0x38b30b72
0, 1, 1, 1, 8294400, 0x38b30b72

View File

@ -1,3 +1,3 @@
#tb 0: 100/2997
0, 0, 0, 1, 8294400, 0x51d29320
0, 1, 1, 1, 8294400, 0x51d29320
0, 0, 0, 1, 8294400, 0xc1fa4263
0, 1, 1, 1, 8294400, 0xc1fa4263

View File

@ -1,3 +1,3 @@
#tb 0: 100/2997
0, 0, 0, 1, 16588800, 0x8dcdb600
0, 1, 1, 1, 16588800, 0x8dcdb600
0, 0, 0, 1, 16588800, 0x50d4b7ee
0, 1, 1, 1, 16588800, 0x50d4b7ee

View File

@ -1,3 +1,3 @@
#tb 0: 100/2997
0, 0, 0, 1, 12441600, 0x254d8f95
0, 1, 1, 1, 12441600, 0x254d8f95
0, 0, 0, 1, 12441600, 0xd0299183
0, 1, 1, 1, 12441600, 0xd0299183

View File

@ -1,5 +1,5 @@
#tb 0: 1/25
#tb 1: 1/48000
0, 0, 0, 1, 16588800, 0x20778f5e
0, 0, 0, 1, 16588800, 0xb3cedec5
1, 0, 0, 1024, 4096, 0x00000000
1, 1024, 1024, 896, 3584, 0x00000000

View File

@ -1,5 +1,5 @@
#tb 0: 1/25
#tb 1: 1/48000
0, 0, 0, 1, 12441600, 0x58bff47d
0, 0, 0, 1, 12441600, 0x78aa43f3
1, 0, 0, 1024, 4096, 0x00000000
1, 1024, 1024, 896, 3584, 0x00000000

View File

@ -1,4 +1,4 @@
176b9fa03cc0946c6a41f2dcfad46805 *tests/data/fate/vsynth1-prores.mov
5022821 tests/data/fate/vsynth1-prores.mov
a2e2d1d45341a94ff994d1d92629f778 *tests/data/fate/vsynth1-prores.out.rawvideo
14ab816f1cf83eb990abd02c9e118a8f *tests/data/fate/vsynth1-prores.out.rawvideo
stddev: 2.47 PSNR: 40.27 MAXDIFF: 31 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
1d5522ee2fb507a66d236a09a172dc16 *tests/data/fate/vsynth1-prores_ks.mov
3858911 tests/data/fate/vsynth1-prores_ks.mov
0a4153637d0cc0a88a8bcbf04cfaf8c6 *tests/data/fate/vsynth1-prores_ks.out.rawvideo
54a6453c64e8b1f2d5298ae3dff78656 *tests/data/fate/vsynth1-prores_ks.out.rawvideo
stddev: 3.17 PSNR: 38.09 MAXDIFF: 39 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
af885572d77d28e5ede27932bd68cdde *tests/data/fate/vsynth2-prores.mov
2844076 tests/data/fate/vsynth2-prores.mov
b5844025c0f4c7c37db702c3213db232 *tests/data/fate/vsynth2-prores.out.rawvideo
b959c6e8bc3061c9ef6ec09ce48d22a0 *tests/data/fate/vsynth2-prores.out.rawvideo
stddev: 1.31 PSNR: 45.77 MAXDIFF: 11 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
c1c71cf2dbd6e332aacb6ab1c6affa59 *tests/data/fate/vsynth2-prores_ks.mov
3884596 tests/data/fate/vsynth2-prores_ks.mov
ca2f6c1162635dedfa468c90f1fdc0ef *tests/data/fate/vsynth2-prores_ks.out.rawvideo
ab24f9350a0d615ec5ba864ab77817a8 *tests/data/fate/vsynth2-prores_ks.out.rawvideo
stddev: 0.92 PSNR: 48.77 MAXDIFF: 10 bytes: 7603200/ 7603200