Commit graph

186 commits

Author SHA1 Message Date
Tim-Philipp Müller
f18b1f7e80 deinterlace: fix on-the-fly changing of "mode" and "fields" properties
We call setcaps() to reconfigure ourselves, but we need to pass
the current *sink* caps, not the source caps then. Also fix a
caps leak.

https://bugzilla.gnome.org/show_bug.cgi?id=641599
2013-07-22 18:00:16 +01:00
Sebastian Dröge
048866f1b1 Release 1.1.1 2013-06-05 18:31:40 +02:00
Sebastian Dröge
ecc6c607ff deinterlace: The return value of gst_pad_set_caps() is not relevant anymore
Caps can fail to be set because the pad is not linked yet for example.
2013-05-22 17:34:07 +02:00
Sebastian Dröge
5c8bb90262 deinterlace: Improve handling of min/max buffer numbers of the buffer pool 2013-05-14 09:45:12 +02:00
Matej Knopp
30c00f4fb7 deinterlace: set caps for buffer pool config 2013-05-14 09:38:24 +02:00
Sebastian Dröge
b0b0557c48 gst: Add better support for static plugins 2013-04-15 15:54:11 +02:00
Matej Knopp
67c2219687 deinterlace: force deinterlacing in "interlaced" mode
https://bugzilla.gnome.org/show_bug.cgi?id=697467
2013-04-07 20:48:21 +01:00
Kishore Arepalli
288e05c99d deinterlace: fix infinite loop on EOS with non-default methods or fields
Fixes problem of infinite loop in gst_deinterlace_reset_history.
Last field in the history was never deinterlaced because idx becomes negative.

Happens e.g. with method=scalerbob fields=bottom or
method=greedyl fields=top

https://bugzilla.gnome.org/show_bug.cgi?id=695644
https://bugzilla.gnome.org/show_bug.cgi?id=693173
2013-03-17 14:47:26 +00:00
Thijs Vermeir
df88341ffb deinterlace: use appropriate printf format for gsize 2012-12-18 16:02:09 +01:00
Wim Taymans
abd7e33db6 deinterlace: add support for strides
Implement stride support correctly by taking it from the GstVideoFrame.
Propose a bufferpool upstream when not operating in passthrough.
2012-12-11 13:00:46 +01:00
Tim-Philipp Müller
230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Robert Swain
03e5376827 deinterlace: Add some useful debug logging 2012-09-25 17:05:37 +02:00
Robert Swain
33dd81569f deinterlace: Fix telecine
This only affects behaviour in telecine cases with pattern locking
enabled. The default case should be untouched.

This works with the output from fieldanalysis at least, but the field
order looks swapped for telecine mixed buffers with the
David_slides_Schleef clip.
2012-09-25 17:04:54 +02:00
Robert Swain
480b894642 deinterlace: Remove incorrect logic
I don't understand why these lines were added, they don't make sense to
me now and both David and I agree that removing them moves closer to
related logic being correct, therefore, they're being removed.

I've tested a few progressive, interlaced and telecine clips and they
all behave properly timestamp-wise and visually after these changes.
2012-09-19 00:39:01 +02:00
Robert Swain
a35a931555 deinterlace: Fix field duration
The frame rate fraction is correctly adjusted in the cases preceding the
field duration calculation and so the factor of 2 is incorrect.
2012-09-19 00:17:49 +02:00
Jan Schmidt
a27deda053 deinterlace: Don't treat every custom-downstream event as EOS
Don't fall through to the EOS handling after receiving a
custom-downstream event.
2012-09-12 12:23:08 -07:00
Wim Taymans
1c64a91a50 deinterlace: improve framerate transform
Handle G_MAXINT in the framerates better. If we cannot double or divide the
framerate, clamp to the smallest/largest possible value we can express instead
of failing.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=683861
2012-09-12 13:28:07 +02:00
Wim Taymans
6d9f9bf11a deinterlace: small cleanup 2012-09-12 13:17:54 +02:00
Wim Taymans
ecaa2624d3 deinterlace: remove redundant _set_allocation call 2012-09-06 17:09:20 +02:00
Mark Nauwelaerts
1ce09d7ef9 deinterlace: plug some leaks 2012-09-06 17:05:49 +02:00
Wim Taymans
510482b01a deinterlace: reuse core function for GCD 2012-09-06 16:52:18 +02:00
Mark Nauwelaerts
9d4579b38a deinterlace: support filter in getcaps 2012-09-06 16:31:17 +02:00
Mark Nauwelaerts
a4458f5f74 deinterlace: do not leak getcaps result 2012-09-06 16:31:17 +02:00
Wim Taymans
45e5ec29ac deinterlace: add support for bufferpool
Add bufferpool support to avoid a memcpy in the videosink when actively
interlacing.
Remove some commented obsolete code.
2012-09-06 16:25:05 +02:00
Wim Taymans
f59fb16f58 deinterlace: proxy allocation query in passthrough
We can let the allocation query pass when we are operating in passthrough mode.
2012-09-06 13:38:52 +02:00
Wim Taymans
4efdbc97a5 deinterlace: use default event functions
instead of blindly forwarding unknown events.
2012-09-06 13:23:46 +02:00
Wim Taymans
a557282aaa deinterlace: small cleanups 2012-09-06 13:23:30 +02:00
Wim Taymans
f1ef3b4983 deinterlace: call default query handlers
Call the default query handler instead of forwarding the query blindly. Fixes
issues of strides because of proxying the allocation query wrongly.
2012-09-06 12:56:30 +02:00
Tim-Philipp Müller
4bb52bbadf docs: gst-launch -> gst-launch-1.0 and ffmpegcolorspace -> videoconvert 2012-08-27 21:20:30 +01:00
Tim-Philipp Müller
045c4b6ec8 deinterlace: the field in caps is "interlace-mode" not "interlace-method"
Fix deinterlace unit test. Need to set right field on output caps.
Also remove right field (not old 0.10 "interlaced" boolean field)
from caps in unit test before comparing old and new.
2012-08-27 21:20:29 +01:00
Tim-Philipp Müller
0d148d9c6f deinterlace: fix not-negotiated errors on variable or missing framerate in input caps
Remove some bogus code I added during porting that would error out
on missing or variable framerates in input caps. Handle this like
we do in 0.10

Fixes test_mode_disabled_passthrough unit test check.
2012-08-14 01:20:19 +01:00
Tim-Philipp Müller
0e6b66a2a0 gst: update disted orc files 2012-08-08 15:10:37 +01:00
Robert Swain
cc4941797d deinterlace: Fix timestamp adjustment and caps 2012-07-26 16:04:23 +02:00
Robert Swain
01016109d0 deinterlace: Fix/simplify telecine state checks 2012-07-26 16:03:57 +02:00
Robert Swain
db5bb81e36 deinterlace: Improve debug output 2012-07-26 12:31:52 +02:00
Robert Swain
f20d8f59c8 deinterlace: Fix low-latency pattern locking 2012-07-26 12:31:52 +02:00
Robert Swain
30a61f26ba deinterlace: RFF should be ignored in deinterlace
RFF only occurs on progressive frames in telecine sequences. For
deinterlace, we don't want these repeated fields as we will simply be
pushing the progressive frame and then moving on.

However, we need to consider RFF in order to correctly identify patterns
and adjust the timestamps.
2012-07-26 12:31:52 +02:00
Robert Swain
7c0af11fca deinterlace: Improve process logic
The logic now works better if we filter orphans, then progressive, then
telecine interlaced fields which need to be woven and fall through to
interlace. Telecine interlaced fields will be regularly deinterlaced if
there is no pattern lock for us to be sure that we have a telecine
pattern.

Telecine sequences that aren't 24fps progressive with RFF flags can't
really be tested until fieldanalysis is ported.
2012-07-26 12:31:52 +02:00
Wim Taymans
7fdd607561 deinterlace: get frame flags correctly
Also move the deinterlace plugin to ported status
2012-07-23 15:50:18 +02:00
Robert Swain
eac172c433 deinterlace: Port to 1.0
This requires the additional INTERLACED buffer flag recently added to
-base
2012-07-20 23:23:42 +02:00
Vincent Penquerc'h
fe45881a0f deinterlace: send QoS messages when dropping a frame
https://bugzilla.gnome.org/show_bug.cgi?id=657941
2012-06-12 15:40:37 +01:00
Sebastian Dröge
4784e83938 Release 0.11.90 2012-04-12 10:27:31 +02:00
Tim-Philipp Müller
e09ae5736d Use new gst_element_class_set_static_metadata() 2012-04-10 00:51:41 +01:00
Sebastian Dröge
aa2cd462da gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 17:36:38 +02:00
Sebastian Dröge
5cdd49bf25 gst: Update versioning 2012-04-04 14:37:47 +02:00
Wim Taymans
c44cd8f55b Merge branch 'master' into 0.11
unport gdkpixbuf
not merged: https://bugzilla.gnome.org/show_bug.cgi?id=654850

Conflicts:
	docs/plugins/Makefile.am
	docs/plugins/gst-plugins-good-plugins-docs.sgml
	docs/plugins/gst-plugins-good-plugins-sections.txt
	docs/plugins/gst-plugins-good-plugins.hierarchy
	docs/plugins/inspect/plugin-avi.xml
	docs/plugins/inspect/plugin-png.xml
	ext/flac/gstflacdec.c
	ext/flac/gstflacdec.h
	ext/libpng/gstpngdec.c
	ext/libpng/gstpngenc.c
	ext/speex/gstspeexdec.c
	gst/audioparsers/gstflacparse.c
	gst/flv/gstflvmux.c
	gst/rtp/gstrtpdvdepay.c
	gst/rtp/gstrtph264depay.c
2012-03-22 11:53:24 +01:00
Sebastian Dröge
dad2a52f62 deinterlace: Fix 'variable 'oldbx' is uninitialized when used here' compiler warnings 2012-03-06 13:21:12 +01:00
Sebastian Dröge
4d55588e35 deinterlace: Fix 'implicit conversion from enumeration type 'GstDeinterlaceFields' to different enumeration type 'GstDeinterlaceMode'' compiler warning 2012-03-06 13:19:24 +01:00
Sebastian Dröge
10554b271f Merge branch 'master' into 0.11
Conflicts:
	ext/flac/gstflacdec.c
	ext/jpeg/gstjpegenc.c
	ext/pulse/pulsesink.c
	sys/v4l2/gstv4l2src.c
2012-01-25 12:49:11 +01:00
Mark Nauwelaerts
9d771c9bed deinterlace: fix arithmetic for unsigned comparison 2012-01-20 17:10:33 +01:00
Vincent Penquerc'h
4d51c68fc0 deinterlace: make interlacedness test deterministic
If the interlaced flag is not present in the caps, we assume the
data is not interlaced, instead of leaving the boolean uninitialized.
2012-01-16 12:13:50 +00:00
Vincent Penquerc'h
c0e101e93f various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:30:27 +00:00
Jan Schmidt
3b03db5e40 deinterlace: Don't pointlessly hold object lock over caps operations
Avoids a deadlock when getcaps is recursive due to the getcaps being
reflected upstream/downstream. The lock isn't actually protecting
anything here.
2011-10-28 00:41:45 +11:00
René Stadler
dcd493279d deinterlace: remove avoidable call to gst_object_set_name 2011-10-21 22:32:38 +02:00
David Schleef
0446787e65 deinterlace: change field handling through methods
This likely breaks stuff.  The good: all of the methods now create
field images aligned with input frames, without timestamp mangling.
The bad: this touches a lot of code, much of which is hairy and in
need of cleanup.  However, at this point we can reasonably create a
PSNR-based test.
2011-08-21 15:15:14 -07:00
Mart Raudsepp
62cd1215c7 deinterlace: Fix Since tags for fieldanalysis related new properties
commit c1b100cf9c is after 0.10.29 and 0.10.30 was a branched release.
So fix Since tags from 0.10.29 to 0.10.31 for the new properties.
2011-08-02 23:38:13 +01:00
Miguel Angel Cabrera Moya
16d71c7d96 deinterlace: fix parameter type in trace
https://bugzilla.gnome.org/show_bug.cgi?id=650937
2011-05-24 09:45:31 +02:00
Robert Swain
c1b100cf9c deinterlace: Add support for deinterlacing using buffer caps/flags
When not using the fieldanalysis element immediately upstream of deinterlace,
behaviour should remain unchanged. fieldanalysis will set the caps and flags on
the buffers such that they can be interpreted and acted upon to produce
progressive output.

There are two main modes of operation:

- Passive pattern locking
  Passive pattern locking is a non-blocking, low-latency mode of operation that
  is suitable for close-to-live usage. Initially a telecine stream will be
  output as variable framerate with naïve timestamp adjustment. With each
  incoming buffer, an attempt is made to lock onto a pattern. When a lock is
  obtained, the src pad and output buffer caps will reflect the pattern and
  timestamps will be accurately interpolated between pattern repeats. This
  means that initially and at pattern transitions there will be short periods
  of inaccurate timestamping.

- Active pattern locking
  Active pattern locking is a blocking, high-latency mode of operation that is
  targeted at use-cases where timestamp accuracy is paramount. Buffers will be
  queued until enough are present to make a lock. When locked, timestamps will
  be accurately interpolated between pattern repeats. Orphan fields can be
  dropped or deinterlaced. If no lock can be obtained, a single field might be
  pushed through to be deinterlaced.

Locking can also be disabled or 'auto' chooses between passive and active
locking modes depending on whether upstream is live.
2011-05-19 05:45:57 +02:00
Tim-Philipp Müller
9be707d54d gst: update disted orc backup code 2011-04-16 18:49:27 +01:00
Tim-Philipp Müller
c2bc6327cd deinterlace, matroska: fix two variable-may-be-used-uninitialized compiler warnings
We use -DG_DISABLE_ASSERT for the pre-releases, which makes these
warnings pop up in cases that were previously covered by g_assert_not_reached()
and the like:
tvtime/greedyh.c:801:14: warning: 'scanline' may be used uninitialized in this function
matroska-mux.c:501:19: warning: 'context' may be used uninitialized in this function
2011-04-16 16:51:32 +01:00
Thibault Saunier
b541208b77 android: Make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 01:20:11 +02:00
Sebastian Dröge
88cbcf5aa4 deinterlace: Add support for NV21 colorspace 2011-02-24 14:08:25 +01:00
Carsten Kroll
ce0e34a0d5 deinterlace: Add support for NV12 colorspace
Fixes bug #642961.
2011-02-24 14:00:37 +01:00
Robert Swain
6607cdcc08 deinterlace: Simplify setcaps
The current code never uses upstream negotiation so the code can be
significantly simplified.
2011-02-23 13:09:19 +01:00
Robert Swain
6402556157 deinterlace: Port greedyl to GstDeinterlaceSimpleMethod
The main goal of this change is to reuse the complex but now neatly
written scanline pointer calculation code from the simple methods.
2011-02-23 13:09:19 +01:00
Robert Swain
6b26017ae7 deinterlace: small clean-ups
Improve debug output by printing the buffer pointer when
popping a buffer and simplify code to use scanlines.bottom_field
as appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=642691
2011-02-21 20:14:19 +00:00
Robert Swain
32f757786b deinterlace: fix assigned method_id when using fallback
https://bugzilla.gnome.org/show_bug.cgi?id=642691
2011-02-21 20:14:09 +00:00
Thiago Santos
cb527623a3 deinterlace: Handle image caps without asserting
Images might have framerate=0/1 in the caps, which caused an
assertion on deinterlace. I don't know of interlaced image formats
but deinterlace might be hardcoded on some generic pipelines and
it shouldn't assert.

The fix was to set field_duration to 0 if the input has a framerate
with a 0 numerator.

This patch also adds checks for this situation on the unit tests.

https://bugzilla.gnome.org/show_bug.cgi?id=641400
2011-02-04 09:38:35 -03:00
Tim-Philipp Müller
ede0635d45 deinterlace: simplify template caps
We can merge all the YUV variants into one single structure.
2011-01-31 13:44:45 +00:00
David Schleef
c2b343cd76 deinterlace: rewrite how neighboring scan lines are calculated
Old code was difficult to understand exactly how the neighboring
scan lines are calculated, and it appeared that some were off by
+2 or -2, depending on the field flag.  Fixes #639321.
2011-01-18 11:04:08 +01:00
David Schleef
97d74f293c deinterlace: Change the default to linear
The previous default, greedyh, takes 4 times as long as MPEG-2
video decoding, and is unlikely fast enough on any current CPU
to play 1080i video in real-time.  greedyl isn't much faster.
linear was chosen over vfir, since the quality advantage of vfir
is minimal compared to the occasional visual artifacts and slower
processing.
2011-01-05 17:50:09 -08:00
Sebastian Dröge
76ad0ee09b deinterlace: Change classification to Filter/Effect/Video/Deinterlace 2010-12-16 10:04:19 +01:00
Jan Schmidt
9941d3f0a2 deinterlace: Avoid infinite loop draining frames
When the pipeline is flushed just as we're draining history,
don't loop infinitely, just discard the history and abort.
2010-12-12 10:15:13 +11:00
David Schleef
b27d93a84a deinterlace: analyse RFF fields in correct order
Code was repeating the second field, not the first.
Fixes: #636179.
2010-11-30 17:28:00 -08:00
Tim-Philipp Müller
baacc9952a deinterlace: fix reference leak 2010-11-14 00:18:16 +00:00
Jan Schmidt
89a24bd36f deinterlace: Flush QoS and history before applying segment
When handling newsegment, flush out the buffer history in the
existing segment, not the new one. Fixes playback in some DVD
cases.

Partially fixes #633294
2010-11-12 13:21:09 +00:00
Tim-Philipp Müller
5adbc1e4c0 deinterlace: improve event logging 2010-11-12 12:20:16 +00:00
Robert Swain
9be159b32c deinterlace: Implement field history flushing
In a number of cases it is necessary to flush the field history by
performing 'degraded' deinterlacing - that is, using the user-chosen
method for as many fields as possible, then using vfir for as long as
there are >= 2 fields remaining in the history, then using linear for
the last field.

This should avoid losing fields being kept for history for example at
EOS.

This may address part of #633294
2010-11-12 10:40:51 +00:00
Robert Swain
5a56274cba deinterlace: Refactor chain function
This is needed to be able to output a frame from outside the chain
function, i.e. in the following commit that adds flushing of the field
history.
2010-11-12 10:40:48 +00:00
David Schleef
e9d4710cc8 Update generated orc code 2010-10-15 14:02:57 -07:00
Robert Swain
6a6f90e745 deinterlace: Fix required fields logic
Both history_count and fields_required count from 1. As per the while loop
condition that follows this code, to perform the deinterlacing method, we need
history_count >= fields_required fields in the history. Therefore if we have
history_count < fields_required (not fields_required + 1), we need more fields.
2010-10-06 15:05:36 +02:00
David Schleef
738e092d4e deinterlace: Document methods with bad quality 2010-09-05 22:23:58 -07:00
David Schleef
9071cc8748 deinterlace: initialize all deinterlace class members
This fixes UYVY deinterlacing.
2010-09-05 22:23:58 -07:00
David Schleef
6143a60bdb deinterlace: Fix greedyl Orc implementation
To agree with the previous C/asm code.
2010-09-05 18:42:59 -07:00
David Schleef
6584c75afe deinterlace: Update disted Orc files 2010-09-04 12:46:31 -07:00
David Schleef
f35d546c71 deinterlace: remove assembly code in favor of orc 2010-09-04 12:39:11 -07:00
David Schleef
02196850dd deinterlace: implement greedy in Orc 2010-09-04 12:39:11 -07:00
David Schleef
294d5c48da update disted Orc files 2010-09-04 11:43:21 -07:00
Tim-Philipp Müller
b26897dd84 Release 0.10.25 2010-09-02 23:44:19 +01:00
David Schleef
4eee45debb deinterlace: use separate buffer metadata for fields
Call gst_buffer_make_metadata_writable() on buffers that are
duplicated into fields.  Fixes #627689.
2010-08-23 02:51:24 -07:00
Sebastian Dröge
9e981f6c2d 0.10.24.4 pre-release 2010-08-21 21:41:36 +02:00
Tim-Philipp Müller
240dec038c gst: update orc files 2010-06-26 18:41:49 +01:00
Sebastian Dröge
a11b271bf4 deinterlace: Call orc_init() before trying to get target flags 2010-06-14 15:38:02 +02:00
David Schleef
9ff3ef0c92 deinterlace: orcify some deinterlacing methods 2010-06-08 17:25:34 -07:00
David Schleef
f14972bf20 deinterlace: convert from liboil to orc 2010-06-08 17:25:34 -07:00
Mark Nauwelaerts
69d47ef4a0 deinterlace: avoid gtk-doc confusing comments 2010-06-01 15:56:25 +02:00
Sebastian Dröge
d09ff4124e deinterlace: Don't reconfigure the caps when changing properties
Fixes bug #619848.
2010-06-01 11:21:30 +02:00
Sebastian Dröge
dc6dd62824 deinterlace: Add MMX/3DNow implementations of greedyh for UYVY 2010-06-01 11:21:29 +02:00
Sebastian Dröge
2096cf6e55 deinterlace: Fix UYVY implementation of greedyh to be actually used 2010-06-01 11:21:29 +02:00
Sebastian Dröge
a9ed56b1ad deinterlace: Add support for UYVY 2010-05-07 20:41:31 +02:00