On Mon, Nov 10, 2014 at 3:01 PM, Nicolas George <geo...@nsup.org> wrote:
> > > + > > + /* YCrCb - RGB conversion */ > > + Cr = Cr - 128; > > + Cb = Cb - 128; > > > + R = Y + Cr + (Cr>>2) + (Cr>>3) + (Cr>>5); > > + G = Y - ((Cb>>2) + (Cb>>4) + (Cb>>5)) - ((Cr>>1) + (Cr>>3) + > (Cr>>4) + (Cr>>5)); > > + B = Y + Cb + (Cb>>1) + (Cb>>2) + (Cb>>6); > > Are these he official formulas? The shifts look like premature > optimization. > We have conversion macros for those, see yuv_a_to_rgba at the beginning of the same file. In fact, if you just read all the YCbCr stuff into a fixed-size buffer first, you might even be able to use the same function for the entire conversion. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel