Re: [FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-03 Thread Carl Eugen Hoyos
2016-09-03 15:18 GMT+02:00 Timo Rothenpieler : > On 9/3/2016 3:15 PM, Carl Eugen Hoyos wrote: >> 2016-09-03 14:54 GMT+02:00 Timo Rothenpieler : >> > +AV_WL16(&dstUV[2*x ], (t | (t << 8)) & 0xFFC0); Why is "& 0xFFC0" necessary? (Same below.) >>> >>> Because P010 e

Re: [FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-03 Thread Timo Rothenpieler
On 9/3/2016 3:15 PM, Carl Eugen Hoyos wrote: > 2016-09-03 14:54 GMT+02:00 Timo Rothenpieler : > +AV_WL16(&dstUV[2*x ], (t | (t << 8)) & 0xFFC0); >>> >>> Why is "& 0xFFC0" necessary? >>> (Same below.) >> >> Because P010 expects the 10 bits in the 10 most significant bit. >> I'

Re: [FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-03 Thread Carl Eugen Hoyos
2016-09-03 14:54 GMT+02:00 Timo Rothenpieler : >>> +AV_WL16(&dstUV[2*x ], (t | (t << 8)) & 0xFFC0); >> >> Why is "& 0xFFC0" necessary? >> (Same below.) > > Because P010 expects the 10 bits in the 10 most significant bit. > I'm not 100% sure if the other 6 bits are undefined or 0,

Re: [FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-03 Thread Timo Rothenpieler
On 9/3/2016 1:46 PM, Carl Eugen Hoyos wrote: > Hi! > > 2016-09-02 16:36 GMT+02:00 Timo Rothenpieler : > >> +AV_WL16(&dstUV[2*x ], (t | (t << 8)) & 0xFFC0); > > Why is "& 0xFFC0" necessary? > (Same below.) Because P010 expects the 10 bits in the 10 most significant bit. I'm not

Re: [FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-03 Thread Timo Rothenpieler
On 9/3/2016 1:47 PM, Carl Eugen Hoyos wrote: > 2016-09-03 0:06 GMT+02:00 Timo Rothenpieler : >> On 9/2/2016 7:16 PM, Carl Eugen Hoyos wrote: >>> 2016-09-02 16:36 GMT+02:00 Timo Rothenpieler : >>> +#if AV_HAVE_BIGENDIAN +static int planar8ToP010leWrapper(SwsContext *c, const uint8_t *src[]

Re: [FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-03 Thread Carl Eugen Hoyos
Hi! 2016-09-02 16:36 GMT+02:00 Timo Rothenpieler : > +AV_WL16(&dstUV[2*x ], (t | (t << 8)) & 0xFFC0); Why is "& 0xFFC0" necessary? (Same below.) Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailma

Re: [FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-03 Thread Carl Eugen Hoyos
2016-09-03 0:06 GMT+02:00 Timo Rothenpieler : > On 9/2/2016 7:16 PM, Carl Eugen Hoyos wrote: >> 2016-09-02 16:36 GMT+02:00 Timo Rothenpieler : >> >>> +#if AV_HAVE_BIGENDIAN >>> +static int planar8ToP010leWrapper(SwsContext *c, const uint8_t *src[], >> >> Why does this function not work on both big

Re: [FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-02 Thread Timo Rothenpieler
On 9/2/2016 7:16 PM, Carl Eugen Hoyos wrote: > 2016-09-02 16:36 GMT+02:00 Timo Rothenpieler : > >> +#if AV_HAVE_BIGENDIAN >> +static int planar8ToP010leWrapper(SwsContext *c, const uint8_t *src[], > > Why does this function not work on both big and little endian hardware? It does, but it's signi

Re: [FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-02 Thread Carl Eugen Hoyos
2016-09-02 16:36 GMT+02:00 Timo Rothenpieler : > +#if AV_HAVE_BIGENDIAN > +static int planar8ToP010leWrapper(SwsContext *c, const uint8_t *src[], Why does this function not work on both big and little endian hardware? Carl Eugen ___ ffmpeg-devel mailin

[FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010

2016-09-02 Thread Timo Rothenpieler
--- libswscale/swscale_unscaled.c| 83 tests/ref/fate/filter-pixdesc-p010le | 2 +- tests/ref/fate/filter-pixfmts-copy | 2 +- tests/ref/fate/filter-pixfmts-crop | 2 +- tests/ref/fate/filter-pixfmts-field | 2 +- tests/ref/fate/filter-pixfmts-