framebuffer in YUV420 mode

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

framebuffer in YUV420 mode

ソリューションへジャンプ
3,232件の閲覧回数
tselmeci
Contributor IV

Hello all!

VPU decodes H264 frames in YUV420 planar format, and I was just wondering why shall IPU convert it to RGB565 if it's possible to set the framebuffer in YUV420 mode? Then the decoded bytes need only to be copied into the framebuffer (roughly).

Is it possible to set the framebuffer format to YUV420? I'm using SII902x HDMI converter and this kernel parameter now:

video=mxcdi0fb:RGB24,1920x1080M@60 hdmi di0_primary

All my attempts were failed to set to YUV420.

ラベル(3)
タグ(3)
0 件の賞賛
返信
1 解決策
1,958件の閲覧回数
tselmeci
Contributor IV

Meanwhile I've figured it out how to set the framebuffer in YUV420P mode. It really can't be done from kernel command line, instead one has to use framebuffer IOCTLs.

By the way, YUV420 --> RGB conversion done by IPU in case on HD resolution on iMX53 causes a significant overhead, so I'm searching for a better solution.

if (ioctl(mstate.fb_handle, FBIOGET_VSCREENINFO, &(mstate.fb_vsi)) < 0)

  return -1;

mstate.fb_vsi.xres = DISPLAY_RES_X;

mstate.fb_vsi.yres = DISPLAY_RES_Y;

mstate.fb_vsi.xres_virtual = DISPLAY_RES_X;

mstate.fb_vsi.yres_virtual = DISPLAY_RES_Y * 3;

mstate.fb_vsi.activate |= FB_ACTIVATE_FORCE;

mstate.fb_vsi.nonstd = IPU_PIX_FMT_YUV420P;

mstate.fb_vsi.bits_per_pixel = 12;

if (ioctl(mstate.fb_handle, FBIOPUT_VSCREENINFO, &(mstate.fb_vsi)) < 0)

     return -1;

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,958件の閲覧回数
b36401
NXP Employee
NXP Employee

Unfortunately it can not be managed with simple setting the option in u-boot. However you can configure IPU of i.MX53 manually. Please refer Chapter 45 of i.MX53 Multimedia Applications Processor Reference Manual.

However please note that the overhead related to RGB<->YUV conversion may be not significant and can be disregarded

0 件の賞賛
返信
1,959件の閲覧回数
tselmeci
Contributor IV

Meanwhile I've figured it out how to set the framebuffer in YUV420P mode. It really can't be done from kernel command line, instead one has to use framebuffer IOCTLs.

By the way, YUV420 --> RGB conversion done by IPU in case on HD resolution on iMX53 causes a significant overhead, so I'm searching for a better solution.

if (ioctl(mstate.fb_handle, FBIOGET_VSCREENINFO, &(mstate.fb_vsi)) < 0)

  return -1;

mstate.fb_vsi.xres = DISPLAY_RES_X;

mstate.fb_vsi.yres = DISPLAY_RES_Y;

mstate.fb_vsi.xres_virtual = DISPLAY_RES_X;

mstate.fb_vsi.yres_virtual = DISPLAY_RES_Y * 3;

mstate.fb_vsi.activate |= FB_ACTIVATE_FORCE;

mstate.fb_vsi.nonstd = IPU_PIX_FMT_YUV420P;

mstate.fb_vsi.bits_per_pixel = 12;

if (ioctl(mstate.fb_handle, FBIOPUT_VSCREENINFO, &(mstate.fb_vsi)) < 0)

     return -1;

0 件の賞賛
返信