尊敬的ti老师
我想往lcd上显示dm365 resizer B吐出的视频数据,但dvsdk4中imp_pre_rsz例子是显示到composite和component的,请教下有没有NV12视频显示到lcd的代码例子。如果没有,这个程序该怎么写,是不是和composite,component类似(lcd也用了v4l2了吗?),所以都是先用ioctl 出队列命令从显示设备上请求一个缓存区,然后直接把dm365 resizer B吐出的视频数据拷贝到那里就可以了?
谢谢
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
尊敬的ti老师
我想往lcd上显示dm365 resizer B吐出的视频数据,但dvsdk4中imp_pre_rsz例子是显示到composite和component的,请教下有没有NV12视频显示到lcd的代码例子。如果没有,这个程序该怎么写,是不是和composite,component类似(lcd也用了v4l2了吗?),所以都是先用ioctl 出队列命令从显示设备上请求一个缓存区,然后直接把dm365 resizer B吐出的视频数据拷贝到那里就可以了?
谢谢
请如下文章修改代码实现LCD输出
processors.wiki.ti.com/.../Adding_Display_Resolutions_to_DMAI
尊敬的Li老师:
非常感谢您的回复。我仔细阅读了processors.wiki.ti.com/.../Adding_Display_Resolutions_to_DMAI
但是还是有一些疑问。
从文章上看虽然是dvsdk2的但我对照dvsdk4里面,应该是可以用的。
文章中的做法就是首先需要lcd的驱动(文章中是avnetlcd_encoder.c),
static struct avnetlcd_encoder_config avnetlcd_encoder_configuration = {
.no_of_outputs = AVNETLCD_ENCODER_MAX_NO_OUTPUTS,
.output[0] = {
.output_name = VID_ENC_OUTPUT_LCD1,//vid_encoder_types.h中有#define VID_ENC_OUTPUT_LCD1 "LCD1"
.no_of_standard = AVNETLCD_ENCODER_GRAPHICS_NUM_STD,
.standards[0] = {
.name = VID_ENC_STD_800x480,
.std = 1,
.if_type = VID_ENC_IF_PRGB,
.interlaced = 0,
.xres = 800,
.yres = 480,
.fps = {60, 1},
.left_margin = 216,
.right_margin = 40,
.upper_margin = 32,
.lower_margin = 11,
.hsync_len = 9,
.vsync_len = 9,
.flags = 0},
}, /* hsync -ve, vsync -ve */
};
然后在应用程序display.c中添加
/* Strings for sysfs video output variables */
static Char *outputStrings[Display_Output_COUNT] = {
"SVIDEO",
"COMPOSITE",
"COMPONENT",
"LCD",
"LCD1", //似乎是通过“LCD1”这个名字与上面驱动中的红字部分关联起来
"DVI",
NULL
};
这样应用程序中便可以象普通显示设备一样使用LCD1。
但我的第一个疑问是:文章的前部分,在dmai的appMain.c添加lcd的配置信息(即Display_Attrs_DM365_OSD_DEFAULT)是干什么用的?好像这个配置和驱动程序没有什么关联的地方或语句?应用程序main.c也没有display.c那样引用"LCD1",但从Display_Attrs_DM365_OSD_DEFAULT的定义又感觉确实和LCD显示有关,真不知道这个Display_Attrs_DM365_OSD_DEFAULT是如何和驱动关联起来?
注:Display_Attrs_DM365_OSD_DEFAULT和缺省的Display_Attrs_DM365_VID_DEFAULT的区别就是:1)显示设备不同(vid是/dev/video2,osd是/dev/fb0);2)colorspace不同(vid是NV12,osd是RGB565)。
另一个问题是如上面“注”所说,Display_Attrs_DM365_OSD_DEFAULT接收的数据是RGB565,那么NV12视频数据该如何显示在LCD上呢?