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>
47 lines
2.7 KiB
Plaintext
47 lines
2.7 KiB
Plaintext
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
|
|
ret: 0 st:-1 flags:0 ts:-1.000000
|
|
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
|
|
ret: 0 st:-1 flags:1 ts: 1.894167
|
|
ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 161352 size: 19191
|
|
ret: 0 st: 0 flags:0 ts: 0.800000
|
|
ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 75104 size: 19178
|
|
ret:-1 st: 0 flags:1 ts:-0.320000
|
|
ret:-1 st:-1 flags:0 ts: 2.576668
|
|
ret: 0 st:-1 flags:1 ts: 1.470835
|
|
ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 118586 size: 20060
|
|
ret: 0 st: 0 flags:0 ts: 0.360000
|
|
ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 35840 size: 17261
|
|
ret:-1 st: 0 flags:1 ts:-0.760000
|
|
ret:-1 st:-1 flags:0 ts: 2.153336
|
|
ret: 0 st:-1 flags:1 ts: 1.047503
|
|
ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 75104 size: 19178
|
|
ret: 0 st: 0 flags:0 ts:-0.040000
|
|
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
|
|
ret: 0 st: 0 flags:1 ts: 2.840000
|
|
ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 161352 size: 19191
|
|
ret: 0 st:-1 flags:0 ts: 1.730004
|
|
ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 161352 size: 19191
|
|
ret: 0 st:-1 flags:1 ts: 0.624171
|
|
ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 35840 size: 17261
|
|
ret: 0 st: 0 flags:0 ts:-0.480000
|
|
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
|
|
ret: 0 st: 0 flags:1 ts: 2.400000
|
|
ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 161352 size: 19191
|
|
ret: 0 st:-1 flags:0 ts: 1.306672
|
|
ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 118586 size: 20060
|
|
ret: 0 st:-1 flags:1 ts: 0.200839
|
|
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
|
|
ret: 0 st: 0 flags:0 ts:-0.920000
|
|
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
|
|
ret: 0 st: 0 flags:1 ts: 2.000000
|
|
ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 161352 size: 19191
|
|
ret: 0 st:-1 flags:0 ts: 0.883340
|
|
ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 75104 size: 19178
|
|
ret:-1 st:-1 flags:1 ts:-0.222493
|
|
ret:-1 st: 0 flags:0 ts: 2.680000
|
|
ret: 0 st: 0 flags:1 ts: 1.560000
|
|
ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 118586 size: 20060
|
|
ret: 0 st:-1 flags:0 ts: 0.460008
|
|
ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 75104 size: 19178
|
|
ret:-1 st:-1 flags:1 ts:-0.645825
|