summaryrefslogtreecommitdiff
path: root/libavcodec/libvpxdec.c
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2015-04-22 14:16:39 -0700
committerJames Zern <jzern@google.com>2015-04-24 00:00:20 -0700
commitdb3f86871eb107242c381f106d083022d1adb005 (patch)
tree3bfa6f81e43b3a430e819a18069ce35bda11ad4d /libavcodec/libvpxdec.c
parente07ef1ada3d8a0dff5f4064a234544e1b0e3cd94 (diff)
libvpxdec: cosmetics: reindent
Signed-off-by: James Zern <jzern@google.com>
Diffstat (limited to 'libavcodec/libvpxdec.c')
-rw-r--r--libavcodec/libvpxdec.c83
1 files changed, 42 insertions, 41 deletions
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 7faef3a7a6..75231f8be7 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -60,55 +60,56 @@ static av_cold int vpx_init(AVCodecContext *avctx,
}
// 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)
return AVERROR_INVALIDDATA;
switch (img->fmt) {
- case VPX_IMG_FMT_I420:
- avctx->pix_fmt = AV_PIX_FMT_YUV420P;
- return 0;
+ case VPX_IMG_FMT_I420:
+ avctx->pix_fmt = AV_PIX_FMT_YUV420P;
+ return 0;
#if CONFIG_LIBVPX_VP9_DECODER
- case VPX_IMG_FMT_I422:
- avctx->pix_fmt = AV_PIX_FMT_YUV422P;
+ case VPX_IMG_FMT_I422:
+ 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;
- case VPX_IMG_FMT_I444:
- avctx->pix_fmt = AV_PIX_FMT_YUV444P;
+ } else if (img->bit_depth == 12) {
+ avctx->pix_fmt = AV_PIX_FMT_YUV420P12LE;
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;
- } else if (img->bit_depth == 12) {
- avctx->pix_fmt = AV_PIX_FMT_YUV420P12LE;
- return 0;
- } else {
- return AVERROR_INVALIDDATA;
- }
- case VPX_IMG_FMT_I42216:
- if (img->bit_depth == 10) {
- avctx->pix_fmt = AV_PIX_FMT_YUV422P10LE;
- return 0;
- } else if (img->bit_depth == 12) {
- avctx->pix_fmt = AV_PIX_FMT_YUV422P12LE;
- return 0;
- } else {
- return AVERROR_INVALIDDATA;
- }
- case VPX_IMG_FMT_I44416:
- 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;
- }
+ } else {
+ return AVERROR_INVALIDDATA;
+ }
+ case VPX_IMG_FMT_I42216:
+ if (img->bit_depth == 10) {
+ avctx->pix_fmt = AV_PIX_FMT_YUV422P10LE;
+ return 0;
+ } else if (img->bit_depth == 12) {
+ avctx->pix_fmt = AV_PIX_FMT_YUV422P12LE;
+ return 0;
+ } else {
+ return AVERROR_INVALIDDATA;
+ }
+ case VPX_IMG_FMT_I44416:
+ 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
- default:
- return AVERROR_INVALIDDATA;
+ default:
+ return AVERROR_INVALIDDATA;
}
}