diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-06-02 12:28:49 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-06-02 12:28:49 +0000 |
commit | e8417235d0e0a70d8a932edb68ab90f360aefc1a (patch) | |
tree | 2cf020909b1a72fbd6183df3c14a52623d1da9fc /libswscale/swscale_template.c | |
parent | b2984add8077ecc9d3cdf0d9294fb323f2001511 (diff) | |
download | ffmpeg-e8417235d0e0a70d8a932edb68ab90f360aefc1a.tar.gz |
Partial (low bits ignored, no direct transcoding into other RGB formats) support
for inputting RGB48BE/LE.
Originally committed as revision 29341 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale_template.c')
-rw-r--r-- | libswscale/swscale_template.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index 1bb0e1dbb6..05d10590b0 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -2235,6 +2235,9 @@ static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth, src += ALT32_CORR; } + if (srcFormat == PIX_FMT_RGB48LE) + src++; + if (internal_func) { internal_func(formatConvBuffer, src, srcW, pal); src= formatConvBuffer; @@ -2424,6 +2427,11 @@ inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth, src2 += ALT32_CORR; } + if (srcFormat==PIX_FMT_RGB48LE) { + src1++; + src2++; + } + if (c->hcscale_internal) { c->hcscale_internal(formatConvBuffer, formatConvBuffer+VOFW, src1, src2, srcW, pal); src1= formatConvBuffer; @@ -3047,6 +3055,8 @@ static void RENAME(sws_init_swScale)(SwsContext *c) } if (c->chrSrcHSubSample) { switch(srcFormat) { + case PIX_FMT_RGB48BE: + case PIX_FMT_RGB48LE: c->hcscale_internal = rgb48ToUV_half; break; case PIX_FMT_RGB32 : case PIX_FMT_RGB32_1: c->hcscale_internal = bgr32ToUV_half; break; case PIX_FMT_BGR24 : c->hcscale_internal = RENAME(bgr24ToUV_half); break; @@ -3060,6 +3070,8 @@ static void RENAME(sws_init_swScale)(SwsContext *c) } } else { switch(srcFormat) { + case PIX_FMT_RGB48BE: + case PIX_FMT_RGB48LE: c->hcscale_internal = rgb48ToUV; break; case PIX_FMT_RGB32 : case PIX_FMT_RGB32_1: c->hcscale_internal = bgr32ToUV; break; case PIX_FMT_BGR24 : c->hcscale_internal = RENAME(bgr24ToUV); break; @@ -3103,6 +3115,8 @@ static void RENAME(sws_init_swScale)(SwsContext *c) case PIX_FMT_RGB32_1: c->hyscale_internal = bgr32ToY; break; case PIX_FMT_BGR32 : case PIX_FMT_BGR32_1: c->hyscale_internal = rgb32ToY; break; + case PIX_FMT_RGB48BE: + case PIX_FMT_RGB48LE: c->hyscale_internal = rgb48ToY; break; } if (c->alpPixBuf) { switch (srcFormat) { |