ffmpeg-bb/tests/ref/vsynth/vsynth_lena-mpeg4-adap
Andreas Rheinhardt ab768b88e0 avcodec/mpegvideo_enc: Don't set qscale_table value prematurely
When there are multiple candidates for macroblock type, the encoder
tries them all. In order to do so, it keeps several sets of states
containing the variables that get modified when encoding
the macroblock and in the end uses the best of these.

Yet one variable was set, but not included in this state:
The current macroblock's qscale value in the current picture's
qscale_table. This may currently be set multiple times in
mpv_reconstruct_mb(), yet it is read when adaptive_quant is true.
Currently, the value read can be the value set by the last attempt
to write the current macroblock and not the initial value.

Fix this by only setting the qscale_table value in one place
outside of mpv_reconstruct_mb() (where it does not belong at all).

Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-04 12:44:18 +01:00

5 lines
281 B
Plaintext

5af033cfe87bc2abf688b602e5a1a35c *tests/data/fate/vsynth_lena-mpeg4-adap.avi
187652 tests/data/fate/vsynth_lena-mpeg4-adap.avi
515efcfb456cf7b460f356fe0dc7c808 *tests/data/fate/vsynth_lena-mpeg4-adap.out.rawvideo
stddev: 3.63 PSNR: 36.93 MAXDIFF: 71 bytes: 7603200/ 7603200