Browse Source

cljrdec: improve scaling somewhat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Michael Niedermayer 14 years ago
parent
commit
7e5cbb3c2d
4 changed files with 44 additions and 44 deletions
  1. +4
    -4
      libavcodec/cljr.c
  2. +36
    -36
      tests/ref/fate/cljr
  3. +2
    -2
      tests/ref/vsynth1/cljr
  4. +2
    -2
      tests/ref/vsynth2/cljr

+ 4
- 4
libavcodec/cljr.c View File

@@ -87,10 +87,10 @@ static int decode_frame(AVCodecContext *avctx,
uint8_t *cb = &a->picture.data[1][y * a->picture.linesize[1]];
uint8_t *cr = &a->picture.data[2][y * a->picture.linesize[2]];
for (x = 0; x < avctx->width; x += 4) {
luma[3] = get_bits(&gb, 5) << 3;
luma[2] = get_bits(&gb, 5) << 3;
luma[1] = get_bits(&gb, 5) << 3;
luma[0] = get_bits(&gb, 5) << 3;
luma[3] = (get_bits(&gb, 5)*33) >> 2;
luma[2] = (get_bits(&gb, 5)*33) >> 2;
luma[1] = (get_bits(&gb, 5)*33) >> 2;
luma[0] = (get_bits(&gb, 5)*33) >> 2;
luma += 4;
*(cb++) = get_bits(&gb, 6) << 2;
*(cr++) = get_bits(&gb, 6) << 2;


+ 36
- 36
tests/ref/fate/cljr View File

@@ -1,36 +1,36 @@
0, 0, 64800, 0x44a1c47c
0, 3169, 64800, 0x649cc3a4
0, 6338, 64800, 0xcab1b88c
0, 9507, 64800, 0xf56cb788
0, 12676, 64800, 0x5336b618
0, 15845, 64800, 0x2704b438
0, 19013, 64800, 0x04c7b8e4
0, 22182, 64800, 0x3185b288
0, 25351, 64800, 0xa537c410
0, 28520, 64800, 0x6495c0f8
0, 31689, 64800, 0x06a1ca14
0, 34858, 64800, 0x69cdd2a0
0, 38027, 64800, 0x4ad2d828
0, 41196, 64800, 0x9604dea4
0, 44365, 64800, 0x1c00e430
0, 47534, 64800, 0x9afeefe0
0, 50702, 64800, 0xc13fdd78
0, 53871, 64800, 0x8438da7c
0, 57040, 64800, 0xa0ead278
0, 60209, 64800, 0xbeced2d8
0, 63378, 64800, 0x85bbd7dc
0, 66547, 64800, 0xbe59ce34
0, 69716, 64800, 0xd76ecccc
0, 72885, 64800, 0xe182b474
0, 76054, 64800, 0x916cc394
0, 79223, 64800, 0x7efebd14
0, 82391, 64800, 0x8d28c9f0
0, 85560, 64800, 0x00a1c960
0, 88729, 64800, 0xc164c400
0, 91898, 64800, 0xfd4dc544
0, 95067, 64800, 0x01bfbe38
0, 98236, 64800, 0xff11b5d0
0, 101405, 64800, 0x4876bb20
0, 104574, 64800, 0x756ecb04
0, 107743, 64800, 0x3b8cd540
0, 110912, 64800, 0x063ed444
0, 0, 64800, 0x63132a60
0, 3169, 64800, 0xb3c729a3
0, 6338, 64800, 0xa27b1e0e
0, 9507, 64800, 0xb9131d00
0, 12676, 64800, 0xaf9a1bae
0, 15845, 64800, 0x11e319c5
0, 19013, 64800, 0xee6e1e6b
0, 22182, 64800, 0x418417e9
0, 25351, 64800, 0x339d29f4
0, 28520, 64800, 0x198926c4
0, 31689, 64800, 0x439a3044
0, 34858, 64800, 0x0a4e38e1
0, 38027, 64800, 0x6e043e7e
0, 41196, 64800, 0xde434533
0, 44365, 64800, 0xb58a4ad1
0, 47534, 64800, 0xaa105710
0, 50702, 64800, 0x1723440c
0, 53871, 64800, 0x3b064116
0, 57040, 64800, 0x853f38e4
0, 60209, 64800, 0x52f53917
0, 63378, 64800, 0xea363e5a
0, 66547, 64800, 0x4d0a344e
0, 69716, 64800, 0xe49232fc
0, 72885, 64800, 0x747b1a02
0, 76054, 64800, 0xbaa82992
0, 79223, 64800, 0x8e9322db
0, 82391, 64800, 0x029a2fcf
0, 85560, 64800, 0xb9a62f6a
0, 88729, 64800, 0x553329fe
0, 91898, 64800, 0x9a052b5b
0, 95067, 64800, 0xe2ff2404
0, 98236, 64800, 0xaacd1b59
0, 101405, 64800, 0x17d820de
0, 104574, 64800, 0x1c9e312c
0, 107743, 64800, 0x84df3b99
0, 110912, 64800, 0xf7d13aa1

+ 2
- 2
tests/ref/vsynth1/cljr View File

@@ -1,4 +1,4 @@
041982e4fa83428c621a127647d47b3f *./tests/data/vsynth1/cljr.avi
5075660 ./tests/data/vsynth1/cljr.avi
f5173ae479fc104903b203260cadf507 *./tests/data/cljr.vsynth1.out.yuv
stddev: 30.71 PSNR: 18.38 MAXDIFF: 225 bytes: 7603200/ 7603200
e1c4c96c74de3435d0f9f6118c5ed9b5 *./tests/data/cljr.vsynth1.out.yuv
stddev: 30.53 PSNR: 18.43 MAXDIFF: 225 bytes: 7603200/ 7603200

+ 2
- 2
tests/ref/vsynth2/cljr View File

@@ -1,4 +1,4 @@
fdc1926e0a599de94513f0a3472b598f *./tests/data/vsynth2/cljr.avi
5075660 ./tests/data/vsynth2/cljr.avi
3db163e55149786e7cf5499b3387bdb1 *./tests/data/cljr.vsynth2.out.yuv
stddev: 10.80 PSNR: 27.46 MAXDIFF: 65 bytes: 7603200/ 7603200
7df03229ee6361ea11a0d83d4926cb10 *./tests/data/cljr.vsynth2.out.yuv
stddev: 10.30 PSNR: 27.87 MAXDIFF: 65 bytes: 7603200/ 7603200

Loading…
Cancel
Save