[FFmpeg-devel] [PATCH] Detect DTS in wav (issue70) ???+?about?ac3-in-wav

Anssi Hannula anssi.hannula
Wed Aug 18 15:19:40 CEST 2010


On Wednesday 18 August 2010 13:33:11 Michael Niedermayer wrote:
> On Wed, Aug 18, 2010 at 08:24:58AM +0300, Anssi Hannula wrote:
> > On Wednesday 18 August 2010 07:29:15 Anssi Hannula wrote:
> > > On Tuesday 17 August 2010 15:26:52 Michael Niedermayer wrote:
> > > > i meant that the code is a mess and id like it to be simpler.
> > > 
> > > Attached is a completely different simpler approach, then.
> > > Since we are about to do the
> > > lower-wav-score-for-s16le-files-if-small-buffer trick anyway for the
> > > spdif-in-wav files, attached patch does the same for dts- in-wav,
> > > marking such files as raw dts.
> > > 
> > > Better?
> 
> no, its still a mess

So it is worse than the fallback_id one?

> everything looks much more complex than it should be and its not clear
> at all why the changes are done.

Ok.

> a patch touching probe functions from 2 seperate formats is already quite
> suspect.
> if dts detection is not good enough it can be improved in a seperate
> patch
> and each improvement should be seperate and be justified
> for example why do you add such huge amounts of code, is the dts detection
> failing for you?

The current dts detection returns AVPROBE_SCORE_MAX/2+1 on match, which won't 
be enough to top wav's AVPROBE_SCORE_MAX-1.

The added code allows dts probe to return AVPROBE_SCORE_MAX when dts markers 
are found with intervals which makes the stream bitrate match PCM bitrate (and 
thus transmittable in standard pcm wav / audiocd).

> checking for identical markers should not need more than 4 lines of code
> like
> if(last == current) identical ++;
> else                different ++;
> if(identical - A*different > B)
>     return C
> 
> the changes to wav.c do look ok but should be seperate as well
> 
> [...]

-- 
Anssi Hannula



More information about the ffmpeg-devel mailing list