-
Notifications
You must be signed in to change notification settings - Fork 459
Pass through mode for VIDEO->SYSTEM with MFX_FOURCC_A2RGB10 format #1654
Comments
It was fixed by #1664. |
|
@AntonGrishin , can you please take a look? |
Hi @sunxinpeng,
|
Hi @sunxinpeng, |
Hi @AntonGrishin |
Hi @sunxinpeng, As I understand, ffmpeg called MFXVideoVPP_Init with wrong formats (sample_vpp works fine), so It think this is not MSDK problem, but ffmpeg. Regarding to API, maybe @dmitryermilov can answer you question. |
@AntonGrishin @dmitryermilov , is it possible to add identical logic like copy pass thru for P010? or allow A2RGB10 as an input for vpp if we only needs it for copy pass through? (Since X2RGB10 format is accepted in FFmpeg, we'd like to add full support for CSC in QSV now) |
Hi @fulinjie , I can't restore full context. Could you remind me/explain more? For which exactly combination of input and output FOURCCs/memory types you'd like to have a passthru mode in VPP? AFAIR https://github.com/Intel-Media-SDK/MediaSDK/pull/1268/files introduced passthru mode (simple copy) if input==output. But it seems you're requesting something different? |
Fourcc: IOPattern: FFmpeg currently calls hwdownload to dump the data to system memory, which is a VPP procedure inside MSDK actually. The story is A2RGB10 is not allowed as an input fourcc for VPP: https://github.com/Intel-Media-SDK/MediaSDK/blob/master/_studio/mfx_lib/vpp/src/mfx_vpp_utils.cpp#L1378 So my quesion is: |
For verifying, you may simply try this: |
I got your point. Thanks for explanation. It's definitely technically feasible. @FurongZhang , please enable it. |
Hi @AntonGrishin, thanks for the quick response! VPP PIPELINE: I'll look into this later in FFmpeg. |
Hi @AntonGrishin, Confirmed that it seems to be something inside MSDK. We'd better add support for A2RGB10 in SetFrameData() as well, otherwise it'll return MFX_ERR_LOCK_MEMORY by default. You may want to try or debug with ffmpeg just in case there is somewhere else needs the support too. |
Hi @fulinjie,
|
Let me be more clear: |
@AntonGrishin Another thing is, Why msdk needs to check each address of pDst->Data.R, pDst->Data.G, pDst->Data.B? https://github.com/Intel-Media-SDK/MediaSDK/blob/master/_studio/shared/src/libmfx_core.cpp#L1497 IMHO pDst->Data.A2RGB10 would be the exact field applications/users want. |
Verified that after these two concerns fixed(work around for now), the CSC to X2RGB10 works. |
Hi @dmitryermilov , this issue is partially fixed by a786fde. We still need @AntonGrishin's help for:
|
Ohhh. Okay. You was confused my you last comment so merged the change. it was too early. |
Hi @AntonGrishin, any further updates? |
Hi @fulinjie,
|
Hi @AntonGrishin ,
|
If input use only a2rgb10 pointer and we get min pointer, this leads to nullptr error. Since a2rgb10(x2rgb10) packed 10 bit format, no need to check all pointers before copy, we only need to copy B pointer (that is in union with a2rgb10 pointer). cmd to check: ./ffmpeg -hwaccel qsv -v verbose -c:v hevc_qsv -i \ ../p010.h265 -vf scale_qsv=format=x2rgb10,hwdownload,format=x2rgb10 \ -vframes 1 out.yuv -y fixes: Intel-Media-SDK#1654
If input use only a2rgb10 pointer and we get min pointer, this leads to nullptr error. Since a2rgb10(x2rgb10) packed 10 bit format, no need to check all pointers before copy, we only need to copy B pointer (that is in union with a2rgb10 pointer). cmd to check: ./ffmpeg -hwaccel qsv -v verbose -c:v hevc_qsv -i \ ../p010.h265 -vf scale_qsv=format=x2rgb10,hwdownload,format=x2rgb10 \ -vframes 1 out.yuv -y fixes: Intel-Media-SDK#1654
If input use only a2rgb10 pointer and we get min pointer, this leads to nullptr error. Since a2rgb10(x2rgb10) packed 10 bit format, no need to check all pointers before copy, we only need to copy B pointer (that is in union with a2rgb10 pointer). cmd to check: ./ffmpeg -hwaccel qsv -v verbose -c:v hevc_qsv -i \ ../p010.h265 -vf scale_qsv=format=x2rgb10,hwdownload,format=x2rgb10 \ -vframes 1 out.yuv -y fixes: Intel-Media-SDK#1654
Hi @AntonGrishin, commented in the pr, thx. |
FFmpeg uses x2rgb10 format, which matches to VA X2R10G10B10 and MFX a2rgb10 formats cmd to check: ./ffmpeg -hwaccel qsv -v verbose -c:v hevc_qsv -i \ ../p010.h265 -vf scale_qsv=format=x2rgb10,hwdownload,format=x2rgb10 \ -vframes 1 out.yuv -y fixes: Intel-Media-SDK#1654
I am following up this issue and double confirming with validation. After confirmation, I will close this issue if test results are good. |
Hi @FurongZhang do you have any updates? |
When I support the feature "convert P010 to 10bit RGBA" in ffmpeg qsv, I find that if downloading the output surface from driver in MSDK, it will use MSDK VPP path(although I just want to get the surface without any vpp conversion). In this step, MFXVideoVPP_Init will fail because of the format of input context is MFX_FOURCC_A2RGB10(this format is supported for output only). So if MSDK can provide a method which can directly download the a2r10g10b10 surface without passing the vpp path?
The text was updated successfully, but these errors were encountered: