oneVPL-intel-gpu icon indicating copy to clipboard operation
oneVPL-intel-gpu copied to clipboard

[Bug]: framereate is not re-determine

Open jackie74 opened this issue 1 year ago • 7 comments

Which component impacted?

Video Processing

Is it regression? Good in old configuration?

No, this issue exist a long time

What happened?

Target platform: Intel Flex 149 Target OS: Redhat 8.6 oneVPL GPU Runtime 2023Q4 Release - 23.4.3

Target application media transcoding on gstreamer 1.22. In fact, I inquired about this problem because when I added capsfilter to the back of msdkvpp and set video/x-raw, framerate=1/1 caps, the output pts of msdkvpp were too large. Upon checking, it appears that this occurs when the frame is first input into msdkvpp at lower fps than the output fps (in this case, less than 1 fps), and then later changed to 30fps or 60fps.

It seems that frc is performed through the CpuFrc::PtsFrc::DoCpuFRC_AndUpdatePTS () method inside libvpl. https://github.com/oneapi-src/oneVPL-intel-gpu/blob/intel-onevpl-23.4.3/_studio/mfx_lib/vpp/src/mfx_vpp_hw.cpp#L350-L427 Looking at the code above, when a frame is first entered into the vpp, it is determined whether the frame rate should be raised or lowered through the pts of the first incoming input frames. After this decision is initially made, this appears to occur because the judgment is not performed again even if the framerate of the input frame changes later.

When I modified the above code to ignore m_bUpFrameRate or m_bDownFrameRate and re-determine it each time, built it, and then tested it, the problem seemed to be resolved immediately.

What's the usage scenario when you are seeing the problem?

Content Creation

What impacted?

No response

Debug Information

No response

Do you want to contribute a patch to fix the issue?

None

jackie74 avatar Mar 04 '24 02:03 jackie74

Auto Created VSMGWL-72140 for further analysis.

intel-mediadev avatar Mar 04 '24 08:03 intel-mediadev

What are your specific scenarios? Suppose the behavior that not re-determine is expected.

jiafengy1 avatar Mar 13 '24 03:03 jiafengy1

Dear. When a frame is first entered into the vpp, it is determined whether the frame rate should be raised or lowered through the pts of the first incoming input frames. Once this decision is initially made, This appears to occur because the judgment is not performed again even if the framerate of the input frame changes later. Thank you.

jackie74 avatar Mar 13 '24 04:03 jackie74

  1. Which APP did you use?
  2. Which API called? What is the order of these API?

jiafengy1 avatar Mar 19 '24 12:03 jiafengy1

"Upon checking, it appears that this occurs when the frame is first input into msdkvpp at lower fps than the output fps (in this case, less than 1 fps), and then later changed to 30fps or 60fps" ---- Do you mean the framerate of one video can dynamic change?

jiafengy1 avatar Mar 20 '24 06:03 jiafengy1

Yes. I want dynamic change. it appears that this occurs when the frame is first input into msdkvpp at lower fps than the output fps (in this case, less than 1 fps), and then later changed to 30fps or 60fps.

jackie74 avatar Mar 20 '24 06:03 jackie74

patch merged https://github.com/intel/vpl-gpu-rt/commit/312a0906e747c880b55b7877e00fe7ebd897eca4

jiafengy1 avatar Apr 15 '24 05:04 jiafengy1

patch merged 312a090

Close as fixed

MicroYY avatar Jul 02 '24 04:07 MicroYY