On 4/12/18, Rostislav Pehlivanov <atomnu...@gmail.com> wrote: > On 12 April 2018 at 11:31, Paul B Mahol <one...@gmail.com> wrote: > >> Signed-off-by: Paul B Mahol <one...@gmail.com> >> --- >> libavcodec/dxv.c | 1006 ++++++++++++++++++++++++++++++ >> ++++++++++++++++++++++-- >> 1 file changed, 978 insertions(+), 28 deletions(-) >> >> >> + >> +static av_always_inline uint32_t yacocg2rgba(int yo, int co, int cg, int >> a) >> +{ >> + int r, g, b; >> + >> + co = co - 127; >> + cg = cg - 127; >> + >> + r = av_clip_uint8(yo + co - cg); >> + g = av_clip_uint8(yo + cg); >> + b = av_clip_uint8(yo - co - cg); >> + >> + return (a << 24) | (b << 16) | (g << 8) | (r); >> +} > > > Cinepak all over again? We're not doing and are never going to do > conversion inside decoders. Output it as YCoCg by writing directly to the > data planes. We support it. It doesn't matter if it's perfectly mappable to > RGB, if you allow for 2 more bits of precision.
This is subsampled YCgCo, which is never going to be implemented in libswscale. And there is already code in texturedsp which deals with this, but it is for non-subsampled case. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel