当前位置: 代码迷 >> 驱动开发 >> dm6446视频处理前端有个寄存器(HSIZE_OFF),请帮小弟我理解一上
  详细解决方案

dm6446视频处理前端有个寄存器(HSIZE_OFF),请帮小弟我理解一上

热度:14   发布时间:2016-04-28 10:45:34.0
dm6446视频处理前端有个寄存器(HSIZE_OFF),请帮我理解一下
写入的数值是regw(((params->win.width * 2) + 31) & 0xffffffe0, HSIZE_OFF);
数据手册称为:
Address offset for each line. Sets offset for each output line in SDRAM. Either 16 or 32 pixels,
depending on setting of the PACK8 bit in SYN_MODE. This bit field is latched by VD. The 5 LSBs
are ignored; the offset is on a 32-byte boundary. For optimal performance in the system, the
address offset should be on a 256-byte boundary.

------解决方案--------------------
/* configure the horizontal line offset */
- /* this is done by rounding up width to a multiple of 16 pixels */
- /* and multiply by two to account for y:cb:cr 4:2:2 data */
- regw(((params->win.width * 2) + 31) & 0xffffffe0, HSIZE_OFF);