aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-22 15:49:26 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-22 15:49:26 +0200
commita440886a35e3329830d0c96311a80bd0f08ef6f3 (patch)
tree7d0c316860bd05a9709ab64c6cb1a2159ec93f74
parent2fece1e4d5ee180576617eeb41ba4615c2e97729 (diff)
parent2ec96b6bd5bf7b22978711bcf2cee702bee89c6f (diff)
downloadffmpeg-a440886a35e3329830d0c96311a80bd0f08ef6f3.tar.gz
Merge commit '2ec96b6bd5bf7b22978711bcf2cee702bee89c6f'
* commit '2ec96b6bd5bf7b22978711bcf2cee702bee89c6f': qsvenc: cosmetics, reindent Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r--libavcodec/qsvenc.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index ea148a388b..08ff413ec4 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -386,47 +386,47 @@ static int submit_frame(QSVEncContext *q, const AVFrame *frame,
qf->surface = (mfxFrameSurface1*)qf->frame->data[3];
} else {
- /* make a copy if the input is not padded as libmfx requires */
- if ( frame->height & (q->height_align - 1) ||
- frame->linesize[0] & (q->width_align - 1)) {
- qf->frame->height = FFALIGN(frame->height, q->height_align);
- qf->frame->width = FFALIGN(frame->width, q->width_align);
+ /* make a copy if the input is not padded as libmfx requires */
+ if ( frame->height & (q->height_align - 1) ||
+ frame->linesize[0] & (q->width_align - 1)) {
+ qf->frame->height = FFALIGN(frame->height, q->height_align);
+ qf->frame->width = FFALIGN(frame->width, q->width_align);
- ret = ff_get_buffer(q->avctx, qf->frame, AV_GET_BUFFER_FLAG_REF);
- if (ret < 0)
- return ret;
+ ret = ff_get_buffer(q->avctx, qf->frame, AV_GET_BUFFER_FLAG_REF);
+ if (ret < 0)
+ return ret;
- qf->frame->height = frame->height;
- qf->frame->width = frame->width;
- ret = av_frame_copy(qf->frame, frame);
- if (ret < 0) {
- av_frame_unref(qf->frame);
- return ret;
+ qf->frame->height = frame->height;
+ qf->frame->width = frame->width;
+ ret = av_frame_copy(qf->frame, frame);
+ if (ret < 0) {
+ av_frame_unref(qf->frame);
+ return ret;
+ }
+ } else {
+ ret = av_frame_ref(qf->frame, frame);
+ if (ret < 0)
+ return ret;
}
- } else {
- ret = av_frame_ref(qf->frame, frame);
- if (ret < 0)
- return ret;
- }
- qf->surface_internal.Info = q->param.mfx.FrameInfo;
+ qf->surface_internal.Info = q->param.mfx.FrameInfo;
- qf->surface_internal.Info.PicStruct =
- !frame->interlaced_frame ? MFX_PICSTRUCT_PROGRESSIVE :
- frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF :
- MFX_PICSTRUCT_FIELD_BFF;
- if (frame->repeat_pict == 1)
- qf->surface_internal.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED;
- else if (frame->repeat_pict == 2)
- qf->surface_internal.Info.PicStruct |= MFX_PICSTRUCT_FRAME_DOUBLING;
- else if (frame->repeat_pict == 4)
- qf->surface_internal.Info.PicStruct |= MFX_PICSTRUCT_FRAME_TRIPLING;
+ qf->surface_internal.Info.PicStruct =
+ !frame->interlaced_frame ? MFX_PICSTRUCT_PROGRESSIVE :
+ frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF :
+ MFX_PICSTRUCT_FIELD_BFF;
+ if (frame->repeat_pict == 1)
+ qf->surface_internal.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED;
+ else if (frame->repeat_pict == 2)
+ qf->surface_internal.Info.PicStruct |= MFX_PICSTRUCT_FRAME_DOUBLING;
+ else if (frame->repeat_pict == 4)
+ qf->surface_internal.Info.PicStruct |= MFX_PICSTRUCT_FRAME_TRIPLING;
- qf->surface_internal.Data.PitchLow = qf->frame->linesize[0];
- qf->surface_internal.Data.Y = qf->frame->data[0];
- qf->surface_internal.Data.UV = qf->frame->data[1];
+ qf->surface_internal.Data.PitchLow = qf->frame->linesize[0];
+ qf->surface_internal.Data.Y = qf->frame->data[0];
+ qf->surface_internal.Data.UV = qf->frame->data[1];
- qf->surface = &qf->surface_internal;
+ qf->surface = &qf->surface_internal;
}
qf->surface->Data.TimeStamp = av_rescale_q(frame->pts, q->avctx->time_base, (AVRational){1, 90000});