# HG changeset patch # User gpoirier # Date 1159735262 0 # Node ID 3637b5c4e88270b6b6fcbd29ad197edecdfc8d72 # Parent 0a74030d9dd7fa29a649b25c116f31c5fd5206b8 add support for some MS DIB formats for avisynth Patch by Steve Lhomme % slhomme AH divxcorp P com % Original thread: Date: Sep 27, 2006 7:20 PM Subject: [Ffmpeg-devel] [PATCH] AVISynth support for some MS DIB formats diff -r 0a74030d9dd7 -r 3637b5c4e882 avisynth.c --- a/avisynth.c Sun Oct 01 17:05:25 2006 +0000 +++ b/avisynth.c Sun Oct 01 20:41:02 2006 +0000 @@ -94,6 +94,7 @@ stream->chunck_samples = wvfmt.nSamplesPerSec * (uint64_t)info.dwScale / (uint64_t)info.dwRate; stream->chunck_size = stream->chunck_samples * wvfmt.nChannels * wvfmt.wBitsPerSample / 8; + st->codec->codec_tag = wvfmt.wFormatTag; st->codec->codec_id = wav_codec_get_id(wvfmt.wFormatTag, st->codec->bits_per_sample); } else if (stream->info.fccType == streamtypeVIDEO) @@ -115,9 +116,10 @@ st->codec->width = imgfmt.bmiHeader.biWidth; st->codec->height = imgfmt.bmiHeader.biHeight; - st->codec->bits_per_sample = stream->info.dwSampleSize * 8; + st->codec->bits_per_sample = imgfmt.bmiHeader.biBitCount; 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); + st->codec->codec_tag = imgfmt.bmiHeader.biCompression; + st->codec->codec_id = codec_get_id(codec_bmp_tags, imgfmt.bmiHeader.biCompression); st->duration = stream->info.dwLength; } @@ -128,7 +130,6 @@ } avs->nb_streams++; - st->codec->codec_tag = stream->info.fccHandler; st->codec->stream_codec_tag = stream->info.fccHandler;