MediaSDK
                                
                                
                                
                                    MediaSDK copied to clipboard
                            
                            
                            
                        vaapi: set AYUV mfxFrameData by XYUV VAImage
The latest media driver may use XYUV for 444 8bit decoding.
@dmitryermilov any comment for this PR ?
Hi @xhaihao ,
Let me double check. Trying to understand the whole story. Please comment :
- Okay, e.g. we’re decoding 444 HEVC stream. MSDK DecodeHeader() reports MFX_FOURCC_AYUV.
 - Let’s consider external (from MSDK perspective) video memory case. Ffmpeg owns vaSurfaceID allocation. Will ffmpeg allocate VA_FOURCC_XYUV surfaces instead of VA_FOURCC_AYUV and pretend it passes VA_FOURCC_AYUV? No changes on MSDK side required here, right?
 - Let’s consider external (from MSDK perspective) system memory case. vaSurface's need to be allocates inside MSDK. a. How ffmpeg will force MSDK to VA_FOURCC_XYUV surfaces instead of VA_FOURCC_AYUV? I’m confused because I can’t find corresponding changes in your PR … b. Plus, I can’t find allocation of VA_FOURCC_XYUV inside MSDK allocator, you added code which can handle mapping, not allocation..
 - I guess your current PR is need for item 3 above, right?
 
Hi @xhaihao ,
Let me double check. Trying to understand the whole story. Please comment :
1. Okay, e.g. we’re decoding 444 HEVC stream. MSDK DecodeHeader() reports MFX_FOURCC_AYUV. 2. Let’s consider external (from MSDK perspective) video memory case. Ffmpeg owns vaSurfaceID allocation. Will ffmpeg allocate VA_FOURCC_XYUV surfaces instead of VA_FOURCC_AYUV and pretend it passes VA_FOURCC_AYUV? No changes on MSDK side required here, right? 3. Let’s consider external (from MSDK perspective) system memory case. vaSurface's need to be allocates inside MSDK. a. How ffmpeg will force MSDK to VA_FOURCC_XYUV surfaces instead of VA_FOURCC_AYUV? I’m confused because I can’t find corresponding changes in your PR … b. Plus, I can’t find allocation of VA_FOURCC_XYUV inside MSDK allocator, you added code which can handle mapping, not allocation.. 4. I guess your current PR is need for item 3 above, right?
Yes, this PR handles mapping, not allocation.
@dmitryermilov ping
@lwan108 could you find someone to take a look?