Re: [FFmpeg-devel] [PATCH]lavf/mxfdec: Set width to actual coded_width for AVCI50

2015-11-29 Thread Carl Eugen Hoyos
On Friday 27 November 2015 09:46:48 pm Tomas Härdin wrote:
> > Ok to apply?
>
> Sure, we can take the renaming separately.

I applied the patch.

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]lavf/mxfdec: Set width to actual coded_width for AVCI50

2015-11-25 Thread Carl Eugen Hoyos
On Wednesday 25 November 2015 12:57:07 am Tomas Härdin wrote:
> On Tue, 2015-11-24 at 12:02 +0100, Carl Eugen Hoyos wrote:
> > Hi!
> >
> > Attached patch fixes ticket #5029.
> >
> > Please comment, Carl Eugen
>
> Looks simple enough, but (ab)using MXFCodecUL like that 
> has a slight stink to it.

It was abused for pix_fmts before, and I added a usage for 
codec_tag in July. MXFCodecUL uses an int for the third 
parameter which is exactly what is needed for width.

> Can we perhaps rename the struct to something that signals 
> its more general use of mapping ULs to integers?

I will rename it if you make a suggestion...

> Another thing: don't we have some table like this for 
> H.264 in MXF already?

There are tables that contain H.263 as codec_id but the 
width is needed for this ticket.

Ok to apply?

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]lavf/mxfdec: Set width to actual coded_width for AVCI50

2015-11-24 Thread Tomas Härdin
On Tue, 2015-11-24 at 12:02 +0100, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes ticket #5029.
> 
> Please comment, Carl Eugen

Looks simple enough, but (ab)using MXFCodecUL like that has a slight
stink to it. Can we perhaps rename the struct to something that signals
its more general use of mapping ULs to integers?

Another thing: don't we have some table like this for H.264 in MXF
already?

/Tomas


signature.asc
Description: This is a digitally signed message part
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]lavf/mxfdec: Set width to actual coded_width for AVCI50

2015-11-24 Thread Carl Eugen Hoyos
Hi!

Attached patch fixes ticket #5029.

Please comment, Carl Eugen
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 429f46a..6b1c654 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1145,6 +1145,15 @@ static const MXFCodecUL 
mxf_intra_only_picture_essence_coding_uls[] = {
 { { 
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 
},  0,   AV_CODEC_ID_NONE },
 };
 
+/* actual coded width for AVC-Intra to allow selecting correct SPS/PPS */
+static const MXFCodecUL mxf_intra_only_picture_coded_width[] = {
+{ { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x01 
}, 16, 1440 },
+{ { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x02 
}, 16, 1440 },
+{ { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x03 
}, 16, 1440 },
+{ { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x04 
}, 16, 1440 },
+{ { 
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 
},  0,0 },
+};
+
 static const MXFCodecUL mxf_sound_essence_container_uls[] = {
 // sound essence container uls
 { { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x06,0x01,0x00 
}, 14, AV_CODEC_ID_PCM_S16LE }, /* BWF Frame wrapped */
@@ -2128,6 +2137,10 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
 memcpy(st->codec->extradata, descriptor->extradata, 
descriptor->extradata_size);
 }
 } else if (st->codec->codec_id == AV_CODEC_ID_H264) {
+int coded_width = 
mxf_get_codec_ul(mxf_intra_only_picture_coded_width,
+   
>essence_codec_ul)->id;
+if (coded_width)
+st->codec->width = coded_width;
 ret = ff_generate_avci_extradata(st);
 if (ret < 0)
 return ret;
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel