Michael Niedermayer <[email protected]> added the comment: On Wed, Jul 21, 2010 at 01:04:16PM +0000, Vitor wrote: > > New patch that also fix RGB48{BE,LE}. > > RGB8, RGB4 and MONO{WHITE,BLACK} are still broken but I think it is better to > just error out saying that full_chroma_int is not supported for these outputs > (and it is not very meaningful anyway). > > ________________________________________________ > FFmpeg issue tracker <[email protected]> > <https://roundup.ffmpeg.org/issue2113> > ________________________________________________ > swscale.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 48 insertions(+) > a2379da1fa0ebdd905f3cb89523c59f5372592ff sws_full_chroma_fix2.diff > Index: libswscale/swscale.c > =================================================================== > --- libswscale/swscale.c (revision 31758) > +++ libswscale/swscale.c (working copy) > @@ -974,6 +974,54 @@ > } > } > break; > + case PIX_FMT_RGB565: > + YSCALE_YUV_2_RGBX_FULL_C(1<<21, 0) > + ((uint16_t *)dest)[0] = B>>25 | ((G>>19) & (127 << 5)) | > + ((R>>14) & (63 << 11)); > + dest+= step; > + } > + break; > + case PIX_FMT_BGR565: > + YSCALE_YUV_2_RGBX_FULL_C(1<<21, 0) > + ((uint16_t *)dest)[0] = R>>25 | ((G>>19) & (127 << 5)) | > + ((B>>14) & (63 << 11)); > + dest+= step; > + } > + break; > + case PIX_FMT_BGR555: > + YSCALE_YUV_2_RGBX_FULL_C(1<<21, 0) > + ((uint16_t *)dest)[0] = R>>25 | ((G>>20) & (63 << 5)) | > + ((B>>15) & (63 << 10)); > + dest+= 2; > + } > + break; > + case PIX_FMT_RGB555: > + YSCALE_YUV_2_RGBX_FULL_C(1<<21, 0) > + ((uint16_t *)dest)[0] = B>>25 | ((G>>20) & (63 << 5)) | > + ((R>>15) & (63 << 10)); > + dest+= 2; > + } > + break;
missing dithering > + case PIX_FMT_RGB48: > + YSCALE_YUV_2_RGBX_FULL_C(1<<21, 0) > + ((uint16_t *)dest)[0] = R>>14; > + ((uint16_t *)dest)[1] = G>>14; > + ((uint16_t *)dest)[2] = B>>14; > + dest+= step; > + } > + break; > +#if HAVE_BIGENDIAN > + case PIX_FMT_RGB48LE: > +#else > + case PIX_FMT_RGB48BE: > +#endif a _NME (not machine endian) #define in pixfmts.h would simplify this also we might wish to implement such formats by bswaping the output in a seperate pass to reduce code bloat [...] ________________________________________________ FFmpeg issue tracker <[email protected]> <https://roundup.ffmpeg.org/issue2113> ________________________________________________
