TI中文支持网
TI专业的中文技术问题搜集分享网站

DM368显示

我在进行一帧图像的显示时候,unsigned char * ptr=malloc(736*576);

在里面填充了图像数据之后,数据正确

if(Display_get(hDisplay, &hDisBuf) < 0) {
printf("Failed to get display buffer\n");
goto cleanup;
}

Buffer_setUserPtr(hDisBuf, ptr);//报错1

if (Display_put(hDisplay,hDisBuf) < 0) //报错2
{
printf("Failed to put display buffer\n"); goto cleanup;
}

上面是送给显示,但是输出以下报错信息,请问是怎么回事

buffer_size hOutdavinci_v4l2 davinci_v4l2.1: Failed to map user address Buf2 is 0

 Failed to put display buffer

下面的是display的属性设置,还请论坛各位大神及ti的老师们不吝赐教,万分感谢。

DisgfxAttrs.dim.height = 576;
DisgfxAttrs.dim.width = 736;
DisgfxAttrs.dim.lineLength = Dmai_roundUp(BufferGfx_calcLineLength(DisgfxAttrs.dim.width, colorSpace), 32);

DisgfxAttrs.dim.x = 0;
DisgfxAttrs.dim.y = 0;

if (colorSpace == ColorSpace_YUV420PSEMI) {
bufSize = (DisgfxAttrs.dim.lineLength * DisgfxAttrs.dim.height * 3 / 2);
// bufSize += RSZ_WIDTH*RSZ_HEIGHT*2;//720*576*2; } else {
bufSize = DisgfxAttrs.dim.lineLength * DisgfxAttrs.dim.height * 2; }

DisgfxAttrs.colorSpace = colorSpace;

/* Update global data for user interface */
gblSetImageWidth(736);
gblSetImageHeight(576);

DisgfxAttrs.dim.height = RSZ_HEIGHT;
DisgfxAttrs.dim.width = RSZ_WIDTH;//720;
DisgfxAttrs.dim.lineLength = Dmai_roundUp(BufferGfx_calcLineLength(DisgfxAttrs.dim.width, colorSpace), 32);

DisgfxAttrs.dim.x = 0;
DisgfxAttrs.dim.y = 0;
if (colorSpace == ColorSpace_YUV420PSEMI) {
bufSize = (DisgfxAttrs.dim.lineLength * DisgfxAttrs.dim.height * 3 / 2);
} else {
bufSize = DisgfxAttrs.dim.lineLength * DisgfxAttrs.dim.height * 2;

}

printf("DisgfxAttrs.dim.lineLength = %d\r\n", DisgfxAttrs.dim.lineLength);
printf("DisgfxAttrs.dim.height = %d\r\n", DisgfxAttrs.dim.height);

/* Create a table of buffers to use with the capture driver */
DisgfxAttrs.colorSpace = colorSpace;

/* Create a table of buffers to use with the display driver */
hDispBufTab = BufTab_create(NUM_DISPLAY_BUFS, bufSize,
BufferGfx_getBufferAttrs(&DisgfxAttrs));
if (hDispBufTab == NULL) {
printf("Failed to create buftab\n");
goto cleanup;
}
/* Create display device driver instance if preview is needed */
if (1) {
dAttrs.videoStd = videoStd;
if ( (dAttrs.videoStd == VideoStd_CIF) ||
(dAttrs.videoStd == VideoStd_SIF_NTSC) ||
(dAttrs.videoStd == VideoStd_SIF_PAL) ||
(dAttrs.videoStd == VideoStd_VGA) ||
(dAttrs.videoStd == VideoStd_D1_NTSC) || (dAttrs.videoStd == VideoStd_D1_PAL) ) {
dAttrs.videoOutput = Display_Output_COMPOSITE;
} else {
dAttrs.videoOutput = Display_Output_COMPONENT;
} dAttrs.numBufs = NUM_DISPLAY_BUFS;
dAttrs.colorSpace = colorSpace;
dAttrs.width = 736;//capDim.width;
dAttrs.height = 576;//capDim.height;
hDisplay = Display_create(hDispBufTab, &dAttrs);

if (hDisplay == NULL) {
printf("Failed to create display device\n");
goto cleanup;
}
}

bob2:

回复 peng wu7:

peng wu7 :

您好!想问下,怎么在LCD上显示YUV数据呢?

虽然YUV->RGB->FB也可以,但速度太慢了?

文档说VID层支持显示YUV?能给点思路吗?

赞(0)
未经允许不得转载:TI中文支持网 » DM368显示
分享到: 更多 (0)