mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gst/deinterlace2/gstdeinterlace2.c: Respect the latency of the deinterlacing algorithm for the timestamps of every bu...
Original commit message from CVS: * gst/deinterlace2/gstdeinterlace2.c: (gst_deinterlace2_chain): Respect the latency of the deinterlacing algorithm for the timestamps of every buffer.
This commit is contained in:
parent
0783e91c54
commit
8cbe2b9912
2 changed files with 22 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-08-02 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/deinterlace2/gstdeinterlace2.c: (gst_deinterlace2_chain):
|
||||||
|
Respect the latency of the deinterlacing algorithm for the timestamps
|
||||||
|
of every buffer.
|
||||||
|
|
||||||
2008-08-02 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2008-08-02 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
* gst/deinterlace2/tvtime/greedyh.asm:
|
* gst/deinterlace2/tvtime/greedyh.asm:
|
||||||
|
|
|
@ -592,9 +592,14 @@ gst_deinterlace2_chain (GstPad * pad, GstBuffer * buf)
|
||||||
/* do magic calculus */
|
/* do magic calculus */
|
||||||
gst_deinterlace_method_deinterlace_frame (self->method, self);
|
gst_deinterlace_method_deinterlace_frame (self->method, self);
|
||||||
|
|
||||||
buf = gst_deinterlace2_pop_history (self);
|
g_assert (self->history_count - 1 -
|
||||||
|
gst_deinterlace_method_get_latency (self->method) >= 0);
|
||||||
|
buf =
|
||||||
|
self->field_history[self->history_count - 1 -
|
||||||
|
gst_deinterlace_method_get_latency (self->method)].buf;
|
||||||
timestamp = GST_BUFFER_TIMESTAMP (buf);
|
timestamp = GST_BUFFER_TIMESTAMP (buf);
|
||||||
gst_buffer_unref (buf);
|
|
||||||
|
gst_buffer_unref (gst_deinterlace2_pop_history (self));
|
||||||
|
|
||||||
GST_BUFFER_TIMESTAMP (self->out_buf) = timestamp;
|
GST_BUFFER_TIMESTAMP (self->out_buf) = timestamp;
|
||||||
if (self->fields == GST_DEINTERLACE2_ALL)
|
if (self->fields == GST_DEINTERLACE2_ALL)
|
||||||
|
@ -611,8 +616,7 @@ gst_deinterlace2_chain (GstPad * pad, GstBuffer * buf)
|
||||||
else if (self->field_history[cur_field_idx].flags ==
|
else if (self->field_history[cur_field_idx].flags ==
|
||||||
PICTURE_INTERLACED_TOP && self->fields == GST_DEINTERLACE2_BF) {
|
PICTURE_INTERLACED_TOP && self->fields == GST_DEINTERLACE2_BF) {
|
||||||
GST_DEBUG ("Removing unused top field");
|
GST_DEBUG ("Removing unused top field");
|
||||||
buf = gst_deinterlace2_pop_history (self);
|
gst_buffer_unref (gst_deinterlace2_pop_history (self));
|
||||||
gst_buffer_unref (buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_field_idx = self->history_count - fields_required;
|
cur_field_idx = self->history_count - fields_required;
|
||||||
|
@ -635,9 +639,14 @@ gst_deinterlace2_chain (GstPad * pad, GstBuffer * buf)
|
||||||
/* do magic calculus */
|
/* do magic calculus */
|
||||||
gst_deinterlace_method_deinterlace_frame (self->method, self);
|
gst_deinterlace_method_deinterlace_frame (self->method, self);
|
||||||
|
|
||||||
buf = gst_deinterlace2_pop_history (self);
|
g_assert (self->history_count - 1 -
|
||||||
|
gst_deinterlace_method_get_latency (self->method) >= 0);
|
||||||
|
buf =
|
||||||
|
self->field_history[self->history_count - 1 -
|
||||||
|
gst_deinterlace_method_get_latency (self->method)].buf;
|
||||||
timestamp = GST_BUFFER_TIMESTAMP (buf);
|
timestamp = GST_BUFFER_TIMESTAMP (buf);
|
||||||
gst_buffer_unref (buf);
|
|
||||||
|
gst_buffer_unref (gst_deinterlace2_pop_history (self));
|
||||||
|
|
||||||
GST_BUFFER_TIMESTAMP (self->out_buf) = timestamp;
|
GST_BUFFER_TIMESTAMP (self->out_buf) = timestamp;
|
||||||
if (self->fields == GST_DEINTERLACE2_ALL)
|
if (self->fields == GST_DEINTERLACE2_ALL)
|
||||||
|
@ -655,8 +664,7 @@ gst_deinterlace2_chain (GstPad * pad, GstBuffer * buf)
|
||||||
else if (self->field_history[cur_field_idx].flags ==
|
else if (self->field_history[cur_field_idx].flags ==
|
||||||
PICTURE_INTERLACED_BOTTOM && self->fields == GST_DEINTERLACE2_TF) {
|
PICTURE_INTERLACED_BOTTOM && self->fields == GST_DEINTERLACE2_TF) {
|
||||||
GST_DEBUG ("Removing unused bottom field");
|
GST_DEBUG ("Removing unused bottom field");
|
||||||
buf = gst_deinterlace2_pop_history (self);
|
gst_buffer_unref (gst_deinterlace2_pop_history (self));
|
||||||
gst_buffer_unref (buf);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue