[FFmpeg-devel] [PATCH 05/13] avformat/mxfenc: Fix stored width
Tomas Härdin
tjoppen at acc.umu.se
Tue May 8 13:37:08 EEST 2018
mån 2018-05-07 klockan 12:38 +0200 skrev Michael Niedermayer:
> This fixes the width to have computations matching the height
>
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavformat/mxfenc.c | 3 +-
> .../ref/fate/concat-demuxer-extended-lavf-mxf | 2 +-
> .../fate/concat-demuxer-extended-lavf-mxf_d10 | 2 +-
> .../ref/fate/concat-demuxer-simple1-lavf-mxf | 242 +++++++++---------
> .../fate/concat-demuxer-simple1-lavf-mxf_d10 | 140 +++++-----
> tests/ref/seek/lavf-mxf | 44 ++--
> tests/ref/seek/lavf-mxf_d10 | 54 ++--
> tests/ref/seek/lavf-mxf_dv25 | 54 ++--
> tests/ref/seek/lavf-mxf_dvcpro50 | 54 ++--
> tests/ref/seek/lavf-mxf_opatom_audio | 54 ++--
> 10 files changed, 325 insertions(+), 324 deletions(-)
>
> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> index f0fd406493..9140302b81 100644
> --- a/libavformat/mxfenc.c
> +++ b/libavformat/mxfenc.c
> @@ -1131,6 +1131,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
> {
> MXFStreamContext *sc = st->priv_data;
> AVIOContext *pb = s->pb;
> + int stored_width = (st->codecpar->width +15)/16*16;
> int stored_height = (st->codecpar->height+15)/16*16;
Should a muxer really do this kinds of computations? What happens if a
codec comes along that has larger or smaller macroblocks?
> int display_height;
> int f1, f2;
> @@ -1143,7 +1144,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
> mxf_write_generic_desc(s, st, key, desc_size);
>
> mxf_write_local_tag(pb, 4, 0x3203);
> - avio_wb32(pb, st->codecpar->width);
> + avio_wb32(pb, stored_width);
/Tomas
More information about the ffmpeg-devel
mailing list