This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit f39fe6380c26e78d7d588ad36861a3f15f3e5521 Author: Niklas Haas <[email protected]> AuthorDate: Mon Dec 8 18:38:36 2025 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Mon Dec 8 20:09:37 2025 +0000 swscale/ops_optimizer: set correct value range for subpixel reads e.g. rgb4 only reads values up to 15, not 255. Setting this correctly eliminates a number of redundant clamps in cases like e.g. rgb4 -> monow. --- libswscale/ops_optimizer.c | 2 +- tests/ref/fate/sws-ops-list | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libswscale/ops_optimizer.c b/libswscale/ops_optimizer.c index b13e7ebdc1..f173e1f78f 100644 --- a/libswscale/ops_optimizer.c +++ b/libswscale/ops_optimizer.c @@ -97,7 +97,7 @@ void ff_sws_op_list_update_comps(SwsOpList *ops) case SWS_OP_READ: for (int i = 0; i < op->rw.elems; i++) { if (ff_sws_pixel_type_is_int(op->type)) { - int bits = 8 * ff_sws_pixel_type_size(op->type); + int bits = 8 * ff_sws_pixel_type_size(op->type) >> op->rw.frac; if (!op->rw.packed && ops->src.desc) { /* Use legal value range from pixdesc if available; * we don't need to do this for packed formats because diff --git a/tests/ref/fate/sws-ops-list b/tests/ref/fate/sws-ops-list index f77c60fde3..132f66f4fc 100644 --- a/tests/ref/fate/sws-ops-list +++ b/tests/ref/fate/sws-ops-list @@ -1 +1 @@ -e124847bc6663ca538b784de17bf42f0 +eae3a49ac3af42c13ad274883611ac21 _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
