Skip to content

Commit

Permalink
Fix QSV deint 3:2 pulldown undefined behavior
Browse files Browse the repository at this point in the history
Signed-off-by: nyanmisaka <[email protected]>
  • Loading branch information
nyanmisaka committed Jul 13, 2024
1 parent beafe65 commit a3b63ea
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Index: jellyfin-ffmpeg/libavfilter/qsvvpp.c
===================================================================
--- jellyfin-ffmpeg.orig/libavfilter/qsvvpp.c
+++ jellyfin-ffmpeg/libavfilter/qsvvpp.c
@@ -463,11 +463,13 @@ static QSVFrame *submit_frame(QSVVPPCont
!qsv_frame->frame->interlaced_frame ? MFX_PICSTRUCT_PROGRESSIVE :
(qsv_frame->frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF :
MFX_PICSTRUCT_FIELD_BFF);
- if (qsv_frame->frame->repeat_pict == 1)
+ if (qsv_frame->frame->repeat_pict == 1) {
qsv_frame->surface.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED;
- else if (qsv_frame->frame->repeat_pict == 2)
+ qsv_frame->surface.Info.PicStruct |= qsv_frame->frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF :
+ MFX_PICSTRUCT_FIELD_BFF;
+ } else if (qsv_frame->frame->repeat_pict == 2) {
qsv_frame->surface.Info.PicStruct |= MFX_PICSTRUCT_FRAME_DOUBLING;
- else if (qsv_frame->frame->repeat_pict == 4)
+ } else if (qsv_frame->frame->repeat_pict == 4)
qsv_frame->surface.Info.PicStruct |= MFX_PICSTRUCT_FRAME_TRIPLING;

return qsv_frame;
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@
0078-add-detection-of-atmos-in-eac3.patch
0079-add-detection-of-atmos-in-truehd.patch
0080-add-tonemapx-filter.patch
0081-fix-qsv-deint-3-2-pulldown-undefined-behavior.patch

0 comments on commit a3b63ea

Please sign in to comment.