[FFmpeg-trac] #8590(undetermined:closed): 'telecine=pattern' error for p24, soft telecined sources
FFmpeg
trac at avcodec.org
Mon Apr 6 05:43:41 EEST 2020
#8590: 'telecine=pattern' error for p24, soft telecined sources
-------------------------------------+-------------------------------------
Reporter: markfilipak | Owner:
Type: defect | Status: closed
Priority: normal | Component:
| undetermined
Version: unspecified | Resolution: invalid
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by pdr0):
Replying to [comment:39 markfilipak]:
>
> Undersampling is really a vague term, isn't it? Is sampling film at a
lower resolution than half the size of a silver halide grain
undersampling? Or is undersampling resampling a digital image (or audio
stream) at less than twice the frequency (or half the area) of the
original samples. Dr. Nyquist would say that they are both "undersampled".
>
Undersampling here is being used in the most simple sense. If you have 100
samples of something, and you throw away half , now you have 50 . Which
has more samples ? It's not a trick question..
> Answer for yourself: Is dividing a picture into 2 half-pictures really
undersampling? Is it really sampling at all?
>
That's not undersampling , because you can reassemble 2 half picture to
get the full original picture . This is not the case with interlace
content
>
> Full temporal sampling? Life doesn't pass in 1/24th second increments.
Film and video both undersample life. But of course that's not what you
mean. :)
>
> What you mean is that transcoding a 24fps stream to anything less than
48fps is temporal subsampling, and in that, Dr. Nyquist and I would both
agree with you.
>
Sampling in this context is in terms of a reference point. It's relative.
If you have 24 fps, that's your original reference point . There are 24
pictures taken per second. If you discard half the motion samples, you now
have 12 pictures/s. That is temporal undersampling with respect to the
original 24 fps.
> When you say that that transcoding 24fps to 24fps is not subsampling but
merely dividing a picture into half-pictures is subsampling, are you being
consistent?
>
Yes it's consistent. Nothing is being discarded when you go 24fps to 24fps
(ignoring lossy compression for this discussion) . Dividing into half
pictures - nothing is being discarded
BUT interlace content - now something is being discarded . Do you see the
difference ?
> >... Each field has half the spatial information of a full progressive
frame. ...
>
> Does that make it subsampling?
>
For interlace content - yes it does. Half the spatial information is
missing
For progressive content, arranged in fields (2:2 pulldown, or PsF) , no,
because you can re-arrange it back to the original (ignoring lossy
compression again)
>
> >... A straight line becomes jagged dotted line when deinterlaced,
because that field is resized to a full sized frame and only 50% the line
samples are present. ...
>
> Now, I'm sure you know that fields -- I prefer to call them "half-
pictures" -- aren't converted to frames without first reinterlacing -- I
prefer to call it "reweaving" -- the half-picture-pairs to reconstruct the
original pictures. And I'm sure you know that the only way a reconstructed
picture has a jagged line is if the original film frame had a jagged line.
>
You need to differentiate between interlaced content and progressive
content.
With progressive content, 2 field pairs come from the same frame and can
be reassembled and weaved back to a full progressive frame. No problem.
This happens everyday . eg. Progressive, PAL content is 2:2 ( broadcast,
DVD's) , PSF . It can occur out of order too, the fields can be found
later or earlier, then matched with it's proper field pair in the process
of "field matching"
But with interlaced ''content'', the 2 field pairs are different. You're
missing 1/2 the spatial information. There is no matching field pair. That
is where you get the twitter artifacts (you have spatial undersampling).
This is also the case with your combed frame with your 5555 pulldown . You
have 2 fields that come from different times. Each is undersampled in
terms of their own time. They are missing their "partner" field pair . Of
course you can find it earlier or later in the stream, from field
matching, but then you have to decide on which, top or bottom again, and
you get your 3:2 or 2:3 frame repeats. If you instead weave, or try to
treat is as progressive, you get back the combing.
> So I assume that what you are describing is bobbing. But bobbing isn't
undersampling either. If anything, bobbing is underdisplaying, don't you
agree?
>
Historically, "bobbing" is just separating fields. When you view separate
fields, each even, odd field has an offset. It looks like up/down/up/down
or "bobbing" up and down. But the term has come to include both separating
fields and resizing the fields to frames .
So if you bob deinterlace progressive content - then yes you are causing
undersampling (and resulting artifacts, like twitter) . Each field pair of
the progressive frame can no longer be field matched properly. 24fps
becomes 48fps and each frame will have aliasing artifacts
But if you bob deinterlace interlaced content, the undersampling was there
to begin with . The process of making the interlace, dropping the spatial
samples is what caused the undersampling
> >... That line information is undersampled. In motion, those lines
appear to "twitter". Higher quality deinterlacing algorithms attempt to
adaptively fill in the gaps and smooth everything over, so it appears as
if it was a true progressive frame.
>
> My opinion is that deinterlacing algorithms should reweave the half-
picture lines and nothing more. A user can insert more filters if more
processing is desired, but trying to work around 'mystery' behavior of
filters that do more than you think they do is crazy making.
>
For progressive content, you do not deinterlace, because it damages the
picture. You saw that in the very first example. You should field match.
Deinterlacing is not the same thing as field matching
For interlace content, you can't "reweave the half-picture lines" , or you
get back the combing
> > As motioned earlier, there are other causes, but low quality
deinterlacing is the most common. Other common ones are pixel binning ...
>
> You know, I've run across that term maybe once or twice... I don't know
what it means.
>
> >... or sampling every nth pixel. Eg. large sensor DSLR's when shooting
video mode.
>
> Is that undersampling or simply insufficient resolution?
>
It's undersampling. The resolution of DSLR sensors is very high. 30-50
megapixels on average. 120-150 Megapixel cameras available. 1920x1080 HD
video is only ~2K . 2Megapixels. It should be massively oversampled for
video. But because of overheating and processing requirements (it takes
lots of CPU or hardware to do proper downscaling in realtime), they
(especially 1st 5-6 generations of DSLRs) , drop every nth pixel when
taking video. Some newer ones are better now, but this is a very common
source of aliasing and line twitter
>
> You see, a word like "undersampling" can become so broad that it's
utility as a word is lost.
>
It can be if you want it to be, but it's just the most simple sense of the
word here
>
>
> I will continue my responses, but I have to reboot now because the
javascript at the Johns Hopkins COVID-19 site is causing problems with my
browser. I'm surprised this window survived.
>
> By the way, if you exclude COVID-19 cases that are on-going and consider
only cases that have been resolved (recovered plus fatal), over 20% of the
people who get COVID-19 die.
Stay safe
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8590#comment:40>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list