diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-05-13 10:28:49 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-05-13 16:46:24 -0400 |
commit | 9f54e461fecec7a97ec1b97ae4468135ea770609 (patch) | |
tree | 4619f5fde401c9be959f4ac44b625ef45ebbe6e0 /libswscale/swscale.c | |
parent | c3d68ec9c5fc8b86de2bf3757d353e6ff4ce0815 (diff) | |
download | ffmpeg-9f54e461fecec7a97ec1b97ae4468135ea770609.tar.gz |
swscale: properly inline bits/endianness in yuv2yuvX16inC().
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r-- | libswscale/swscale.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 4394a7d9ea..f5c4e88688 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -271,6 +271,27 @@ static av_always_inline void yuv2yuvX16inC_template(const int16_t *lumFilter, co } } +#define yuv2NBPS(bits, BE_LE, is_be) \ +static void yuv2yuvX ## bits ## BE_LE ## _c(const int16_t *lumFilter, \ + const int16_t **lumSrc, int lumFilterSize, \ + const int16_t *chrFilter, const int16_t **chrSrc, \ + int chrFilterSize, const int16_t **alpSrc, \ + uint16_t *dest, uint16_t *uDest, uint16_t *vDest, \ + uint16_t *aDest, int dstW, int chrDstW) \ +{ \ + yuv2yuvX16inC_template(lumFilter, lumSrc, lumFilterSize, \ + chrFilter, chrSrc, chrFilterSize, \ + alpSrc, \ + dest, uDest, vDest, aDest, \ + dstW, chrDstW, is_be, bits); \ +} +yuv2NBPS( 9, BE, 1); +yuv2NBPS( 9, LE, 0); +yuv2NBPS(10, BE, 1); +yuv2NBPS(10, LE, 0); +yuv2NBPS(16, BE, 1); +yuv2NBPS(16, LE, 0); + static inline void yuv2yuvX16inC(const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize, const int16_t **alpSrc, uint16_t *dest, uint16_t *uDest, uint16_t *vDest, uint16_t *aDest, int dstW, int chrDstW, @@ -278,17 +299,17 @@ static inline void yuv2yuvX16inC(const int16_t *lumFilter, const int16_t **lumSr { #define conv16(bits) \ if (isBE(dstFormat)) { \ - yuv2yuvX16inC_template(lumFilter, lumSrc, lumFilterSize, \ + yuv2yuvX ## bits ## BE_c(lumFilter, lumSrc, lumFilterSize, \ chrFilter, chrSrc, chrFilterSize, \ alpSrc, \ dest, uDest, vDest, aDest, \ - dstW, chrDstW, 1, bits); \ + dstW, chrDstW); \ } else { \ - yuv2yuvX16inC_template(lumFilter, lumSrc, lumFilterSize, \ + yuv2yuvX ## bits ## LE_c(lumFilter, lumSrc, lumFilterSize, \ chrFilter, chrSrc, chrFilterSize, \ alpSrc, \ dest, uDest, vDest, aDest, \ - dstW, chrDstW, 0, bits); \ + dstW, chrDstW); \ } if (is16BPS(dstFormat)) { conv16(16); |