[FFmpeg-user] decomb versus deinterlace

pdr0 pdr0 at shaw.ca
Sun Apr 19 07:26:56 EEST 2020


Mark Filipak wrote
>> Deinterlacing does not necessarily have to be used in the context of
>> "telecast".  e.g. a consumer camcorder recording home video interlaced
>> content is technically not "telecast".  Telecast implies "broadcast on
>> television"
> 
> You are right of course. I use "telecast" (e.g., i30-telecast) simply to
> distinguish the origin of 
> scans from hard telecines. Can you suggest a better term? Perhaps
> "i30-camera" versus "i30"? Or 
> maybe the better approach would be to distinguish hard telecine: "i30"
> versus "i30-progressive"? Or 
> maybe distinguish both of them: "i30-camera" versus "i30-progressive"?


Some home video cameras can shoot native progressive modes too - 24p ,
23.976p. Some DV cameras shoot 24p advanced pulldown or standard.

 So why not use a descriptive term for what it actually in terms of content,
and how it's arranged or stored?  (see below)



>> The simplest operational definition is double rate deinterlacing
>> separates
>> and resizes each field to a frame +/- other processing. Single rate
>> deinterlacing does the same as double, but discards either even or odd
>> frames (or fields if they are discarded before the resize)
> 
> I think I understand your reference to "resize": line-doubling of
> half-height images to full-height 
> images, right?

"Resizing " a field in this context is any method of taking a field and
enlarging it to a full sized frame. There are dozens of different
algorithms. Line doubling is one method, but that is essentially a "nearest 
neighbor" resize without any interpolation. That's the simplest type. Some
complex deinterlacers use information from other fields to fill in the
missing information with adaptive motion compensation


> But I don't understand how "double rate" fits in. Seems to me that fields
> have to be converted 
> (resized) to frames no matter what the "rate" is. I also don't understand
> why either rate or 
> double-rate would discard anything.

The "rate" describes the output frame rate. 

Double rate deinterlacing keeps all the temporal information. Recall what
"interlace content" really means. It's 59.94 distinct moments in time
captured per second . In motion you have 59.94 different images.  

Single rate deinterlacing drops 1/2 the temporal information (either even,
or odd fields are retained)

single rate deinterlace: 29.97i interlaced content => 29.97p output
double rate deinterlace: 29.97i interlaced content => 59.94p output


>> I know you meant telecine up conversion of 23.976p to 29.97i (not "p").
>> But
>> other framerates can be telecined eg. An 8mm 16fps telecine to 29.97i.
> 
> Well, when I've telecined, the result is p30, not i30. Due to the presence
> of ffmpeg police, I 
> hesitate to write that ffmpeg outputs only frames -- that is certainly
> true of HandBrake, though. 
> When I refer to 24fps and 30fps (and 60fps, too) I include 24/1.001 and
> 30/1.001 (and 60/1.001) 
> without explicitly writing it. Most ordinary people (and most BD & DVD
> packaging) don't mention or 
> know about "/1.001".


The result of telecine is progressive content (you started with progressive
content) , but the output signal is interlaced. That's the reason for
telecine in the first place - that 29.97i signal is required for equipment
compatibility. So it's commonly denoted as 29.97i  . That can be confusing
because interlaced content is also 29.97i.  That's why /content/ is used to
describe everything .

When I'm lazy I use 23.976p notation (but it really means 24000/1001) , 
because 24.0p is something else - for example, there are both 24.0p and
23.976p blu-ray and they are different frame rates . Similarly, I use
"29.97" (but it really means 30000/1001), because "30.0" is something else.
You can have cameras or web video as 30.0p. Both exist and are different and
should be differentiated otherwise you have time and sync issues



>> "Combing" is just a generic, non-specific visual description. There can
>> be
>> other causes for "combing". eg. A warped film scan that causes spatial
>> field
>> misalignment can look like "combing". Interlaced content in motion , when
>> viewed on a progressive display without processing is also described as
>> "combing" - it's the same underlying mechanism of upper and lower field
>> taken at different points in time
> 
> Again, good points. May I suggest that when I use "combing" I mean the
> frame content that results 
> from a 1/24th second temporal difference between the odd lines of a
> progressive image and the even 
> line of the same progressive image that results from telecine? If there's
> a better term, I'll use 
> that better term. Do you know of a better term?

I know what you're trying to say , but the term "combing" , it's appearance,
and underlying mechanism is the same.  This is how the term "combing" is
currently used in both general public and industry professionals. If you
specifically mean combining on frames from telecine , then you should say so
, otherwise you will confuse many people.

You know this already - there is an important distinction between the actual
underlying video, but on a single frame or 2 field examination you will not
see that. You need to either 1) separate the fields and examine the field
pattern over a range with motion or 2) double rate deinterlace and examine
the pattern over a range with motion . This is how you determine what the
content actually is, whether it's interlaced or progressive




>>> Decombing is smoothing combed frames.
>> 
>> Yes, but this is an ambiguous term. "Decombing" can imply anything from
>> various methods of deinterlacing to inverse telecine / removing pulldown
>> .
> 
> To the best of my knowlege, ffmpeg doesn't use the terms "combing" or
> "decombing" -- certainly 
> there's no decomb filter. I don't have a term that distinguishes smoothing
> of a 1/24th second comb 
> (what I call "decombing") from smoothing of a 1/60th second (or 1/50th
> second) comb that results 
> from deinterlace (which I don't call "decombing"). Can you suggest a term
> for the latter? Or terms 
> for the both of them?

Why do you need a specific "term?"  

There are dozens of processing algorithms (not just talking about ffmpeg).
There are many ways to "decomb"  something . The one you ended up using is
categorized as  a blend deinterlacer because the top and bottom field are
blended with each other. If you examine the separated fields , the fields
are co-mingled, no longer distinct. You needed to retain both fields for
your purpose

There is no distinction in terms of distribution of application for this
type of filter.  You put the distinction on filtering specific frames by
using select.  You could apply blend deinterlace to every frame too (for
interlaced content) - how is that any different visually in terms of any
single frame there vs. your every 5th frame ?

You could have used a different filter, maybe a box blur , applied on the
same frame selection . Would you still call that "decomb" ?



> Regarding inverse telecine (aka INVT), I've never seen INVT that didn't
> yield back uncombed, purely 
> progressive pictures (as "picture" is defined in the MPEG spec). Can
> you/will you enlighten me 
> because it's simply outside my experience.

It happens all the time. This is simply reversing the process. Inverse
telecine is the same thing as "removing pulldown". You get back the original
progressive frames you started with. The telecine  (hard or soft) is only
done to make it compatible with NTSC spec equipment in the first place. 



>>> It seems to me that some people call combing that results from telecine,
>>> interlace. Though they are
>>> superficially similar, they're different.
>> 
>> Yes, it's more appropriately called "combing".
> 
> So, if I properly understand, you favor "combing" to mean the 1/60th (or
> 1/50th) second temporal 
> difference between odd/even lines that result from deinterlace.

No, combing is the general description when you have top/bottom fields from
different times, that result from NOT deinterlacing when viewed on a
progressive display such as a flat panel.  If you deinterlaced with a
typical deinterlacer, the combing would be mostly gone (or altered, left
with deinterlacing artifacts)


>  That's exactly the reverse of how I 
> have been using "combing". You see, to me, "combing" doesn't refer to
> visual appearance, but to 
> structural content (i.e., 1/24 sec between lines as opposed to 1/fieldrate
> sec between lines). I 
> appreciate that to most people, "combing" is an appearance, but basing
> structural difference on 
> appearance leaves no way to distinguish deinterlace from telecine. Perhaps
> "interlace-comb" versus 
> "telecine-comb" would work better. What do you think?

I think you meant distinguishing "interlace" vs. "telecine"

Content. That's what determines and distinguishes everything



>> When writing your book , I suggest mentioning field matching and
>> decimation
>> ( inverse telecine, removing pulldown) in contrast to deinterlacing.
> 
> Well, I'm writing a guide, not a book, and I plan to not address INVT at
> all because I've never had 
> a use for INVT and I suspect that no one else will.

You should, because IVTC is how you recover the original progressive frames
from any type of telecine



>> I recommend describing the content. That's the key distinguishing factor
>> that determines what you have in terms of interlaced content vs.
>> progressive
>> content that has been telecined
> 
> Yes! That's exactly what I seek. But there doesn't seem to be a
> nomenclature that describes 
> (unambiguous) structure as opposed to (ambiguous) appearance.


You know this already . Do the procedure described above with separating
fields (or double rate deinterlacing) and stepping though

If it's interlaced /content/, then call it that. That is the only
description needed. When you examine and step through the separated fields
in a shot with motion, each field represents a different moment in time .
59.94 different pictures /s (for 29.97i;  50 for 25i content) . That's
different and the main distinction between the various telecine patterns .
29.97p content would show 2 consecutive fields from the same moment in time.
In general, interlaced content is the only time a deinterlacer should/would
be used. 

If it's soft telecine, then call it that. It's progressive content, encoded
progressively, with repeat field flags. (It does not have to be 23.976p.
There are other film rate sources ,thus other telecine patterns) . The
output signal is 29.97i (that's the reason for telecine) when the RF flags
are abided by  . (There are different types of equipment, some are flag
readers, some detect various cadences and effectively IVTC). 

If it's hard telecine, it's still progressive content. The distinction is
interlaced encoding with actual field repeats.  The output signal is 29.97i
. 

So if something was a 16fps 8mm film scan hard telecined to 29.97i, then
call it that. That's descriptive and unambiguous

Another semi-common term for 3:2 film telecine is "23.976p in 29.97i" , and
you can add hard/soft to describe it farther

(You can have other uncommon bizarre combinations. Weird cadences, mixed
content,  interlaced content encoded progressively, and vice versa)







--
Sent from: http://www.ffmpeg-archive.org/


More information about the ffmpeg-user mailing list