dv: more precise weight table for 8x8

It is derived from the actual equations of the specs. In
particular, it is closer to the inverse of what the encoder uses.

fate tests accordingly updated.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/90/head
Christophe Gisquet 10 years ago committed by Michael Niedermayer
parent 80b29c2d0c
commit 1086f09da3
  1. 16
      libavcodec/dvdata.c
  2. 6
      tests/ref/lavf/dv_fmt
  3. 2
      tests/ref/vsynth/vsynth1-dv
  4. 4
      tests/ref/vsynth/vsynth1-dv-411
  5. 2
      tests/ref/vsynth/vsynth1-dv-50
  6. 4
      tests/ref/vsynth/vsynth2-dv
  7. 2
      tests/ref/vsynth/vsynth2-dv-411
  8. 2
      tests/ref/vsynth/vsynth2-dv-50

@ -70,14 +70,14 @@ const uint8_t ff_dv_quant_shifts[22][4] = {
const uint8_t ff_dv_quant_offset[4] = { 6, 3, 0, 1 };
const uint16_t ff_dv_iweight_88[64] = {
32768, 16710, 16710, 17735, 17015, 17735, 18197, 18079,
18079, 18197, 18725, 18559, 19196, 18559, 18725, 19284,
19108, 19692, 19692, 19108, 19284, 21400, 19645, 20262,
20214, 20262, 19645, 21400, 22733, 21845, 20867, 20815,
20815, 20867, 21845, 22733, 23173, 23173, 21400, 21400,
21400, 23173, 23173, 24600, 23764, 22017, 22017, 23764,
24600, 25267, 24457, 22672, 24457, 25267, 25971, 25191,
25191, 25971, 26715, 27962, 26715, 29642, 29642, 31536,
32768, 16705, 16705, 17734, 17032, 17734, 18205, 18081,
18081, 18205, 18725, 18562, 19195, 18562, 18725, 19266,
19091, 19705, 19705, 19091, 19266, 21407, 19643, 20267,
20228, 20267, 19643, 21407, 22725, 21826, 20853, 20806,
20806, 20853, 21826, 22725, 23170, 23170, 21407, 21400,
21407, 23170, 23170, 24598, 23786, 22018, 22018, 23786,
24598, 25251, 24465, 22654, 24465, 25251, 25972, 25172,
25172, 25972, 26722, 27969, 26722, 29692, 29692, 31521,
};
const uint16_t ff_dv_iweight_248[64] = {
32768, 17735, 16710, 18079, 18725, 21400, 17735, 19196,

@ -1,9 +1,9 @@
11be3e5caa2892236b3475c3f7807b76 *./tests/data/lavf/lavf.dv
3600000 ./tests/data/lavf/lavf.dv
./tests/data/lavf/lavf.dv CRC=0x25bdd732
./tests/data/lavf/lavf.dv CRC=0x0b2cd3ec
e9949bc767924e1e7d28856029fee024 *./tests/data/lavf/lavf.dv
3480000 ./tests/data/lavf/lavf.dv
./tests/data/lavf/lavf.dv CRC=0xc4f27ca7
./tests/data/lavf/lavf.dv CRC=0xfab17c4a
87d3b20f656235671383a7eaa2f66330 *./tests/data/lavf/lavf.dv
3600000 ./tests/data/lavf/lavf.dv
./tests/data/lavf/lavf.dv CRC=0x0e868a82
./tests/data/lavf/lavf.dv CRC=0xf3e6873c

@ -1,4 +1,4 @@
4d572f758b55a1756adf9f54132f3b9e *tests/data/fate/vsynth1-dv.dv
7200000 tests/data/fate/vsynth1-dv.dv
02ac7cdeab91d4d5621e7ce96dddc498 *tests/data/fate/vsynth1-dv.out.rawvideo
1cda5a62c3a2f17cc7d5b4cddccf2524 *tests/data/fate/vsynth1-dv.out.rawvideo
stddev: 6.90 PSNR: 31.34 MAXDIFF: 76 bytes: 7603200/ 7603200

@ -1,4 +1,4 @@
f179899efba432c6f01149c36c709092 *tests/data/fate/vsynth1-dv-411.dv
7200000 tests/data/fate/vsynth1-dv-411.dv
53946d51762b7826773e681fb02f377b *tests/data/fate/vsynth1-dv-411.out.rawvideo
stddev: 9.45 PSNR: 28.62 MAXDIFF: 84 bytes: 7603200/ 7603200
48904744fabbbc3421a762f615ef6456 *tests/data/fate/vsynth1-dv-411.out.rawvideo
stddev: 9.44 PSNR: 28.62 MAXDIFF: 84 bytes: 7603200/ 7603200

@ -1,4 +1,4 @@
a193c5f92bf6e74c604e759d5f4f0f94 *tests/data/fate/vsynth1-dv-50.dv
14400000 tests/data/fate/vsynth1-dv-50.dv
a2ff093e93ffed10f730fa21df02fc50 *tests/data/fate/vsynth1-dv-50.out.rawvideo
41c4df5f2d876fcd5245643b9ded6711 *tests/data/fate/vsynth1-dv-50.out.rawvideo
stddev: 1.72 PSNR: 43.38 MAXDIFF: 29 bytes: 7603200/ 7603200

@ -1,4 +1,4 @@
85b8d55b0b68bb3fc2e90babb580f9b7 *tests/data/fate/vsynth2-dv.dv
7200000 tests/data/fate/vsynth2-dv.dv
7ec62bd3350a6848364669e6e1e4b9cc *tests/data/fate/vsynth2-dv.out.rawvideo
stddev: 1.71 PSNR: 43.47 MAXDIFF: 33 bytes: 7603200/ 7603200
7dac420637360b031ccae7c5a69c5e0c *tests/data/fate/vsynth2-dv.out.rawvideo
stddev: 1.70 PSNR: 43.47 MAXDIFF: 33 bytes: 7603200/ 7603200

@ -1,4 +1,4 @@
e428508f400327aeb96969c08fb9e1b5 *tests/data/fate/vsynth2-dv-411.dv
7200000 tests/data/fate/vsynth2-dv-411.dv
3cd4b85065d67bfb7fbab3bea4039711 *tests/data/fate/vsynth2-dv-411.out.rawvideo
713ed907fde448c603d6e9aee5efedd1 *tests/data/fate/vsynth2-dv-411.out.rawvideo
stddev: 2.89 PSNR: 38.91 MAXDIFF: 45 bytes: 7603200/ 7603200

@ -1,4 +1,4 @@
0032a07167199e6f49e07fa7ed4d5f62 *tests/data/fate/vsynth2-dv-50.dv
14400000 tests/data/fate/vsynth2-dv-50.dv
af3f2dd5ab62c1a1d98b07d4aeb6852f *tests/data/fate/vsynth2-dv-50.out.rawvideo
56c77e537291536b242857d1056de30c *tests/data/fate/vsynth2-dv-50.out.rawvideo
stddev: 0.82 PSNR: 49.82 MAXDIFF: 12 bytes: 7603200/ 7603200

Loading…
Cancel
Save