Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Fix passthru copy when input X2RGB10 #2268

Closed

Conversation

AntonGrishin
Copy link

@AntonGrishin AntonGrishin commented Aug 6, 2020

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: #1654

case MFX_FOURCC_A2RGB10:
roi.width *= 4;

sts = FastCopy::Copy(pDst->Data.B, dstPitch, pSrc->Data.B, srcPitch, roi, copyFlag);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we will receive nullptr in case of a2rgb? shouldn't all 4 pointer (Data.A, Data.R, Data.G, Data.B) pointing to exactly same location?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saying this I'm referring to our doc, which says "The application has to specify pointers to all color channels even for packed formats. For example, for YUY2 format the application has to specify Y, U and V pointers. For RGB32 – R, G, B and A pointers." @dmitryermilov @onabiull your thoughts?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgonchar this is good point, thanks!
nullptr received because FFmpeg would like to work with "a2rgb10 (b)" pointer. But if this specified in our man, we can refer to this.
If so, then it will be enough to add support for x2rgb10.

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
@AntonGrishin AntonGrishin changed the title Fix passthru copy when input X2RGB10 with a2rgb10 pointer Fix passthru copy when input X2RGB10 Aug 10, 2020
@AntonGrishin AntonGrishin deleted the a2rgb10_features branch November 5, 2020 07:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass through mode for VIDEO->SYSTEM with MFX_FOURCC_A2RGB10 format
2 participants