Discussion:
interlacing question
(too old to reply)
Maksym Veremeyenko
2017-02-06 17:13:07 UTC
Permalink
Raw Message
i just discovered, that i dont clear understand a field-based
processing, so first question *why does next properties needed*:

consumer_tff
consumer_deinterlace
top_field_first
meta.top_field_first
meta.swap_fields

and next what is a comment about:

transition_composite.c:575:
[...]
<------>// Assuming lower field first
<------>// Special care is taken to make sure the b_frame is aligned to
the correct field.
<------>// field 0 = lower field and y should be odd (y is 0-based).
<------>// field 1 = upper field and y should be even.
<------>if ( ( field > -1 ) && ( y % 2 == field ) )
<------>{
<------><------>if ( ( field == 1 && y < height_dest - 1 ) || ( field ==
0 && y == 0 ) )
<------><------><------>p_dest += stride_dest;
<------><------>else
<------><------><------>p_dest -= stride_dest;
<------>}
[...]
--
Maksym Veremeyenko
Dan Dennedy
2017-02-07 06:05:00 UTC
Permalink
Raw Message
On Mon, Feb 6, 2017 at 9:13 AM Maksym Veremeyenko <***@m1stereo.tv> wrote:

i just discovered, that i dont clear understand a field-based
processing, so first question *why does next properties needed*:

consumer_tff


This is a frame property that indicates what field order the consumer
wants. You set "top_field_first" property to 0 or 1 on the consumer, and
mlt_consumer copies to the frame as consumer_tff. The consumer defaults to
top_field_first=0 (because it is not set and mlt_properties_get_int()
returns 0 if unset).


consumer_deinterlace


This is a frame property that indicates that the consumer wants progressive
output. You set the "progressive" property to 0 or 1 on the consumer, and
mlt_consumer copies it to the frame as "consumer_deinterlace" (this name
for legacy reasons). This defaults to the mlt_profile.progressive value.


top_field_first


The current state of the field order of the image on the frame.


meta.top_field_first


The field order from the producer, which can be different than current
state or what the consumer requested. This is not currently set by any
producer. The framework automatically copies all properties with prefix
"meta." on a producer to the frame. So, this lets the user add
"meta.top_field_first" to the producer to override the "top_field_first"
property a producer sets on a frame.


meta.swap_fields


This provides another way for a user to tell the fieldorder filter to swap
fields (exchange lines). From the yml:
If you set the property meta.swap_fields=1 on the producer, then this
filter swaps the fields of an interlaced frame in addition to any field
order correction by shifting the image.


and next what is a comment about:


It is doing field-based rendering, meaning the interpolation of the
geometry can factor in time and motion from one field to the next within a
single frame's image (writing both fields interleaved within a single
image). Think of it as field-level (sub-frame) motion interpolation.
However, now, we discourage use of transition_composite for animation
because it does not provide sub-pixel interpolation and gives poor results.
However, it has been used in legacy, SD interlace applications before
affine sub-pixel interpolation was available, and performance was needed
more than good quality.


transition_composite.c:575:
[...]
<------>// Assuming lower field first
<------>// Special care is taken to make sure the b_frame is aligned to
the correct field.
<------>// field 0 = lower field and y should be odd (y is 0-based).
<------>// field 1 = upper field and y should be even.
<------>if ( ( field > -1 ) && ( y % 2 == field ) )
<------>{
<------><------>if ( ( field == 1 && y < height_dest - 1 ) || ( field ==
0 && y == 0 ) )
<------><------><------>p_dest += stride_dest;
<------><------>else
<------><------><------>p_dest -= stride_dest;
<------>}
[...]


--
Maksym Veremeyenko
Maksym Veremeyenko
2017-02-07 07:03:37 UTC
Permalink
Raw Message
Post by Maksym Veremeyenko
i just discovered, that i dont clear understand a field-based
consumer_tff
This is a frame property that indicates what field order the consumer
wants. You set "top_field_first" property to 0 or 1 on the consumer, and
mlt_consumer copies to the frame as consumer_tff. The consumer defaults
to top_field_first=0 (because it is not set and mlt_properties_get_int()
returns 0 if unset).
consumer_deinterlace
This is a frame property that indicates that the consumer wants
progressive output. You set the "progressive" property to 0 or 1 on the
consumer, and mlt_consumer copies it to the frame as
"consumer_deinterlace" (this name for legacy reasons). This defaults to
the mlt_profile.progressive value.
top_field_first
The current state of the field order of the image on the frame.
meta.top_field_first
The field order from the producer, which can be different than current
state or what the consumer requested. This is not currently set by any
producer. The framework automatically copies all properties with prefix
"meta." on a producer to the frame. So, this lets the user add
"meta.top_field_first" to the producer to override the "top_field_first"
property a producer sets on a frame.
meta.swap_fields
This provides another way for a user to tell the fieldorder filter to
If you set the property meta.swap_fields=1 on the producer, then this
filter swaps the fields of an interlaced frame in addition to any field
order correction by shifting the image.
thanks for explanation - that makes some my issues clear... page with
this text at https://www.mltframework.org/docs/ will be helpful for me
and others....
Post by Maksym Veremeyenko
It is doing field-based rendering, meaning the interpolation of the
geometry can factor in time and motion from one field to the next within
a single frame's image (writing both fields interleaved within a single
image).
i understand it clear, i rather was interesting in keywords *Assuming
lower field first*. i definitely though all processing was as
lower-field-first for historical reason, like YUYV.
--
Maksym Veremeyenko
Loading...