This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit c0f49db53dd409f48b20ee6a828402ccce03dee5 Author: Niklas Haas <[email protected]> AuthorDate: Mon Dec 22 14:33:47 2025 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Wed Dec 24 16:37:22 2025 +0000 swscale/ops: remove broken value range assumption hack This information is now pre-filled automatically for SWS_OP_READ when relevant. yuv444p10msbbe -> rgb24: [u16 XXXX -> +++X] SWS_OP_READ : 3 elem(s) planar >> 0 [u16 ...X -> +++X] SWS_OP_SWAP_BYTES [u16 ...X -> +++X] SWS_OP_RSHIFT : >> 6 [u16 ...X -> +++X] SWS_OP_CONVERT : u16 -> f32 [f32 ...X -> ...X] SWS_OP_LINEAR : matrix3+off3 [...] [f32 ...X -> ...X] SWS_OP_DITHER : 16x16 matrix + {0 3 2 5} [f32 ...X -> ...X] SWS_OP_MAX : {0 0 0 0} <= x + [f32 ...X -> ...X] SWS_OP_MIN : x <= {255 255 255 _} [f32 ...X -> +++X] SWS_OP_CONVERT : f32 -> u8 [ u8 ...X -> +++X] SWS_OP_WRITE : 3 elem(s) packed >> 0 (X = unused, + = exact, 0 = zero) (This clamp is needed and was incorrectly optimized away before, because the `SWS_OP_RSHIFT` incorrectly distorted the value range assertion) --- libswscale/ops.c | 25 ++----------------------- tests/ref/fate/sws-ops-list | 2 +- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/libswscale/ops.c b/libswscale/ops.c index 0e35004c0d..83eb8e162e 100644 --- a/libswscale/ops.c +++ b/libswscale/ops.c @@ -248,29 +248,8 @@ void ff_sws_op_list_update_comps(SwsOpList *ops) switch (op->op) { 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) >> 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 - * non-byte-aligned packed formats will necessarily go - * through SWS_OP_UNPACK anyway */ - for (int c = 0; c < 4; c++) { - if (ops->src.desc->comp[c].plane == i) { - bits = ops->src.desc->comp[c].depth; - break; - } - } - } - - op->comps.flags[i] |= SWS_COMP_EXACT; - op->comps.min[i] = av_max_q(Q(0), op->comps.min[i]); - op->comps.max[i] = av_min_q(Q((1ULL << bits) - 1), op->comps.max[i]); - } - } - - /* Explicitly strip flags and min/max range data for unread comps */ + /* Active components are preserved from the user-provided value, + * other components are explicitly stripped */ for (int i = op->rw.elems; i < 4; i++) { op->comps.flags[i] = prev.flags[i]; op->comps.min[i] = prev.min[i]; diff --git a/tests/ref/fate/sws-ops-list b/tests/ref/fate/sws-ops-list index 0458a25df4..0210a0a1cc 100644 --- a/tests/ref/fate/sws-ops-list +++ b/tests/ref/fate/sws-ops-list @@ -1 +1 @@ -6b2360c6fa99f5d0e428a97dfeff7189 +d781f3ddfeed4590eb253814366d2d01 _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
