Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #271411

Category ffmpeg
Changed by Michael Niedermayer <michaelohnoyoudont@niedermayer.cc>
Changed at Wed 17 Jun 2026 02:27:33
Repository https://git.ffmpeg.org/ffmpeg.git
Project ffmpeg
Branch master
Revision d67a6d27c25ae27d1997e0954cc4aded5d599f4c

Comments

avcodec/snowenc: fix chroma reference edge extension for odd width
When extending the edges of the reconstructed reference frame, the chroma
plane width and height were passed to draw_edges() as w >> chroma_h_shift
(floor) instead of AV_CEIL_RSHIFT(). For an odd width with subsampled chroma
(e.g. 4:2:0) the chroma plane is one column wider than the floor, and
draw_edges() replicates the edge columns, so it overwrote the last real
chroma column with the previous one. The decoder does not draw_edges() its
reference, so its copy kept the correct value: the encoder and decoder
references diverged and every following inter frame was reconstructed
differently by the two, breaking bit-exact (lossless) round-tripping and
drifting lossy inter coding, for any odd-width 4:2:0 snow stream.

Use AV_CEIL_RSHIFT(), matching the input_picture edge extension just above.

Found-by: Claude
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Changed files