Commit 796da4f3 authored by Jun Zhao's avatar Jun Zhao

lavc/libxavs2: Cosmetics: Fix indentation for switch statement

Cosmetics: Fix indentation for switch statement like the Linux
kerenl style.
Signed-off-by: 's avatarJun Zhao <mypopydev@gmail.com>
parent 807b57a3
...@@ -161,7 +161,7 @@ static void xavs2_copy_frame(xavs2_picture_t *pic, const AVFrame *frame) ...@@ -161,7 +161,7 @@ static void xavs2_copy_frame(xavs2_picture_t *pic, const AVFrame *frame)
} }
static int xavs2_encode_frame(AVCodecContext *avctx, AVPacket *pkt, static int xavs2_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *frame, int *got_packet) const AVFrame *frame, int *got_packet)
{ {
XAVS2EContext *cae = avctx->priv_data; XAVS2EContext *cae = avctx->priv_data;
xavs2_picture_t pic; xavs2_picture_t pic;
...@@ -175,22 +175,22 @@ static int xavs2_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -175,22 +175,22 @@ static int xavs2_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
} }
if (frame) { if (frame) {
switch (frame->format) { switch (frame->format) {
case AV_PIX_FMT_YUV420P: case AV_PIX_FMT_YUV420P:
if (pic.img.in_sample_size == pic.img.enc_sample_size) { if (pic.img.in_sample_size == pic.img.enc_sample_size) {
xavs2_copy_frame(&pic, frame); xavs2_copy_frame(&pic, frame);
} else { } else {
const int shift_in = atoi(cae->api->opt_get(cae->param, "SampleShift")); const int shift_in = atoi(cae->api->opt_get(cae->param, "SampleShift"));
xavs2_copy_frame_with_shift(&pic, frame, shift_in); xavs2_copy_frame_with_shift(&pic, frame, shift_in);
} }
break; break;
case AV_PIX_FMT_YUV420P10: case AV_PIX_FMT_YUV420P10:
if (pic.img.in_sample_size == pic.img.enc_sample_size) { if (pic.img.in_sample_size == pic.img.enc_sample_size) {
xavs2_copy_frame(&pic, frame); xavs2_copy_frame(&pic, frame);
break; break;
} }
default: default:
av_log(avctx, AV_LOG_ERROR, "Unsupported pixel format\n"); av_log(avctx, AV_LOG_ERROR, "Unsupported pixel format\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
break; break;
} }
...@@ -271,7 +271,7 @@ static const AVClass libxavs2 = { ...@@ -271,7 +271,7 @@ static const AVClass libxavs2 = {
static const AVCodecDefault xavs2_defaults[] = { static const AVCodecDefault xavs2_defaults[] = {
{ "b", "0" }, { "b", "0" },
{ "g", "48" }, { "g", "48"},
{ "bf", "7" }, { "bf", "7" },
{ NULL }, { NULL },
}; };
......
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