This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 79d5bd6306 fftools/ffmpeg_filter: preserve display matrix when
hardware autorotation is skipped
79d5bd6306 is described below
commit 79d5bd63067f5c25ae9f981a9381e44a2a11989a
Author: Michael Niedermayer <[email protected]>
AuthorDate: Thu Oct 22 16:06:38 2026 +0000
Commit: James Almer <[email protected]>
CommitDate: Fri Oct 23 13:54:52 2026 +0000
fftools/ffmpeg_filter: preserve display matrix when hardware autorotation
is skipped
configure_input_video_filter() does not apply autorotation to hardware
pixel formats. Match that condition when deciding whether to remove the
global display matrix in ifilter_parameters_from_frame(), so transcoding
hardware frames does not discard their unapplied orientation.
The matrix was preserved before 7b18beb477f1716b8abac15df91410dc967be2e9.
631ac6d055b273c87feceb0c19ed62f211e8ef3b restored propagation with
-noautorotate, but left hardware inputs using the default setting affected.
Related to issue #25089. This preserves orientation metadata; automatic
insertion of hardware rotation filters remains unimplemented.
Tested with CUDA decoding and HEVC NVENC encoding at 0, 90, 180 and 270
degrees, with software decoding and with -noautorotate. fate-autorotate
also passes.
Assisted-by: Fairy
---
fftools/ffmpeg_filter.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 1b9befe046..232ffbfff4 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -2393,7 +2393,8 @@ static int ifilter_parameters_from_frame(InputFilter
*ifilter, const AVFrame *fr
sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX);
if (sd) {
memcpy(ifp->displaymatrix, sd->data, sizeof(ifp->displaymatrix));
- if (ifp->opts.flags & IFILTER_FLAG_AUTOROTATE)
+ if ((ifp->opts.flags & IFILTER_FLAG_AUTOROTATE) &&
+ !(av_pix_fmt_desc_get(ifp->format)->flags &
AV_PIX_FMT_FLAG_HWACCEL))
av_frame_side_data_remove(&ifp->side_data, &ifp->nb_side_data,
AV_FRAME_DATA_DISPLAYMATRIX);
}
ifp->displaymatrix_present = !!sd;
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]