vpu jpeg decoder successfully, but can't get output YUV data

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

vpu jpeg decoder successfully, but can't get output YUV data

ソリューションへジャンプ
1,435件の閲覧回数
moon
Contributor I

I use vpu to decode jpeg,  some code as below, after vpu_DecGetOutputInfo call successfully, I always can't get any decoded YUV data from frame buffer indicated by outInfo.indexFrameDisplay. platform is i.mx53 and linux. data of frame buffer are always 0s. indexFrameDisplay and indexFrameDecoded always 0.

// get output after decode code snippet

retVal = vpu_DecGetOutputInfo(pObj->handle, &outInfo);

if(retVal != RETCODE_SUCCESS)

{

  printf("vpu_DecGetOutputInfo failed: %d\n", retVal);

  exit(1);

}

if(outInfo.indexFrameDisplay != -1 && outInfo.indexFrameDisplay != -2 && outInfo.indexFrameDisplay != -3  && outInfo.prescanResult > 0 && outInfo.indexFrameDisplay >= 0)

  {

  picture = (AVFrame *)data;

  startFrameAddr = pObj->frame_buffer_desc[outInfo.indexFrameDisplay].virt_uaddr;

  picture->data[0] = (char *)startFrameAddr;

  picture->data[1] = (char *)(startFrameAddr + pObj->width * pObj->height);

  picture->data[2] =(char *)(picture->data[1] + pObj->width/2 * pObj->height/2);

  picture->linesize[0] = pObj->width;

  picture->linesize[1] = pObj->width / 2;

  picture->linesize[2] = pObj->width / 2;

  picture->height = pObj->height;

  picture->width = pObj->width;

}

 

// open decoder code snippets

  memset(&openParam, 0, sizeof(DecOpenParam));

  openParam.bitstreamBuffer = pObj->bitstream_mem_desc.phy_addr;

  openParam.bitstreamBufferSize = pObj->bitstream_mem_desc.size;

  openParam.bitstreamFormat = STD_MJPG;

  openParam.filePlayEnable = 0;

  openParam.dynamicAllocEnable = 0;

  if(vpu_DecOpen(&pObj->handle, &openParam) != RETCODE_SUCCESS)

  {

  printf("decoder open failure \n");

  exit(1);

  }

ラベル(3)
1 解決策
949件の閲覧回数
miloszlazurek
Contributor I

I had similar issues while working on I.MX.6 - Be sure to enable the ROTATOR feature when decoding JPEG if not doing it already. Refer to the freescale example decoder (dec.c) to see how it is done.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
950件の閲覧回数
miloszlazurek
Contributor I

I had similar issues while working on I.MX.6 - Be sure to enable the ROTATOR feature when decoding JPEG if not doing it already. Refer to the freescale example decoder (dec.c) to see how it is done.

0 件の賞賛
返信
949件の閲覧回数
prabhurammuruga
Contributor I

May I know where I could get the freescale example decoder ?

Search on freescale website did not help,

I am working on iMX53 , trying to use the VPU for jpeg decoding for a sample gallery application.

0 件の賞賛
返信