Commit de8e096c authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Diego Biurrun

swscale: Consistently order input YUV pixel formats

Follow a 420, 422, 444 order instead of a random one.
This simplifies double-checking additions of new formats.
Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
parent 70de2ea4
......@@ -809,42 +809,42 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
c->readChrPlanar = planar_rgb_to_uv;
break;
#if HAVE_BIGENDIAN
case AV_PIX_FMT_YUV444P9LE:
case AV_PIX_FMT_YUV422P9LE:
case AV_PIX_FMT_YUV420P9LE:
case AV_PIX_FMT_YUV422P9LE:
case AV_PIX_FMT_YUV444P9LE:
case AV_PIX_FMT_YUV420P10LE:
case AV_PIX_FMT_YUV422P10LE:
case AV_PIX_FMT_YUV444P10LE:
case AV_PIX_FMT_YUV420P10LE:
case AV_PIX_FMT_YUV420P16LE:
case AV_PIX_FMT_YUV422P16LE:
case AV_PIX_FMT_YUV444P16LE:
case AV_PIX_FMT_YUVA444P9LE:
case AV_PIX_FMT_YUVA422P9LE:
case AV_PIX_FMT_YUVA420P9LE:
case AV_PIX_FMT_YUVA422P9LE:
case AV_PIX_FMT_YUVA444P9LE:
case AV_PIX_FMT_YUVA420P10LE:
case AV_PIX_FMT_YUVA422P10LE:
case AV_PIX_FMT_YUVA444P10LE:
case AV_PIX_FMT_YUVA420P10LE:
case AV_PIX_FMT_YUVA420P16LE:
case AV_PIX_FMT_YUVA422P16LE:
case AV_PIX_FMT_YUVA444P16LE:
c->chrToYV12 = bswap16UV_c;
break;
#else
case AV_PIX_FMT_YUV444P9BE:
case AV_PIX_FMT_YUV422P9BE:
case AV_PIX_FMT_YUV420P9BE:
case AV_PIX_FMT_YUV444P10BE:
case AV_PIX_FMT_YUV422P10BE:
case AV_PIX_FMT_YUV422P9BE:
case AV_PIX_FMT_YUV444P9BE:
case AV_PIX_FMT_YUV420P10BE:
case AV_PIX_FMT_YUV422P10BE:
case AV_PIX_FMT_YUV444P10BE:
case AV_PIX_FMT_YUV420P16BE:
case AV_PIX_FMT_YUV422P16BE:
case AV_PIX_FMT_YUV444P16BE:
case AV_PIX_FMT_YUVA444P9BE:
case AV_PIX_FMT_YUVA422P9BE:
case AV_PIX_FMT_YUVA420P9BE:
case AV_PIX_FMT_YUVA422P9BE:
case AV_PIX_FMT_YUVA444P9BE:
case AV_PIX_FMT_YUVA420P10BE:
case AV_PIX_FMT_YUVA422P10BE:
case AV_PIX_FMT_YUVA444P10BE:
case AV_PIX_FMT_YUVA420P10BE:
case AV_PIX_FMT_YUVA420P16BE:
case AV_PIX_FMT_YUVA422P16BE:
case AV_PIX_FMT_YUVA444P16BE:
......@@ -1027,24 +1027,24 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
c->readLumPlanar = planar_rgb_to_y;
break;
#if HAVE_BIGENDIAN
case AV_PIX_FMT_YUV444P9LE:
case AV_PIX_FMT_YUV422P9LE:
case AV_PIX_FMT_YUV420P9LE:
case AV_PIX_FMT_YUV444P10LE:
case AV_PIX_FMT_YUV422P10LE:
case AV_PIX_FMT_YUV422P9LE:
case AV_PIX_FMT_YUV444P9LE:
case AV_PIX_FMT_YUV420P10LE:
case AV_PIX_FMT_YUV422P10LE:
case AV_PIX_FMT_YUV444P10LE:
case AV_PIX_FMT_YUV420P16LE:
case AV_PIX_FMT_YUV422P16LE:
case AV_PIX_FMT_YUV444P16LE:
case AV_PIX_FMT_GRAY16LE:
c->lumToYV12 = bswap16Y_c;
break;
case AV_PIX_FMT_YUVA444P9LE:
case AV_PIX_FMT_YUVA422P9LE:
case AV_PIX_FMT_YUVA420P9LE:
case AV_PIX_FMT_YUVA444P10LE:
case AV_PIX_FMT_YUVA422P10LE:
case AV_PIX_FMT_YUVA422P9LE:
case AV_PIX_FMT_YUVA444P9LE:
case AV_PIX_FMT_YUVA420P10LE:
case AV_PIX_FMT_YUVA422P10LE:
case AV_PIX_FMT_YUVA444P10LE:
case AV_PIX_FMT_YUVA420P16LE:
case AV_PIX_FMT_YUVA422P16LE:
case AV_PIX_FMT_YUVA444P16LE:
......@@ -1052,24 +1052,24 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
c->alpToYV12 = bswap16Y_c;
break;
#else
case AV_PIX_FMT_YUV444P9BE:
case AV_PIX_FMT_YUV422P9BE:
case AV_PIX_FMT_YUV420P9BE:
case AV_PIX_FMT_YUV444P10BE:
case AV_PIX_FMT_YUV422P10BE:
case AV_PIX_FMT_YUV422P9BE:
case AV_PIX_FMT_YUV444P9BE:
case AV_PIX_FMT_YUV420P10BE:
case AV_PIX_FMT_YUV422P10BE:
case AV_PIX_FMT_YUV444P10BE:
case AV_PIX_FMT_YUV420P16BE:
case AV_PIX_FMT_YUV422P16BE:
case AV_PIX_FMT_YUV444P16BE:
case AV_PIX_FMT_GRAY16BE:
c->lumToYV12 = bswap16Y_c;
break;
case AV_PIX_FMT_YUVA444P9BE:
case AV_PIX_FMT_YUVA422P9BE:
case AV_PIX_FMT_YUVA420P9BE:
case AV_PIX_FMT_YUVA444P10BE:
case AV_PIX_FMT_YUVA422P10BE:
case AV_PIX_FMT_YUVA422P9BE:
case AV_PIX_FMT_YUVA444P9BE:
case AV_PIX_FMT_YUVA420P10BE:
case AV_PIX_FMT_YUVA422P10BE:
case AV_PIX_FMT_YUVA444P10BE:
case AV_PIX_FMT_YUVA420P16BE:
case AV_PIX_FMT_YUVA422P16BE:
case AV_PIX_FMT_YUVA444P16BE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment