1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00
Files
ffmpeg/libswscale
Martin Mirchev beb7168452 swscale/output: write the last partial byte in the mono error-diffusion paths
The SWS_DITHER_ED branches of yuv2mono_1_c_template() and
yuv2mono_2_c_template() only store a byte when (i & 7) == 6, so for widths
whose last pixel pair does not end a byte the final partial byte of each
row is never written and keeps whatever the destination held. Converting a
white 100x8 frame with -sws_flags +error_diffusion -pix_fmt monob leaves the
last 4 pixels of rows 1-7 black (0x00 instead of 0xf0).

Write the pending bits after the loop, shifted into the high bits as monob
expects, like the non-ED paths.

Signed-off-by: Martin Mirchev <mmirchev@comp.nus.edu.sg>
2026-10-19 00:51:53 +00:00
..
2026-08-17 22:21:44 +00:00
2026-08-09 21:03:33 +02:00
2026-07-13 18:57:37 +09:00
2026-07-13 18:57:37 +09:00