Media (Intel® 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
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

something was wrong with vpp use

china_y_
Beginner
384 Views

i want to use vpp for color format convert 

everything was ok at the beginning 

i follow the step in vpp demo 

 

but when i get here 

it always return -15 

i check it  it means invalid video parameters

follow is my set

pParam->vpp.In.FourCC = MFX_FOURCC_YV12 ;
pParam->vpp.In.CropX  = 0 ;
 pParam->vpp.In.CropY  = 0 ;

 pParam->vpp.In.CropW =  m_BitInfoHeader.biWidth ;
 pParam->vpp.In.CropH =  m_BitInfoHeader.biHeight ;
  pParam->vpp.In.FrameRateExtD = 1 ;
    pParam->vpp.In.FrameRateExtN = 30  ;

    pParam->vpp.In.Width = MSDK_ALIGN16(m_BitInfoHeader.biWidth) ;
    pParam->vpp.In.Height =MSDK_ALIGN16(m_BitInfoHeader.biHeight) ;
    pParam->vpp.In.PicStruct = MFX_PICSTRUCT_PROGRESSIVE ;

    //  out put data 
    pParam->vpp.Out.FourCC = MFX_FOURCC_YV12 ; 
    pParam->vpp.Out.CropX = 0 ;
    pParam->vpp.Out.CropY = 0 ;
    pParam->vpp.Out.CropW = m_nDstWidth ;
    pParam->vpp.Out.CropH = m_nDstHeight ;
    pParam->vpp.Out.PicStruct = MFX_PICSTRUCT_PROGRESSIVE ;
    pParam->vpp.Out.FrameRateExtN = 30 ;
    pParam->vpp.Out.FrameRateExtD = 1 ;

    pParam->IOPattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY | MFX_IOPATTERN_OUT_SYSTEM_MEMORY;

    pParam->NumExtParam = 0 ;
    pParam->ExtParam = NULL ;

 

 

 

sts = m_pMfxVideoVPP->QueryIOSurf(pParamm,request) ;

this always return -15

did i miss some thing  in my setting ?

thank you advance 

 

0 Kudos
4 Replies
Petter_L_Intel
Employee
384 Views

Hi China,

VPP output format : MFX_FOURCC_YV12   is not supported!   If you want to convert from YV12 for NV12 then the input type should be MFX_FOURCC_YV12  and output MFX_FOURCC_NV12   

Also, the FrameRateExtD/N values are invered at in and output. Probably not what you want, and may cause issues.

Regards,
Petter

0 Kudos
china_y_
Beginner
384 Views

Petter Larsson (Intel) wrote:

Hi China,

VPP output format : MFX_FOURCC_YV12   is not supported!   If you want to convert from YV12 for NV12 then the input type should be MFX_FOURCC_YV12  and output MFX_FOURCC_NV12   

Also, the FrameRateExtD/N values are invered at in and output. Probably not what you want, and may cause issues.

Regards,
Petter

thank you very much for your answer 

best  wishes 

0 Kudos
china_y_
Beginner
384 Views


MFXInit.impl=HARDWARE|VIA_D3D9
MFXInit.ver=1.1
MFXInit.status=MFX_ERR_NONE
vpp.QueryIOSurf.par.AsyncDepth=0
vpp.QueryIOSurf.par.vpp.In.FourCC=YV12
vpp.QueryIOSurf.par.vpp.In.Resolution=(320,240)
vpp.QueryIOSurf.par.vpp.In.Crop=(0,0,320,240)
vpp.QueryIOSurf.par.vpp.In.FrameRate=15/1
vpp.QueryIOSurf.par.vpp.In.AspectRatio=0:0
vpp.QueryIOSurf.par.vpp.In.PicStruct=PROGRESSIVE
vpp.QueryIOSurf.par.vpp.In.ChromaFormat=MONO
vpp.QueryIOSurf.par.vpp.Out.FourCC=NV12
vpp.QueryIOSurf.par.vpp.Out.Resolution=(0,0)
vpp.QueryIOSurf.par.vpp.Out.Crop=(0,0,320,240)
vpp.QueryIOSurf.par.vpp.Out.FrameRate=15/1
vpp.QueryIOSurf.par.vpp.Out.AspectRatio=0:0
vpp.QueryIOSurf.par.vpp.Out.PicStruct=PROGRESSIVE
vpp.QueryIOSurf.par.vpp.Out.ChromaFormat=MONO
vpp.QueryIOSurf.par.Protected=0
vpp.QueryIOSurf.par.IOPattern=IN_SYSTEM_MEMORY|OUT_SYSTEM_MEMORY
vpp.QueryIOSurf.par.NumExtParam=0
vpp.QueryIOSurf.par.ExtParam=NULL
vpp.QueryIOSurf.request[0].Info.FourCC=0x0
vpp.QueryIOSurf.request[0].Info.Resolution=(0,0)
vpp.QueryIOSurf.request[0].Info.Crop=(0,0,0,0)
vpp.QueryIOSurf.request[0].Info.FrameRate=0/0
vpp.QueryIOSurf.request[0].Info.AspectRatio=0:0
vpp.QueryIOSurf.request[0].Info.PicStruct=UNKNOWN(0)
vpp.QueryIOSurf.request[0].Info.ChromaFormat=MONO
vpp.QueryIOSurf.request[0].Type=UNKNOWN(0)
vpp.QueryIOSurf.request[0].NumFrameMin=0
vpp.QueryIOSurf.request[0].NumFrameSuggested=0
vpp.QueryIOSurf.request[1].Info.FourCC=0x0
vpp.QueryIOSurf.request[1].Info.Resolution=(0,0)
vpp.QueryIOSurf.request[1].Info.Crop=(0,0,0,0)
vpp.QueryIOSurf.request[1].Info.FrameRate=0/0
vpp.QueryIOSurf.request[1].Info.AspectRatio=0:0
vpp.QueryIOSurf.request[1].Info.PicStruct=UNKNOWN(0)
vpp.QueryIOSurf.request[1].Info.ChromaFormat=MONO
vpp.QueryIOSurf.request[1].Type=UNKNOWN(0)
vpp.QueryIOSurf.request[1].NumFrameMin=0
vpp.QueryIOSurf.request[1].NumFrameSuggested=0
vpp.QueryIOSurf.status=MFX_ERR_INVALID_VIDEO_PARAM

 

 

 

 

i used the tracer  and got  these information 

0 Kudos
Petter_L_Intel
Employee
384 Views

Hi,

looks like the issue is that you're setting ChromaFormat to MONO. You should be setting this parameter to MFX_CHROMAFORMAT_YUV420 as illustrated in the Media SDK samples.

Regards,
Petter

0 Kudos
Reply