Rockbox Development > New Ports
Cowon D2
ThibG:
I'm looking how lcd_blit_yuv work. So far, I can see that the (0;0) point is supposed to be at the top right corner. I can also see that the ASM part (lcd-as-memframe.S) draws line vertically.
I'm trying to modify it, with my almost inexistant ASM understanding.
Edit: It "works". Er... If video playback is supposed to be half the size of the screen, it works...
Another thing is that I modified the file "lcd-as-memframe.S", common to all ARM targets instead of making a cowond2-only file.
shotofadds:
--- Quote from: ThibG on July 09, 2008, 09:07:37 AM ---I can also see that the ASM part (lcd-as-memframe.S) draws line vertically.
--- End quote ---
The existing code (both the C and the assembly) was written for players which have their screens in a portrait layout, eg. the Gigabeat F's 240x320 display. So the drawing code takes a 320x240 YUV image and rotates it to display in 240x320. Unfortunately the assembly code is misleading because it does not mention this rotation anywhere in its comments.
If you're going to look at fixing that function, I'd suggest starting with a simple C version (you could just include that in lcd-cowond2.c). This means you don't have to worry about breaking the code for other targets, and we can worry about optimising and/or genericising it later.
ThibG:
I've now a working (extremly slow) basic C code. The YCbCr to RGB565 conversion is not optimised at all, as I didn't understand the ASM part.
However, don't the D2 support one byte per color?
shotofadds:
--- Quote from: ThibG on July 09, 2008, 12:56:09 PM ---I've now a working (extremly slow) basic C code. The YCbCr to RGB565 conversion is not optimised at all, as I didn't understand the ASM part.
--- End quote ---
Good stuff - could you post a patch to Flyspray containing your changes? Also maybe have a look at some of the other implementations for some tips (eg. iPod Video?)
I don't know if you're familiar with the test_fps plugin (add test_fps.c to apps/plugins/SOURCES), but it might come in handy while optimising your code...
--- Quote from: ThibG on July 09, 2008, 12:56:09 PM ---However, don't the D2 support one byte per color?
--- End quote ---
Yes, the hardware does, but Rockbox only has a 16-bit LCD driver. The hardware should also support YUV blitting directly in hardware, which will be a nice avenue to explore one day when the basics are working correctly. ;)
ThibG:
I rewrote the patch with what I've read in the ASM files.
It's a bit slow, but much faster than the old patch.
It's available at http://www.rockbox.org/tracker/task/9178
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version