[Ffmpeg-devel] [PATCH] AVISynth support for some MS DIB formats

Michael Niedermayer michaelni
Wed Sep 27 21:57:35 CEST 2006


Hi

On Wed, Sep 27, 2006 at 07:20:26PM +0200, Steve Lhomme wrote:
> Some codec don't get decoded to some nice YUV formats in AVISynth. They 
> use different DIB formats as explained here:
> 
> http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx81_c/directx_cpp/htm/avirifffilereference.asp
> 
> Here is a patch to correct this in the AVISynth code.
> 
> Steve

> Index: avisynth.c
> ===================================================================
> --- avisynth.c	(revision 6352)
> +++ avisynth.c	(working copy)
> @@ -95,6 +95,7 @@
>                    stream->chunck_size = stream->chunck_samples * wvfmt.nChannels * wvfmt.wBitsPerSample / 8;
>  
>                    st->codec->codec_id = wav_codec_get_id(wvfmt.wFormatTag, st->codec->bits_per_sample);
> +                  st->codec->codec_tag = stream->info.fccHandler;

this looks wrong stream->info.fccHandler should be st->codec->stream_codec_tag
and wvfmt.wFormatTag should be codec_tag


>                  }
>                else if (stream->info.fccType == streamtypeVIDEO)
>                  {
> @@ -117,7 +118,27 @@
>  
>                    st->codec->bits_per_sample = stream->info.dwSampleSize * 8;
>                    st->codec->bit_rate = (uint64_t)stream->info.dwSampleSize * (uint64_t)stream->info.dwRate * 8 / (uint64_t)stream->info.dwScale;
> -                  st->codec->codec_id = codec_get_id(codec_bmp_tags, stream->info.fccHandler);

same here, it should be imgfmt.bmiHeader.biCompression not 
stream->info.fccHandler id also guess thats why the code didnt work though
iam just guessing, what happens if you change these?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list