[FFmpeg-devel] [PATCH 2/2] sws/yuv2rgb: clarify precision of coeff and offset for mmx code
It makes easier looking at the difference with the generic code just below. --- libswscale/yuv2rgb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 9d79d79..62abb7d 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -817,12 +817,12 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], c->uOffset = 0x0400040004000400LL; c->vOffset = 0x0400040004000400LL; -c->yCoeff = roundToInt16(cy * 8192) * 0x0001000100010001ULL; -c->vrCoeff = roundToInt16(crv * 8192) * 0x0001000100010001ULL; -c->ubCoeff = roundToInt16(cbu * 8192) * 0x0001000100010001ULL; -c->vgCoeff = roundToInt16(cgv * 8192) * 0x0001000100010001ULL; -c->ugCoeff = roundToInt16(cgu * 8192) * 0x0001000100010001ULL; -c->yOffset = roundToInt16(oy *8) * 0x0001000100010001ULL; +c->yCoeff = roundToInt16(cy * (1 << 13)) * 0x0001000100010001ULL; +c->vrCoeff = roundToInt16(crv * (1 << 13)) * 0x0001000100010001ULL; +c->ubCoeff = roundToInt16(cbu * (1 << 13)) * 0x0001000100010001ULL; +c->vgCoeff = roundToInt16(cgv * (1 << 13)) * 0x0001000100010001ULL; +c->ugCoeff = roundToInt16(cgu * (1 << 13)) * 0x0001000100010001ULL; +c->yOffset = roundToInt16(oy * (1 << 3)) * 0x0001000100010001ULL; c->yuv2rgb_y_coeff = (int16_t)roundToInt16(cy * (1 << 13)); c->yuv2rgb_y_offset = (int16_t)roundToInt16(oy * (1 << 9)); -- 2.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] sws/yuv2rgb: clarify precision of coeff and offset for mmx code
On Fri, Feb 26, 2016 at 10:34:46PM +0100, Clément Bœsch wrote: > It makes easier looking at the difference with the generic code just > below. > --- > libswscale/yuv2rgb.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] sws/yuv2rgb: clarify precision of coeff and offset for mmx code
On Sat, Feb 27, 2016 at 01:06:08AM +0100, Michael Niedermayer wrote: > On Fri, Feb 26, 2016 at 10:34:46PM +0100, Clément Bœsch wrote: > > It makes easier looking at the difference with the generic code just > > below. > > --- > > libswscale/yuv2rgb.c | 12 ++-- > > 1 file changed, 6 insertions(+), 6 deletions(-) > > LGTM > > thx > pushed -- Clément B. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel