aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-15 18:44:18 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-20 18:58:39 +0200
commit3a5202d026c3ec2591b0a8bdff6ac7d09b8a9c1e (patch)
tree81f3c7cf5a533b445ee6b17d6cd4af61ba63f1c5 /tests
parentf3829cc72d74f41e0eb82bf968315de2b119a8a3 (diff)
downloadffmpeg-3a5202d026c3ec2591b0a8bdff6ac7d09b8a9c1e.tar.gz
avcodec/h261enc: Fix ac_vlc_length tables
These tables are supposed to contain the number of bits needed to encode a given (run, level) pair. Yet the number of bits for pairs needing the escape code was wrong (it only contained the escape code and not the bits needed for run and level). Furthermore, H.261 (a format with explicit end-of-block codes) does not work well together with the RLTable API from rl.c: The EOB code is the first one in ff_h261_rl_tcoeff's VLC table and has a run value of zero. Therefore the result of get_rl_index() is off by one for run == 0 and level values with explicit (run, level) pair. Fixing this necessitated changing the ref files of the vsynth*-h261-trellis tests. Both filesizes as well as PSNR decreased. If one used a qscale value of 11 for this test, one would have received files with about the same size as before this patch (with qscale 12), but with better PSNR. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/vsynth/vsynth1-h261-trellis8
-rw-r--r--tests/ref/vsynth/vsynth2-h261-trellis8
-rw-r--r--tests/ref/vsynth/vsynth_lena-h261-trellis8
3 files changed, 12 insertions, 12 deletions
diff --git a/tests/ref/vsynth/vsynth1-h261-trellis b/tests/ref/vsynth/vsynth1-h261-trellis
index 87b078b0d5..0cbb9b0e18 100644
--- a/tests/ref/vsynth/vsynth1-h261-trellis
+++ b/tests/ref/vsynth/vsynth1-h261-trellis
@@ -1,4 +1,4 @@
-02b4109ce5343b7ef24fb11c2635498a *tests/data/fate/vsynth1-h261-trellis.avi
-655416 tests/data/fate/vsynth1-h261-trellis.avi
-70ceba944548ba680b1101c91707ea25 *tests/data/fate/vsynth1-h261-trellis.out.rawvideo
-stddev: 8.75 PSNR: 29.28 MAXDIFF: 90 bytes: 7603200/ 7603200
+9980463214cb744a7780737a16408540 *tests/data/fate/vsynth1-h261-trellis.avi
+590384 tests/data/fate/vsynth1-h261-trellis.avi
+7bbb0520a5ca26cdcea148f9997eae27 *tests/data/fate/vsynth1-h261-trellis.out.rawvideo
+stddev: 9.09 PSNR: 28.96 MAXDIFF: 93 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-h261-trellis b/tests/ref/vsynth/vsynth2-h261-trellis
index b9c694f016..03d17e194d 100644
--- a/tests/ref/vsynth/vsynth2-h261-trellis
+++ b/tests/ref/vsynth/vsynth2-h261-trellis
@@ -1,4 +1,4 @@
-f5e0cfc70bbe4f4048c15be88dea4378 *tests/data/fate/vsynth2-h261-trellis.avi
-249856 tests/data/fate/vsynth2-h261-trellis.avi
-15452237f6c333690d3e05f354f63196 *tests/data/fate/vsynth2-h261-trellis.out.rawvideo
-stddev: 7.10 PSNR: 31.10 MAXDIFF: 96 bytes: 7603200/ 7603200
+cdf6013013b8de3fe56476178b5adc89 *tests/data/fate/vsynth2-h261-trellis.avi
+227156 tests/data/fate/vsynth2-h261-trellis.avi
+d1107f161a7d923e0ffb6aeb9c713633 *tests/data/fate/vsynth2-h261-trellis.out.rawvideo
+stddev: 7.24 PSNR: 30.93 MAXDIFF: 87 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-h261-trellis b/tests/ref/vsynth/vsynth_lena-h261-trellis
index a306508032..75558679ec 100644
--- a/tests/ref/vsynth/vsynth_lena-h261-trellis
+++ b/tests/ref/vsynth/vsynth_lena-h261-trellis
@@ -1,4 +1,4 @@
-41522be50f14b7fff6b1fb8d10b1ff00 *tests/data/fate/vsynth_lena-h261-trellis.avi
-184586 tests/data/fate/vsynth_lena-h261-trellis.avi
-f9df8cd110a2f3d9706dd2f29a1d0a89 *tests/data/fate/vsynth_lena-h261-trellis.out.rawvideo
-stddev: 6.32 PSNR: 32.11 MAXDIFF: 89 bytes: 7603200/ 7603200
+aa3e00ffeb48a23452bb1c5b0dde9e77 *tests/data/fate/vsynth_lena-h261-trellis.avi
+167808 tests/data/fate/vsynth_lena-h261-trellis.avi
+055f8805df2bb21ef6752dc944e7828d *tests/data/fate/vsynth_lena-h261-trellis.out.rawvideo
+stddev: 6.43 PSNR: 31.96 MAXDIFF: 87 bytes: 7603200/ 7603200