ffmpeg | branch: master | Manuel Lauss <manuel.la...@gmail.com> | Tue Jun 3 12:31:01 2025 +0200| [c06439073651c4cd1a3d2deb778490655da55d11] | committer: Manuel Lauss
avcodec/sanm: remove codec4 block smoothing it has a bug and its effects aren't that noticeable, esp. with the smoothing applied to the whole picture by modern video display engines. Signed-off-by: Manuel Lauss <manuel.la...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c06439073651c4cd1a3d2deb778490655da55d11 --- libavcodec/sanm.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c index 00bfef00fe..5912a8c14b 100644 --- a/libavcodec/sanm.c +++ b/libavcodec/sanm.c @@ -732,25 +732,6 @@ static int old_codec4(SANMVideoContext *ctx, GetByteContext *gb, int top, int le } pxo2 = pxo2 - 4 + p; } - - /* smooth top and left block borders with neighbours */ - if (((pxoff - p + k) < 0) || ((pxoff - p + k) >= maxpxo) - || ((pxoff + 3 * p) < 0) || ((pxoff + 3 * p) >= maxpxo) - || (i == 0) || (j == 0)) - continue; - if (param & 0x80) { - for (k = 0; k < 4; k++) - *(dst + pxoff + k) = ((*(dst + pxoff + k) + *(dst + pxoff - p + k)) >> 1) | 0x80; - *(dst + pxoff + 1 * p) = (*(dst + pxoff + 1 * p) + *(dst + pxoff + 1 * p - 1)) >> 1 | 0x80; - *(dst + pxoff + 2 * p) = (*(dst + pxoff + 2 * p) + *(dst + pxoff + 2 * p - 1)) >> 1 | 0x80; - *(dst + pxoff + 3 * p) = (*(dst + pxoff + 3 * p) + *(dst + pxoff + 3 * p - 1)) >> 1 | 0x80; - } else { - for (k = 0; k < 4; k++) - *(dst + pxoff + k) = ((*(dst + pxoff + k) + *(dst + pxoff - p + k)) >> 1) & 0x7f; - *(dst + pxoff + 1 * p) = (*(dst + pxoff + 1 * p) + *(dst + pxoff + 1 * p - 1)) >> 1; - *(dst + pxoff + 2 * p) = (*(dst + pxoff + 2 * p) + *(dst + pxoff + 2 * p - 1)) >> 1; - *(dst + pxoff + 3 * p) = (*(dst + pxoff + 3 * p) + *(dst + pxoff + 3 * p - 1)) >> 1; - } } } return 0; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".