Files
ffmpeg/libavcodec
Michael Niedermayer d67a6d27c2 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>
2026-06-17 02:27:33 +02:00
..
2026-06-03 14:12:50 +09:00
2025-11-05 16:31:59 +00:00
2026-04-28 14:31:19 +02:00
2026-04-28 12:29:37 +00:00
2026-06-07 10:24:42 -03:00
2026-05-03 16:56:43 +02:00
2026-04-28 12:29:37 +00:00
2025-11-26 15:16:42 +01:00
2026-04-28 12:29:37 +00:00
2025-11-08 18:48:54 +01:00
2026-04-28 12:29:37 +00:00
2026-06-03 14:12:50 +09:00
2026-05-31 20:04:02 +09:00
2025-10-30 03:41:24 +01:00
2026-01-02 18:39:48 +01:00
2026-01-02 18:39:48 +01:00
2026-01-02 18:39:48 +01:00
2026-03-10 13:52:19 +01:00
2026-05-19 17:43:53 +09:00
2025-12-13 18:45:17 -03:00
2026-05-03 18:23:03 +02:00
2026-06-13 15:55:40 +00:00
2025-12-30 17:30:45 +00:00
2026-03-10 13:52:19 +01:00
2026-01-02 18:39:48 +01:00
2026-05-02 21:39:02 +00:00
2026-03-07 19:22:40 -03:00
2026-01-10 22:47:22 +01:00
2026-02-04 12:05:35 +08:00
2026-02-04 12:05:35 +08:00
2026-03-10 13:52:19 +01:00
2026-02-19 22:39:35 +00:00
2026-03-28 11:25:38 +01:00
2026-03-28 11:25:38 +01:00
2026-03-28 11:25:38 +01:00
2026-05-03 18:22:24 +02:00
2026-03-02 19:01:46 +01:00
2026-05-03 18:22:18 +02:00
2026-05-03 18:22:13 +02:00
2026-03-10 13:52:18 +01:00
2026-04-28 12:29:37 +00:00
2026-04-28 12:29:37 +00:00
2026-03-10 13:52:19 +01:00
2026-04-28 12:29:37 +00:00
2026-05-19 17:43:53 +09:00
2025-12-30 14:39:08 -05:00
2025-12-30 14:39:08 -05:00
2026-01-02 18:39:48 +01:00
2026-01-02 18:39:48 +01:00
2026-03-16 10:24:33 +00:00