[FFmpeg-user] Rewriting 'fieldmatch' using the State Machine Method

Mark Filipak markfilipak.imdb at gmail.com
Thu Jun 12 02:13:55 EEST 2025


On 11/06/2025 17.30, Rob Hallam wrote:
> (another off-list reply, redirecting back to list- all included below
> for context)

Take note: Mr. Hallam is taking a private conversation and sending it to the list. Some consider 
that to be bad etiquette.

> On Wed, 11 Jun 2025 at 20:59, Mark Filipak <markfilipak.imdb at gmail.com> wrote:
>>
>> On 11/06/2025 14.57, Rob Hallam wrote:
>>> On Wed, 11 Jun 2025 at 19:35, Mark Filipak <markfilipak.imdb at gmail.com> wrote:
>>>> On 11/06/2025 14.08, Rob Hallam wrote:
>>>>> Bearing in mind the audience: what can we concretely do, in your view?
>>>>
>>>> Help me with 'C'. Conduct design reviews of what I write.
>>>
>>> I see from your other reply; interesting. What is the objective of
>>> that rewrite? ...
>>
>> I live in the USA, so a lot of my DVDs are 'NTSC'. Deteleince is important of course.
>> 'fieldmatch,yadif,decimate' is the preferred method. Over the last few years, several people have
>> reported trouble with fieldmatch. I've never had problems. But I have seen professionally mastered
>> DVDs that had bad tail- _and_ head-cuts at splices. I know that players have code to work past that
>> (or they drop frames). FFmpeg shouldn't break on such things, but it does.
>>
>> FFmpeg should never drop frames or duplicate frames, but it does.
>>
>> I looked at fieldmatch.c and didn't like what I saw.
>>
>> There are 4 cases of good telecines: 2:3:2:3 v 2"3"3"2 and tff v bff. There are 112 cases of bad
>> telecines. I want to rewrite fieldmatch to cover all 116 cases. I also want to create a good example
>> of state machine design in software. I know it. My programmers have done it. I think it would profit
>> the FFmpeg project. A successful example goes a long way toward winning hearts and minds.
>>
>> Look, let me be frank with you. The FOSS codesmiths I've seen wouldn't make it in industry -- you
>> know, refrigerators, microwave ovens, nuclear weapons. They'd start their trail-n-error programming
>> and get tossed out on their keisters. I want to show them a better way, a provably correct way, by
>> example, not by preaching. Plus, I want to have a reliable fieldmatch.
>>
>>> ... Not that it needs one, it's fine to do things for fun or
>>> as a learning exercise.
>>
>> I'm already having way too much fun. I do need some learning, though.
>>
> 
> Genuine suggestion given all of the above:
> 
> There is a free course on embedded systems design which includes a C
> component [0]. Given your background you can take as read the
> microcontroller parts and will have no need to review the FSM bit, but
> those will contextualise the accompanying C for you.
> 
>> I want to show them a better way, (...) not by preaching
> 
> Yet you prefixed it with sanctimonious swipes again...

Isn't 100% code coverage and provably correct code better?

Sanctimonious? That's a laugh. You're the person who's chastising.

I'm done with you, Mr. Hallam.



More information about the ffmpeg-user mailing list