Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK

question on alignment

MyMother
Beginner
138 Views

hi Intel-friends,

OS: Ubuntu 12.04

       mediasdk-tutorials-0.0.3

       MediaServerStudioEssentials2015R6

Platform:  i5-4570S

Q1. I found some description as below in simple_decode_vpp_pp.cpp, may I know the reason on "width must be a multiple of 16" and "height must be a multiple of 16 in case of frame picture and a multiple of 32 in case of field picture" ??

    // width must be a multiple of 16
    // height must be a multiple of 16 in case of frame picture and a multiple of 32 in case of field picture
    VPPParams.vpp.In.Width = MSDK_ALIGN16(VPPParams.vpp.In.CropW);
    VPPParams.vpp.In.Height =
        (MFX_PICSTRUCT_PROGRESSIVE == VPPParams.vpp.In.PicStruct) ?
        MSDK_ALIGN16(VPPParams.vpp.In.CropH) :
        MSDK_ALIGN32(VPPParams.vpp.In.CropH);

Q2. I didn't find any behavior about alignment in simple_decode_vmem.cpp but simple_decode.cpp and simple_decode_vpp_pp.cpp. Does it mean there's no alignment requirement in video memory? if not, why??

Thanks in advance 

 

0 Kudos
1 Reply
Surbhi_M_Intel
Employee
138 Views

Hi Medwin, 

Media SDK requires width and height needs to be aligned to 16 in case of progressive content due to the hardware design, required by the driver. So, it is required whether it is for VPP or decode. It is also mentioned in the Media sdk manual
Width and height alignment needs to be done irrespective of video memory or system memory.

Thanks,
​Surbhi

0 Kudos
Reply