[FFmpeg-devel] [PATCH] More DirectShow patches
Michael Niedermayer
michaelni at gmx.at
Sun Nov 6 13:16:17 CET 2011
On Sun, Nov 06, 2011 at 12:22:14PM +0100, Stefano Sabatini wrote:
> On date Saturday 2011-11-05 22:18:42 -0200, Ramiro Polla encoded:
> > On Sat, Nov 5, 2011 at 9:49 PM, Stefano Sabatini <stefasab at gmail.com> wrote:
> > > On date Saturday 2011-11-05 15:00:38 -0200, Ramiro Polla encoded:
> > >> From 0dfa169600f1f11951d4f32f24bbd3f9fec510cb Mon Sep 17 00:00:00 2001
> > >> From: Ramiro Polla <ramiro.polla at gmail.com>
> > >> Date: Sat, 8 Oct 2011 15:00:00 -0300
> > >> Subject: [PATCH 06/10] dshow: support BI_BITFIELDS compression type
> > >>
> > >> ---
> > >> libavdevice/dshow.c | 3 ++-
> > >> 1 files changed, 2 insertions(+), 1 deletions(-)
> > >>
> > >> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
> > >> index 354e663..bba1bba 100644
> > >> --- a/libavdevice/dshow.c
> > >> +++ b/libavdevice/dshow.c
> > >> @@ -72,6 +72,7 @@ static enum PixelFormat dshow_pixfmt(DWORD biCompression, WORD biBitCount)
> > >> return PIX_FMT_YUYV422;
> > >> case MKTAG('I', '4', '2', '0'):
> > >> return PIX_FMT_YUV420P;
> > >> + case BI_BITFIELDS:
> > >> case BI_RGB:
> > >> switch(biBitCount) { /* 1-8 are untested */
> > >> case 1:
> > >> @@ -711,7 +712,7 @@ dshow_add_device(AVFormatContext *avctx, AVFormatParameters *ap,
> > >> codec->bits_per_coded_sample = bih->biBitCount;
> > >> } else {
> > >> codec->codec_id = CODEC_ID_RAWVIDEO;
> > >> - if (bih->biCompression == BI_RGB) {
> > >> + if (bih->biCompression == BI_RGB || bih->biCompression == BI_BITFIELDS) {
> > >> codec->bits_per_coded_sample = bih->biBitCount;
> > >> codec->extradata = av_malloc(9 + FF_INPUT_BUFFER_PADDING_SIZE);
> > >> if (codec->extradata) {
> > >> --
> > >> 1.7.4.1
> > >
> > > After reading this:
> > > http://www.virtualdub.org/blog/pivot/entry.php?id=177
> > > http://msdn.microsoft.com/en-us/library/dd183376%28v=vs.85%29.aspx
> > >
> > > I wonder if the right format to select with biCompression =
> > > BI_BITFIELDS should be detected against BITMAPINFO.bmiColors (this is
> > > somehow similar to the way the pixel format is set in fbdev.c, you may
> > > borrow some code from there).
> >
> > Hm, this is too much work for such a rare case. If a bug report ever
> > pops up I'll look at it.
>
> Fine with me.
so patch 6 is LGTY ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111106/fabe92ff/attachment.asc>
More information about the ffmpeg-devel
mailing list