Commit db3f8687 authored by James Zern's avatar James Zern

libvpxdec: cosmetics: reindent

Signed-off-by: 's avatarJames Zern <jzern@google.com>
parent e07ef1ad
...@@ -60,55 +60,56 @@ static av_cold int vpx_init(AVCodecContext *avctx, ...@@ -60,55 +60,56 @@ static av_cold int vpx_init(AVCodecContext *avctx,
} }
// returns 0 on success, AVERROR_INVALIDDATA otherwise // returns 0 on success, AVERROR_INVALIDDATA otherwise
static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img) { static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img)
{
if (avctx->codec_id == AV_CODEC_ID_VP8 && img->fmt != VPX_IMG_FMT_I420) if (avctx->codec_id == AV_CODEC_ID_VP8 && img->fmt != VPX_IMG_FMT_I420)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
switch (img->fmt) { switch (img->fmt) {
case VPX_IMG_FMT_I420: case VPX_IMG_FMT_I420:
avctx->pix_fmt = AV_PIX_FMT_YUV420P; avctx->pix_fmt = AV_PIX_FMT_YUV420P;
return 0; return 0;
#if CONFIG_LIBVPX_VP9_DECODER #if CONFIG_LIBVPX_VP9_DECODER
case VPX_IMG_FMT_I422: case VPX_IMG_FMT_I422:
avctx->pix_fmt = AV_PIX_FMT_YUV422P; avctx->pix_fmt = AV_PIX_FMT_YUV422P;
return 0;
case VPX_IMG_FMT_I444:
avctx->pix_fmt = AV_PIX_FMT_YUV444P;
return 0;
#ifdef VPX_IMG_FMT_HIGHBITDEPTH
case VPX_IMG_FMT_I42016:
if (img->bit_depth == 10) {
avctx->pix_fmt = AV_PIX_FMT_YUV420P10LE;
return 0; return 0;
case VPX_IMG_FMT_I444: } else if (img->bit_depth == 12) {
avctx->pix_fmt = AV_PIX_FMT_YUV444P; avctx->pix_fmt = AV_PIX_FMT_YUV420P12LE;
return 0; return 0;
#ifdef VPX_IMG_FMT_HIGHBITDEPTH } else {
case VPX_IMG_FMT_I42016: return AVERROR_INVALIDDATA;
if (img->bit_depth == 10) { }
avctx->pix_fmt = AV_PIX_FMT_YUV420P10LE; case VPX_IMG_FMT_I42216:
return 0; if (img->bit_depth == 10) {
} else if (img->bit_depth == 12) { avctx->pix_fmt = AV_PIX_FMT_YUV422P10LE;
avctx->pix_fmt = AV_PIX_FMT_YUV420P12LE; return 0;
return 0; } else if (img->bit_depth == 12) {
} else { avctx->pix_fmt = AV_PIX_FMT_YUV422P12LE;
return AVERROR_INVALIDDATA; return 0;
} } else {
case VPX_IMG_FMT_I42216: return AVERROR_INVALIDDATA;
if (img->bit_depth == 10) { }
avctx->pix_fmt = AV_PIX_FMT_YUV422P10LE; case VPX_IMG_FMT_I44416:
return 0; if (img->bit_depth == 10) {
} else if (img->bit_depth == 12) { avctx->pix_fmt = AV_PIX_FMT_YUV444P10LE;
avctx->pix_fmt = AV_PIX_FMT_YUV422P12LE; return 0;
return 0; } else if (img->bit_depth == 12) {
} else { avctx->pix_fmt = AV_PIX_FMT_YUV444P12LE;
return AVERROR_INVALIDDATA; return 0;
} } else {
case VPX_IMG_FMT_I44416: return AVERROR_INVALIDDATA;
if (img->bit_depth == 10) { }
avctx->pix_fmt = AV_PIX_FMT_YUV444P10LE;
return 0;
} else if (img->bit_depth == 12) {
avctx->pix_fmt = AV_PIX_FMT_YUV444P12LE;
return 0;
} else {
return AVERROR_INVALIDDATA;
}
#endif #endif
#endif #endif
default: default:
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
} }
......
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