diff --git a/libswscale/ops.c b/libswscale/ops.c index 9bbbfc50ca..f84416feed 100644 --- a/libswscale/ops.c +++ b/libswscale/ops.c @@ -158,9 +158,8 @@ void ff_sws_apply_op_q(const SwsOp *op, AVRational x[4]) } case SWS_OP_RSHIFT: { av_assert1(ff_sws_pixel_type_is_int(op->type)); - AVRational mult = Q(1 << op->c.u); for (int i = 0; i < 4; i++) - x[i] = x[i].den ? av_div_q(x[i], mult) : x[i]; + x[i] = x[i].den ? Q((x[i].num / x[i].den) >> op->c.u) : x[i]; return; } case SWS_OP_SWIZZLE: { diff --git a/tests/ref/fate/sws-ops-list b/tests/ref/fate/sws-ops-list index dbcad4052b..b49f944794 100644 --- a/tests/ref/fate/sws-ops-list +++ b/tests/ref/fate/sws-ops-list @@ -1 +1 @@ -708f10e4de79450729ab2120e4e44ec9 +e910ff7ceaeb64bfdbac3f652b67403f