[FFmpeg-devel] [PATCH 3/3] avdevice/decklink: Add support for decoding 8-bit RGB formats.

Chris Spencer spencercw at gmail.com
Sun Jul 19 15:08:07 CEST 2015


Hi Carl,

On 19 July 2015 at 13:53, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>
> Chris Spencer <spencercw <at> gmail.com> writes:
>
> > -On Windows, you need to run the IDL files through  <at> command{widl}.
> > +On Windows, you need to run the IDL files through  <at> command{midl}.
>
> Is this intended?

Yes, widl doesn't exist. The tool is called midl.

> > -DeckLink is very picky about the formats it supports. Pixel format is
>
> > +DeckLink is very picky about the formats it supports. Pixel
> > format is uyvy422,
>
> Imo, please do not change this line:
> Going through old commits is not unusual,
> such changes make this much more difficult.

So I'm clear, you mean the text is fine, but avoid changing the
position of the line breaks?

> > +    } else if (cctx->pixel_format == AV_PIX_FMT_ARGB) {
> > +        ctx->bmd_format = bmdFormat8BitARGB;
> > +    } else if (cctx->pixel_format == AV_PIX_FMT_BGRA) {
> > +        ctx->bmd_format = bmdFormat8BitBGRA;
>
> > +    } else if (ctx->bmd_format == bmdFormat8BitARGB) {
> > +        st->codec->codec_id    = AV_CODEC_ID_RAWVIDEO;
> > +        st->codec->pix_fmt     = AV_PIX_FMT_ARGB;
> > +        st->codec->codec_tag   = MKTAG('A', 'R', 'G', 'B');
> > +    } else if (ctx->bmd_format == bmdFormat8BitBGRA) {
> > +        st->codec->codec_id    = AV_CODEC_ID_RAWVIDEO;
> > +        st->codec->pix_fmt     = AV_PIX_FMT_BGRA;
> > +        st->codec->codec_tag   = MKTAG('B', 'G', 'R', 'A');
>
> I would have expected these to be AV_PIX_FMT_0RGB and
> AV_PIX_FMT_BGR0.

The Blackmagic documentation is kind of strange on this one actually.
For bmdFormat8BitBGRA it says "alpha channel is valid". For
bmdFormat8BitBGRA it says "alpha channel may be valid". Not sure how
best to deal with that to be honest.

> > +    { "pixel_format", "set video pixel format"               ,
>
> Should be pix_fmt imo.

I was going to do this, but avfoundation, dshow and v4l have similar
options all called pixel_format, so I used that for consistency.

Thanks,

Chris


More information about the ffmpeg-devel mailing list