[FFmpeg-devel] [PATCH] avformat/mxfenc: correctly set width values for dvcprohd
Baptiste Coudurier
baptiste.coudurier at gmail.com
Tue Nov 12 01:52:35 EET 2019
> On Nov 11, 2019, at 3:30 PM, Tomas Härdin <tjoppen at acc.umu.se> wrote:
>
> lör 2019-11-09 klockan 15:46 -0800 skrev Baptiste Coudurier:
>> ---
>> libavformat/mxfenc.c | 15 ++++++++++++---
>> 1 file changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
>> index b7ae5cc637..f7df9c3daf 100644
>> --- a/libavformat/mxfenc.c
>> +++ b/libavformat/mxfenc.c
>> @@ -1092,7 +1092,7 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
>> {
>> MXFStreamContext *sc = st->priv_data;
>> AVIOContext *pb = s->pb;
>> - int stored_width = (st->codecpar->width +15)/16*16;
>> + int stored_width = 0;
>> int stored_height = (st->codecpar->height+15)/16*16;
>> int display_height;
>> int f1, f2;
>> @@ -1101,6 +1101,15 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
>>
>> get_trc(transfer_ul, st->codecpar->color_trc);
>>
>> + if (st->codecpar->codec_id == AV_CODEC_ID_DVVIDEO) {
>> + if (st->codecpar->height == 1080)
>> + stored_width = 1920;
>> + else if (st->codecpar->height == 720)
>> + stored_width = 1280;
>
> What about the other DV variants?
These get default value
>> + }
>> + if (!stored_width)
>> + stored_width = (st->codecpar->width+15)/16*16;
>
> Shouldn't this have SAR applied?
I didn’t change this, the code was like that before
—
Baptiste
More information about the ffmpeg-devel
mailing list