The branch, master has been updated
       via  08eda0596779b94e802cbeb6cd7f1b3b8c48873f (commit)
       via  49452967e74f2fa6187b18930c5f942b72587bdc (commit)
      from  6c1acbbffb23a71ff743cb7ffbf6d4b824ed951c (commit)


- Log -----------------------------------------------------------------
commit 08eda0596779b94e802cbeb6cd7f1b3b8c48873f
Author:     Niklas Haas <[email protected]>
AuthorDate: Mon Nov 3 18:23:31 2025 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Nov 4 12:38:55 2025 +0000

    avfilter/vf_libplacebo: make rotation check more robust
    
    This currently does not make any difference, but it makes the check
    more robust against possible future changes to the rotation parameter.

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index 393a0126c1..42501c51f2 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -912,7 +912,9 @@ static void update_crops(AVFilterContext *ctx, 
LibplaceboInput *in,
         image->crop.y0 = av_expr_eval(s->crop_y_pexpr, s->var_values, NULL);
         image->crop.x1 = image->crop.x0 + s->var_values[VAR_CROP_W];
         image->crop.y1 = image->crop.y0 + s->var_values[VAR_CROP_H];
-        if (s->rotation % PL_ROTATION_180 == PL_ROTATION_90) {
+
+        const pl_rotation rot_total = image->rotation - target->rotation;
+        if ((rot_total + PL_ROTATION_360) % PL_ROTATION_180 == PL_ROTATION_90) 
{
             /* Libplacebo expects the input crop relative to the actual frame
              * dimensions, so un-transpose them here */
             FFSWAP(float, image->crop.x0, image->crop.y0);

commit 49452967e74f2fa6187b18930c5f942b72587bdc
Author:     Niklas Haas <[email protected]>
AuthorDate: Mon Nov 3 18:18:33 2025 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Nov 4 12:38:55 2025 +0000

    avfilter/vf_libplacebo: don't override existing rotation attribute
    
    This is a regression introduced by the addition of the rotation option,
    which overrode the existing rotation attribute that may have been set to
    the image.
    
    To fix it, add the rotation istead of setting it - however we have to do 
this
    directly when mapping, so as to not add it multiple times.
    
    Fixes: 4f623b4c59c3c838f588e9def7b59dcc26dee7b9

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index 87d00519c3..393a0126c1 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -912,7 +912,6 @@ static void update_crops(AVFilterContext *ctx, 
LibplaceboInput *in,
         image->crop.y0 = av_expr_eval(s->crop_y_pexpr, s->var_values, NULL);
         image->crop.x1 = image->crop.x0 + s->var_values[VAR_CROP_W];
         image->crop.y1 = image->crop.y0 + s->var_values[VAR_CROP_H];
-        image->rotation = s->rotation;
         if (s->rotation % PL_ROTATION_180 == PL_ROTATION_90) {
             /* Libplacebo expects the input crop relative to the actual frame
              * dimensions, so un-transpose them here */
@@ -1150,6 +1149,7 @@ static bool map_frame(pl_gpu gpu, pl_tex *tex,
     ));
     out->lut = s->lut;
     out->lut_type = s->lut_type;
+    out->rotation += s->rotation;
 
     if (!s->apply_filmgrain)
         out->film_grain.type = PL_FILM_GRAIN_NONE;

-----------------------------------------------------------------------

Summary of changes:
 libavfilter/vf_libplacebo.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to