Opened 9 months ago

Closed 7 months ago

#10576 closed defect (wontfix)

qsv does not deinterlace properly

Reported by: s170361683 Owned by:
Priority: normal Component: ffmpeg
Version: unspecified Keywords: vpp_qsv qsv VPP_QSV deinterlace
Cc: s170361683, AmshTemp Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by s170361683)

(a sample is attached)

using 50i source, DXVA for decoding, and qsv for encoding, I thought by specifying rate=field and deinterlace=bob in vpp_qsv filter that each field would be transformed to a frame in a 50p output. But the result was just a non-smooth 50p file that feels like 25p with frames being doubled.

yadif with yadif=send_field produced the desired smooth 50p output

ffmpeg ^
    -hwaccel dxva2 ^
    -hwaccel_output_format dxva2_vld ^
    -i "50i_sample.m2v" ^
    -c:v h264_qsv ^
    -vf "hwmap=derive_device=qsv,vpp_qsv=rate=field:deinterlace=bob" ^
    -y output.mp4
ffmpeg version git-2023-09-18-fa20f5c-ffmpeg-windows-build-helpers Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 10.2.0 (GCC)

wenbin.chen@intel.com

Attachments (4)

50i_sample.m2v (2.3 MB ) - added by s170361683 9 months ago.
vpp_qsv output.mp4 (476.7 KB ) - added by AmshTemp 7 months ago.
Yadiff output.mp4 (633.0 KB ) - added by AmshTemp 7 months ago.
vpp_qsv_output_linux.mp4 (449.0 KB ) - added by wenbin,chen 7 months ago.

Change History (14)

by s170361683, 9 months ago

Attachment: 50i_sample.m2v added

comment:1 by s170361683, 9 months ago

Cc: s170361683 added

comment:2 by s170361683, 9 months ago

Description: modified (diff)
Keywords: vpp_qsv qsv VPP_QSV deinterlace added

comment:3 by AmshTemp, 9 months ago

Cc: AmshTemp added

comment:4 by wenbin,chen, 7 months ago

You can try "deinterlace=advanced", this may meet your requirement.

by AmshTemp, 7 months ago

Attachment: vpp_qsv output.mp4 added

by AmshTemp, 7 months ago

Attachment: Yadiff output.mp4 added

comment:5 by AmshTemp, 7 months ago

Unfortunately the deinterlace=advanced produces the same result as deinterlace=bob .

Perhaps my wording wasn't precise enough to point out the problem. So I will try to do better with examples.

Yadiff (with Bob) takes every "field" in 50i and converts it to a frame in 50p, which produces the smoothness you would expect from such a conversion.

For vpp_qsv, however, it seems that vpp_qsv converts the 50i source to 25p and then just doubles the framerate to 50p, which results in a non-smooth 50p

NOTE: I attached two videos demonstrating the output difference between Yadiff and vpp_qsv

by wenbin,chen, 7 months ago

Attachment: vpp_qsv_output_linux.mp4 added

comment:6 by wenbin,chen, 7 months ago

I tried it on linux with a similar command line:

ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i 50i_sample.m2v -c:v h264_qsv -vf "hwmap=derive_device=qsv,vpp_qsv=rate=field:deinterlace=advanced" -y output.mp4

And I get smooth output. I attach it as well. I going to test it on windows.

comment:7 by wenbin,chen, 7 months ago

Sorry, I tried on windows, but I still cannot reproduce the issue. Almost all Intel platform support deinterlace so I don't think it is hardware's problem. I am using the latest ffmpeg, and the windows driver is "31.0.101.4824". You can update them and try again. I cannot debug on your environment so I don't know what causes the issue.

in reply to:  4 comment:8 by AmshTemp, 7 months ago

My processor is sandy bridge (very old) do you think this might be the problem?

comment:9 by AmshTemp, 7 months ago

I tested it on another relatively modern processor. Indeed my processor's integrated IGP HD4000 is the source of the problem.

The newer processor didn't have this issue.

comment:10 by AmshTemp, 7 months ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.