[FFmpeg-devel] [PATCH]Support 64bit RGB input

Carl Eugen Hoyos cehoyos at ag.or.at
Sun Mar 4 00:22:13 CET 2012


Michael Niedermayer <michaelni <at> gmx.at> writes:

> > > > Attached patch allows to convert 64bit RGB input.
> > > 
> > > LGTM
> > 
> > Conversion to RGBA produces (nearly) transparent files 
> > because A1 and A2 overflow in yuv2rgb_1_c_template if 
> > input is 0xFF, patch follows inlined:
> 
> why do they overflow ? is there some incorrect scaling applied
> somewhere ?

rgba64ToA_c() in input.c reads 65535 (=completely opaque), not 
0xFF as written above, as alpha value for (the lower part of) 
the sample from ticket #503, hyscale() in swscale.c calls 
c->hyScale() which changes the value to 32767, 
yuv2rgb_1_c_template() in output.c calculates A1 and A2 
as 0x100 ((32767+64)/2^7) which is then written as "0" 
(=completely transparent) if the output is RGBA.

Carl Eugen



More information about the ffmpeg-devel mailing list