diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-10-06 12:10:34 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-10-08 07:13:26 +0200 |
commit | 716d413c13981da15323c7a3821860536eefdbbb (patch) | |
tree | b15ebcded50b8edaa5b9fc8f261774043138e1fa /libswscale/yuv2rgb.c | |
parent | 78071a1420b425dfb787ac739048f523007b8139 (diff) | |
download | ffmpeg-716d413c13981da15323c7a3821860536eefdbbb.tar.gz |
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Diffstat (limited to 'libswscale/yuv2rgb.c')
-rw-r--r-- | libswscale/yuv2rgb.c | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index f1ce4aaef4..1dbd0d8e10 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -124,7 +124,7 @@ const int *sws_getCoefficients(int colorspace) { \ int y; \ \ - if (!alpha && c->srcFormat == PIX_FMT_YUV422P) { \ + if (!alpha && c->srcFormat == AV_PIX_FMT_YUV422P) { \ srcStride[1] *= 2; \ srcStride[2] *= 2; \ } \ @@ -582,44 +582,44 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c) sws_format_name(c->srcFormat), sws_format_name(c->dstFormat)); switch (c->dstFormat) { - case PIX_FMT_BGR48BE: - case PIX_FMT_BGR48LE: + case AV_PIX_FMT_BGR48BE: + case AV_PIX_FMT_BGR48LE: return yuv2rgb_c_bgr48; - case PIX_FMT_RGB48BE: - case PIX_FMT_RGB48LE: + case AV_PIX_FMT_RGB48BE: + case AV_PIX_FMT_RGB48LE: return yuv2rgb_c_48; - case PIX_FMT_ARGB: - case PIX_FMT_ABGR: - if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) + case AV_PIX_FMT_ARGB: + case AV_PIX_FMT_ABGR: + if (CONFIG_SWSCALE_ALPHA && c->srcFormat == AV_PIX_FMT_YUVA420P) return yuva2argb_c; - case PIX_FMT_RGBA: - case PIX_FMT_BGRA: - if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) + case AV_PIX_FMT_RGBA: + case AV_PIX_FMT_BGRA: + if (CONFIG_SWSCALE_ALPHA && c->srcFormat == AV_PIX_FMT_YUVA420P) return yuva2rgba_c; else return yuv2rgb_c_32; - case PIX_FMT_RGB24: + case AV_PIX_FMT_RGB24: return yuv2rgb_c_24_rgb; - case PIX_FMT_BGR24: + case AV_PIX_FMT_BGR24: return yuv2rgb_c_24_bgr; - case PIX_FMT_RGB565: - case PIX_FMT_BGR565: - case PIX_FMT_RGB555: - case PIX_FMT_BGR555: + case AV_PIX_FMT_RGB565: + case AV_PIX_FMT_BGR565: + case AV_PIX_FMT_RGB555: + case AV_PIX_FMT_BGR555: return yuv2rgb_c_16; - case PIX_FMT_RGB444: - case PIX_FMT_BGR444: + case AV_PIX_FMT_RGB444: + case AV_PIX_FMT_BGR444: return yuv2rgb_c_12_ordered_dither; - case PIX_FMT_RGB8: - case PIX_FMT_BGR8: + case AV_PIX_FMT_RGB8: + case AV_PIX_FMT_BGR8: return yuv2rgb_c_8_ordered_dither; - case PIX_FMT_RGB4: - case PIX_FMT_BGR4: + case AV_PIX_FMT_RGB4: + case AV_PIX_FMT_BGR4: return yuv2rgb_c_4_ordered_dither; - case PIX_FMT_RGB4_BYTE: - case PIX_FMT_BGR4_BYTE: + case AV_PIX_FMT_RGB4_BYTE: + case AV_PIX_FMT_BGR4_BYTE: return yuv2rgb_c_4b_ordered_dither; - case PIX_FMT_MONOBLACK: + case AV_PIX_FMT_MONOBLACK: return yuv2rgb_c_1_ordered_dither; default: assert(0); @@ -670,25 +670,25 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation) { - const int isRgb = c->dstFormat == PIX_FMT_RGB32 || - c->dstFormat == PIX_FMT_RGB32_1 || - c->dstFormat == PIX_FMT_BGR24 || - c->dstFormat == PIX_FMT_RGB565BE || - c->dstFormat == PIX_FMT_RGB565LE || - c->dstFormat == PIX_FMT_RGB555BE || - c->dstFormat == PIX_FMT_RGB555LE || - c->dstFormat == PIX_FMT_RGB444BE || - c->dstFormat == PIX_FMT_RGB444LE || - c->dstFormat == PIX_FMT_RGB8 || - c->dstFormat == PIX_FMT_RGB4 || - c->dstFormat == PIX_FMT_RGB4_BYTE || - c->dstFormat == PIX_FMT_MONOBLACK; - const int isNotNe = c->dstFormat == PIX_FMT_NE(RGB565LE, RGB565BE) || - c->dstFormat == PIX_FMT_NE(RGB555LE, RGB555BE) || - c->dstFormat == PIX_FMT_NE(RGB444LE, RGB444BE) || - c->dstFormat == PIX_FMT_NE(BGR565LE, BGR565BE) || - c->dstFormat == PIX_FMT_NE(BGR555LE, BGR555BE) || - c->dstFormat == PIX_FMT_NE(BGR444LE, BGR444BE); + const int isRgb = c->dstFormat == AV_PIX_FMT_RGB32 || + c->dstFormat == AV_PIX_FMT_RGB32_1 || + c->dstFormat == AV_PIX_FMT_BGR24 || + c->dstFormat == AV_PIX_FMT_RGB565BE || + c->dstFormat == AV_PIX_FMT_RGB565LE || + c->dstFormat == AV_PIX_FMT_RGB555BE || + c->dstFormat == AV_PIX_FMT_RGB555LE || + c->dstFormat == AV_PIX_FMT_RGB444BE || + c->dstFormat == AV_PIX_FMT_RGB444LE || + c->dstFormat == AV_PIX_FMT_RGB8 || + c->dstFormat == AV_PIX_FMT_RGB4 || + c->dstFormat == AV_PIX_FMT_RGB4_BYTE || + c->dstFormat == AV_PIX_FMT_MONOBLACK; + const int isNotNe = c->dstFormat == AV_PIX_FMT_NE(RGB565LE, RGB565BE) || + c->dstFormat == AV_PIX_FMT_NE(RGB555LE, RGB555BE) || + c->dstFormat == AV_PIX_FMT_NE(RGB444LE, RGB444BE) || + c->dstFormat == AV_PIX_FMT_NE(BGR565LE, BGR565BE) || + c->dstFormat == AV_PIX_FMT_NE(BGR555LE, BGR555BE) || + c->dstFormat == AV_PIX_FMT_NE(BGR444LE, BGR444BE); const int bpp = c->dstFormatBpp; uint8_t *y_table; uint16_t *y_table16; @@ -856,8 +856,8 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], fill_gv_table(c->table_gV, 1, cgv); break; case 32: - base = (c->dstFormat == PIX_FMT_RGB32_1 || - c->dstFormat == PIX_FMT_BGR32_1) ? 8 : 0; + base = (c->dstFormat == AV_PIX_FMT_RGB32_1 || + c->dstFormat == AV_PIX_FMT_BGR32_1) ? 8 : 0; rbase = base + (isRgb ? 16 : 0); gbase = base + 8; bbase = base + (isRgb ? 0 : 16); |