On Sun, 12 Jun 2011 21:53:22 -0400, "Ronald S. Bultje" <[email protected]> wrote: > From: Michael Niedermayer <[email protected]> > > YUV planes were marked as uint16_t, but they contained signed data. > Fixes issue 1108 and 675. > > Signed-off-by: Ronald S. Bultje <[email protected]> > --- > libswscale/swscale.c | 10 ++++---- > libswscale/swscale_internal.h | 4 +- > tests/ref/lavf/pixfmt | 42 > +++++++++++++++++++------------------- > tests/ref/lavfi/pixdesc_be | 4 +- > tests/ref/lavfi/pixdesc_le | 4 +- > tests/ref/lavfi/pixfmts_copy_le | 4 +- > tests/ref/lavfi/pixfmts_hflip_le | 4 +- > tests/ref/lavfi/pixfmts_null_le | 4 +- > tests/ref/lavfi/pixfmts_pad_le | 4 +- > tests/ref/lavfi/pixfmts_scale_le | 4 +- > tests/ref/lavfi/pixfmts_vflip_le | 4 +- > 11 files changed, 44 insertions(+), 44 deletions(-) > > diff --git a/libswscale/swscale.c b/libswscale/swscale.c > index ba89a0f..a09dba0 100644 > --- a/libswscale/swscale.c > +++ b/libswscale/swscale.c > @@ -1701,7 +1701,7 @@ static void hScale_c(int16_t *dst, int dstW, const > uint8_t *src, > > //FIXME all pal and rgb srcFormats could do this convertion as well > //FIXME all scalers more complex than bilinear could do half of this > transform > -static void chrRangeToJpeg_c(uint16_t *dstU, uint16_t *dstV, int width) > +static void chrRangeToJpeg_c(int16_t *dstU, int16_t *dstV, int width) > { > int i; > for (i = 0; i < width; i++) { > @@ -1709,7 +1709,7 @@ static void chrRangeToJpeg_c(uint16_t *dstU, uint16_t > *dstV, int width) > dstV[i] = (FFMIN(dstV[i],30775)*4663 - 9289992)>>12; //-264 > } > } > -static void chrRangeFromJpeg_c(uint16_t *dstU, uint16_t *dstV, int width) > +static void chrRangeFromJpeg_c(int16_t *dstU, int16_t *dstV, int width) > { > int i; > for (i = 0; i < width; i++) { > @@ -1717,13 +1717,13 @@ static void chrRangeFromJpeg_c(uint16_t *dstU, > uint16_t *dstV, int width) > dstV[i] = (dstV[i]*1799 + 4081085)>>11; //1469 > } > } > -static void lumRangeToJpeg_c(uint16_t *dst, int width) > +static void lumRangeToJpeg_c(int16_t *dst, int width) > { > int i; > for (i = 0; i < width; i++) > dst[i] = (FFMIN(dst[i],30189)*19077 - 39057361)>>14; > } > -static void lumRangeFromJpeg_c(uint16_t *dst, int width) > +static void lumRangeFromJpeg_c(int16_t *dst, int width) > { > int i; > for (i = 0; i < width; i++) > @@ -1752,7 +1752,7 @@ static av_always_inline void hyscale(SwsContext *c, > uint16_t *dst, int dstWidth, > uint32_t *pal, int isAlpha) > { > void (*toYV12)(uint8_t *, const uint8_t *, int, uint32_t *) = isAlpha ? > c->alpToYV12 : c->lumToYV12; > - void (*convertRange)(uint16_t *, int) = isAlpha ? NULL : > c->lumConvertRange; > + void (*convertRange)(int16_t *, int) = isAlpha ? NULL : > c->lumConvertRange; > > if (toYV12) { > toYV12(formatConvBuffer, src, srcW, pal); > diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h > index 483842e..ea34d8c 100644 > --- a/libswscale/swscale_internal.h > +++ b/libswscale/swscale_internal.h > @@ -310,8 +310,8 @@ typedef struct SwsContext { > int xInc, const int16_t *filter, const int16_t *filterPos, > int filterSize); > > - void (*lumConvertRange)(uint16_t *dst, int width); ///< Color range > conversion function for luma plane if needed. > - void (*chrConvertRange)(uint16_t *dst1, uint16_t *dst2, int width); ///< > Color range conversion function for chroma planes if needed. > + void (*lumConvertRange)(int16_t *dst, int width); ///< Color range > conversion function for luma plane if needed. > + void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width); ///< > Color range conversion function for chroma planes if needed. > > int needs_hcscale; ///< Set if there are chroma planes to be converted. > > diff --git a/tests/ref/lavf/pixfmt b/tests/ref/lavf/pixfmt > index d03abff..b4c1d0e 100644 > --- a/tests/ref/lavf/pixfmt > +++ b/tests/ref/lavf/pixfmt > @@ -1,38 +1,38 @@ > 5641dba168ff665af1cdb4a91e1afdd6 *./tests/data/pixfmt/yuv420p.yuv > -304128 ./tests/data/pixfmt/yuv420p.yuv > + 304128 ./tests/data/pixfmt/yuv420p.yuv > ac68f9fdd9d55efd0306d9b004038761 *./tests/data/pixfmt/yuv422p.yuv > -304128 ./tests/data/pixfmt/yuv422p.yuv > + 304128 ./tests/data/pixfmt/yuv422p.yuv > 5641dba168ff665af1cdb4a91e1afdd6 *./tests/data/pixfmt/yuv444p.yuv > -304128 ./tests/data/pixfmt/yuv444p.yuv > + 304128 ./tests/data/pixfmt/yuv444p.yuv > ac68f9fdd9d55efd0306d9b004038761 *./tests/data/pixfmt/yuyv422.yuv > -304128 ./tests/data/pixfmt/yuyv422.yuv > + 304128 ./tests/data/pixfmt/yuyv422.yuv > 507c7e9f0c97660385df977469ca9e6d *./tests/data/pixfmt/yuv410p.yuv > -304128 ./tests/data/pixfmt/yuv410p.yuv > + 304128 ./tests/data/pixfmt/yuv410p.yuv > 8594ea0b8d7c2c964525b0801b5351de *./tests/data/pixfmt/yuv411p.yuv > -304128 ./tests/data/pixfmt/yuv411p.yuv > -66673539adf8cda28e3b76068d3aae61 *./tests/data/pixfmt/yuvj420p.yuv > -304128 ./tests/data/pixfmt/yuvj420p.yuv > -572bf387dd1e3f073cbfd082e055ca81 *./tests/data/pixfmt/yuvj422p.yuv > -304128 ./tests/data/pixfmt/yuvj422p.yuv > + 304128 ./tests/data/pixfmt/yuv411p.yuv > +e176bd14185788110e055f945de7f95f *./tests/data/pixfmt/yuvj420p.yuv > + 304128 ./tests/data/pixfmt/yuvj420p.yuv > +472028e46a81c98d9b2477507def4723 *./tests/data/pixfmt/yuvj422p.yuv > + 304128 ./tests/data/pixfmt/yuvj422p.yuv > c10442da177c9f1d12be3c53be6fa12c *./tests/data/pixfmt/yuvj444p.yuv > -304128 ./tests/data/pixfmt/yuvj444p.yuv > + 304128 ./tests/data/pixfmt/yuvj444p.yuv > c6e0f9b5817f484b175c1ec4ffb4e9c9 *./tests/data/pixfmt/rgb24.yuv > -304128 ./tests/data/pixfmt/rgb24.yuv > + 304128 ./tests/data/pixfmt/rgb24.yuv > c6e0f9b5817f484b175c1ec4ffb4e9c9 *./tests/data/pixfmt/bgr24.yuv > -304128 ./tests/data/pixfmt/bgr24.yuv > + 304128 ./tests/data/pixfmt/bgr24.yuv > c6e0f9b5817f484b175c1ec4ffb4e9c9 *./tests/data/pixfmt/rgb32.yuv > -304128 ./tests/data/pixfmt/rgb32.yuv > + 304128 ./tests/data/pixfmt/rgb32.yuv > 66d39d464bd89ded2a124897f0a75ade *./tests/data/pixfmt/rgb565.yuv > -304128 ./tests/data/pixfmt/rgb565.yuv > + 304128 ./tests/data/pixfmt/rgb565.yuv > c894c3bd8d2631ed1964500b90a0c350 *./tests/data/pixfmt/rgb555.yuv > -304128 ./tests/data/pixfmt/rgb555.yuv > + 304128 ./tests/data/pixfmt/rgb555.yuv > 6be306b0cce5f8e6c271ea17fef9745b *./tests/data/pixfmt/gray.yuv > -304128 ./tests/data/pixfmt/gray.yuv > + 304128 ./tests/data/pixfmt/gray.yuv > 31398104d2349dd48328a6862bc6711f *./tests/data/pixfmt/monow.yuv > -304128 ./tests/data/pixfmt/monow.yuv > + 304128 ./tests/data/pixfmt/monow.yuv > 31398104d2349dd48328a6862bc6711f *./tests/data/pixfmt/monob.yuv > -304128 ./tests/data/pixfmt/monob.yuv > + 304128 ./tests/data/pixfmt/monob.yuv > 00b85790df5740bab95e2559d81603a7 *./tests/data/pixfmt/yuv440p.yuv > -304128 ./tests/data/pixfmt/yuv440p.yuv > + 304128 ./tests/data/pixfmt/yuv440p.yuv > 4d8d402c45d913038d4b725396719111 *./tests/data/pixfmt/yuvj440p.yuv > -304128 ./tests/data/pixfmt/yuvj440p.yuv > + 304128 ./tests/data/pixfmt/yuvj440p.yuv
Unrelated reindents! -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
