DM320 API discussion

From The Neuros Technology Wiki

Jump to: navigation, search

This is cut and pasted from a 6/13/06 IRC meeting, regarding APIs that the Rasterman would like to get at the proprietary DSP on the DM320:

complete log of discussion is on the [IRC Log]


[20:40]         <raster>  	i could do with the following:
[20:40] 	<raster> 	the ability to use the dsp as a alpha blender and image scaler.
[20:41] 	<raster> 	the hard bit will be generating dsp bytecode for that
[20:41] 	<BFaskos> 	You don't need the DSP for that. There is dedicated HW in the ARM for free.
[20:41] 	<raster> 	BFaskos: ummm... that's news to me - in temrs of the WAY i want to use it
[20:41] 	<raster> 	ie
[20:41] 	<BFaskos> 	The display HW gives you 5 planes of video/image.
[20:41] 	<raster> 	there is a "textture unit" ?
[20:41] 	<raster> 	oh sure
[20:41] 	<raster> 	fixed planes
[20:42] 	<raster> 	i need "take this pixel data - blend and scale onto this pixel block here"
[20:42] 	<raster> 	fixed planes do kind of limit you :(
[20:42] 	<BFaskos> 	Each plane can have its own window and attributes.
[20:42] 	<raster> 	sure
[20:42] 	<raster> 	but within each plane
[20:42] 	<raster> 	u still need to composite
[20:43] 	<BFaskos> 	Remember, this is optimized for video, not for "stretchDiBits()" calls.
[20:43] 	<raster> 	yup
[20:43] 	<raster> 	i realise
[20:43] 	<raster> 	(though it annoys me) :)
[20:43] 	<BFaskos> 	There is an alpha blender and a HW scaler.
[20:43] 	<raster> 	but its not a "stretchblit()"
[20:44] 	<BFaskos> 	You will have to make your own. The HW acceleration is there
[20:44] 	<raster> 	its an old-style mult-playfield setup
[20:44] 	<raster> 	hmm
[20:44] 	<raster> 	wait
[20:44] 	<raster> 	there is hw that can stretchblit and blend
[20:44] 	<raster> 	other than having your display planes?
[20:44] 	<raster> 	(other than tweaking the dsp to do it) ?
[20:44] 	<BFaskos> 	The scaler HW works independently of the display HW.
[20:44] 	<raster> 	ooh
[20:44] 	<raster> 	really?
[20:45] 	<raster> 	THIS is news to me
[20:45] 	<raster> 	ok ok
[20:45] 	<BFaskos> 	The scaler HW works this way:
[20:45] 	<raster> 	tell me more
[20:45] 	<raster> 	:)
[20:45] 	<BFaskos> 	1: Set input size and address
[20:45] 	<BFaskos> 	2: Set output size and address
[20:45] 	<BFaskos> 	3: Set the "go" bit.
[20:45] 	<BFaskos> 	4: Done.
[20:45] 	<raster> 	ok
[20:45] 	<raster> 	nice
[20:45] 	<BFaskos> 	Yeap.
[20:45] 	<raster> 	it works on any memory?
[20:46] 	<BFaskos> 	Of course, there are a few restrictions in parameter size, etc,
[20:46] 	<raster> 	(via mmu - ie it can handle paged memory) ?
[20:46] 	<raster> 	sure
[20:46] 	<BFaskos> 	but these are nottoo bad.
[20:46] 	<raster> 	does that also alpha blend?
[20:46] 	<raster> 	or thats justa blit?
[20:46] 	<BFaskos> 	No and no.
[20:46] 	<raster> 	ok
[20:46] 	<raster> 	so it requires a linear buffer
[20:46] 	<BFaskos> 	Alpha blend is supported by decreeing that one of the planes is actually the alpha channel.
[20:46] 	<raster> 	(eg the frameubuffer or specialised linear mapped memory)
[20:47] 	<raster> 	hmm
[20:47] 	<raster> 	ok
[20:47] 	<raster> 	where are the specs for this?
[20:47] 	<raster> 	this is the stuff i REALLY want to get my hands dirty with
[20:47] 	<raster> 	using the genral cpu to do this... kind of sucks :(
[20:47] 	<BFaskos> 	Yes, this is the fun stuff.
[20:48] 	<BFaskos> 	The resizer actually does a nice job with the filters and everything. It is quite nice.
[20:48] 	<BFaskos> 	The display system has its own resizer as well, but sizes are limited.
[20:48] 	<JoeBorn> 	Bob is the documentation for this all NDA stuff or is there anything out there
[20:48] 	<raster> 	basically almost all the rendering cycles are spent in blitting pixels, stretching (up or down with interpolation/supersampling) and alpha blending (ie read/modify/write cycles with the cpu - expensive stuff)
[20:48] 	<raster> 	oh
[20:48] 	<raster> 	it has fitlers
[20:48] 	<raster> 	so its not just a nearest scaler?
[20:48] 	<raster> 	nice!
[20:49] 	<raster> 	ok
[20:49] 	<raster> 	the question is
[20:49] 	<BFaskos> 	The DM320 documentation is all NDA. :(
[20:49] 	<raster> 	1. how do i get access to this fun stuff?
[20:49] 	<raster> 	2. at what level is that access
[20:49] 	<BFaskos> 	Cool polyphase filter too.
[20:49] 	<raster> 	nice
[20:49] 	<raster> 	ncie
[20:49] 	<raster> 	i like it
[20:49] 	<raster> 	this is just the stuff i want
[20:50] 	<raster> 	basically the guts of a gfx acclerator chip
[20:50] 	<BFaskos> 	The neuros framework could give you API level functionality.
[20:50] 	<raster> 	all i need to do is make an engine that simply uses it and interfaces to it
[20:50] 	<raster> 	sure
[20:50] 	<raster> 	thats fine by me
[20:50] 	<raster> 	if u have to bank chip registers
[20:50] 	<raster> 	i will
[20:50] 	<raster> 	i actualyl enjoyed that back in my amiga asm hacking days :)
[20:51] 	<raster> 	the blitter and the copper where my best freinds :)
[20:52] 	<BFaskos> 	The Amiga was such a great machine!
[20:52] 	<raster> 	but a quick off the cuff api would need
[20:52] 	<BFaskos> 	The DM320 does not have a HW blitter...
[20:52] 	<raster> 	1. a way to allocate a linear pixel buffer (and define its porperties- alpha channel or not etc.)
[20:53] 	* JoeBorn  scours internet for a "rasterman for dummies" book
[20:53] 	<BFaskos> 	BTW, on the DM320 all buffers are 2-D, with a defined width and height.
[20:53] 	<raster> 	2. as u mentioned before a way to take any rectangular region of one buffer and copy and/or blend/composite and/or stretch to another buffer
[20:53] 	<raster> 	BFaskos: happy with that :)
[20:53] 	<BFaskos> 	Since all HW that access it has a "stride" parameter, you can (like in the Amiga) create
[20:53] 	<BFaskos> 	fields and zoom and pan through it!
[20:53] 	<raster> 	yup
[20:53] 	<raster> 	works for me
[20:54] 	<raster> 	so anyway
[20:54] 	<raster> 	if i can basically have the above api exposed
[20:54] 	<raster> 	i'm a happy man
[20:54] 	<raster> 	let me know the pixel format (agb32 or rgb   separate a plane, pixel format etc.)
[20:55] 	<swoag> 	we sure can develop whatever APIs Rasterman needs.
[20:55] 	<swoag> 	:)
[20:55] 	<raster> 	otherwise - if not - give me chip specs
[20:55] 	<raster> 	and i'll handle it :)
[20:56] 	<swoag> 	or,
[20:56] 	<BFaskos> 	Raster, while the docs on the DM320 is NDA material, take a loot at
[20:56] 	<swoag> 	Rasterman will come live in China.
[20:56] 	<BFaskos> 	the DM6446 (Davinci) that TI is making public.
[20:56] 	<BFaskos> 	The OSD on DaVinci is very simil;ar to the OSD in the DM320.
[20:56] 	<BFaskos> 	focus.ti.com
Personal tools