Colorspace conversion and image buffer format
Hi all. I'm writing a native decoder for HuffYUV (fourcc HFYU). Image format can be RGB, RGBA (RGB plus alpha channel) and YUY2 (it will use new output format selection when it will be available). I have some question about colorspaces: - what about RGBA? Should I store it as RGB32, using the 4th byte as A, or shoud I ignore alpha channel? - what's the best way to output YV12 using YUY2 as source? should I convert it "on the fly" averaging U (and V) every 2 rows or it's better to store the image into a temporary buffer and use yuy2toyv12() function from rgb2rgb.c? What's the best way to do it if input is interlaced? Another question about buffer format: image buffer will be MP_TEMP (every frame is independent from others). Do I have to use MP_IMGFLAG_READABLE if I need to read from buffer during decompression (I need to access previous pixel and top pixel from previous row)? Other flags used are MP_IMGFLAG_YUV for YUY2 case and also MP_IMGFLAG_PLANAR for YV12 case. Ciao, Roberto
participants (2)
-
Arpi -
Roberto Togni