From: salsaman <sal...@xs...> - 2004-09-16 16:56:19
|
Burkhard Plaum wrote: >> Fortunately for the plugins I've seen so far there is not a problem >> because the red/blue channels can be swapped without problem, so they >> can support both RGB and BGR. > > > Maybe the plugins might still look "cool" when B and R are swapped, > but the plugin authors won't like this. > Adjusting the colors for a visualization can involve many hours > of fine-tuning. Well true, but in this case it could be marked somehow. > > > There need to be a bullet-proof definition of RGB and BGR, so that > all plugins are displayed with the right colors on all architectures. See below. > > You should also take care, that there is no "standard" about RGB and BGR, > especially for 15/16 bpp. The same format might be called differently > in different software packages. Sorry, I was talking about 24bit colours, so in this case the definition is obvious, blue pixel byte comes before green pixel byte which comes before red pixel byte. > > Colorspace issues can become really complicated. I wrote a library > (gavl), > which handles all these. The main header is here: > > http://cvs.sourceforge.net/viewcvs.py/gmerlin/gavl/include/gavl/gavl.h?view=markup > > > The libavcodec source (ffmpeg.org) also gives an idea how to handle > pixel formats properly. > Swapping the red and blue is not hard, it's just time consuming when it has to be done for each frame. I've not heard of gavl before, but it looks interesting. Do you have conversions for all those palettes ? I am looking for a high quality YUV420 <---> UYVY converter. Livido will also have palette conversions. Salsaman. |