Edward Hervey
ff57f69134
video: Fix non-default usage of gst_video_sink_center_rect
...
Make sure we take into account non-0 x/y destination rectangles
2014-12-15 14:11:07 +01:00
Sebastian Dröge
ee2418effd
video: Update disted orc source files
2014-12-12 10:02:43 +01:00
Sebastian Dröge
3fc5791b3f
Revert "video-converter: Fix compiler warning because of missing prototype of non-static function"
...
This reverts commit 406f32a946
.
The problem was apparently that my video-orc.h was not updated and did not
include the prototype for that function. Only a "make clean" caused it to
be regenerated.
2014-12-12 10:01:36 +01:00
Sebastian Dröge
406f32a946
video-converter: Fix compiler warning because of missing prototype of non-static function
...
video-converter.c:838:1: error: no previous prototype for function
'_custom_video_orc_matrix8' [-Werror,-Wmissing-prototypes]
2014-12-12 09:51:05 +01:00
Thiago Santos
2034e5c153
videodecoder: do not use fixed caps on source pad
...
decoders can change the caps on their source pads, so they don't
use fixed caps. Having fixed caps can cause renegotiation issues.
2014-12-11 17:35:03 -03:00
Wim Taymans
903ba19593
video-orc: make RGB pack/unpack faster
...
Avoid all the merging and splitting and use a pair of shifts and or
2014-12-10 16:43:34 +01:00
Jan Schmidt
6e492304dd
videodecoder: Add GST_VIDEO_DECODER_CAST macro
...
It's used in some macros already, so let's make it exist.
2014-12-11 01:53:15 +11:00
Wim Taymans
a0b8e96b77
video-converter: set bits and format after conversion
...
Update the current format, bits and pstride.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741187
2014-12-06 21:05:00 +01:00
Thiago Santos
5db596495b
video-converter: free dither_lines
...
Avoid a memory leak
2014-12-05 22:23:55 -03:00
Wim Taymans
4ffd723c95
video-converter: use custom backup function
...
Use the new orc feature to set a custom backup function.
2014-12-05 14:51:28 +01:00
Wim Taymans
04e9a8dcc5
video-converter: improve matrix8 function
...
Avoid using a constant.
Avoid doing saturated adds, results are not supposed to overflow here.
Rework the C backup function a little in preparation for custom backup
functions in ORC.
See https://bugzilla.gnome.org/show_bug.cgi?id=741015
2014-12-05 12:20:26 +01:00
Wim Taymans
e2a693656b
video-converter: fix chroma resampling check
...
Decide if we need chroma resampling by checking if we have a progressive
or interlaced chroma resampler.
2014-12-03 10:17:29 +01:00
Wim Taymans
6757296386
video-converter: only do dithering when needed
...
Only do dithering when one of the quantizers is > 1.
2014-12-03 10:17:29 +01:00
Wim Taymans
fc1d24ec45
video-scaler: add where orc functions could go
...
Add the disabled orc functions in #if 0 lines for when we can enable
them.
2014-12-02 15:11:12 +01:00
Wim Taymans
d03136f1ea
video-converter: add dithering
...
Use the new dither object to perform dithering.
Add option to select dithering method.
Add option to quantize to a specific value
2014-12-02 15:10:49 +01:00
Wim Taymans
dfb202a117
video-converter: add palette when needed
2014-12-02 15:10:49 +01:00
Wim Taymans
0f2be22e76
video-dither: add video dither helper object
...
Add a new object that implements various dithering methods.
2014-12-02 15:10:43 +01:00
Sebastian Dröge
90eb93c2ef
Don't compare booleans for equality to TRUE and FALSE
...
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Sebastian Dröge
afcc0b3c50
video-frame: Mapping a frame with inconsistent values between GstVideoMeta and GstVideoInfo is a bug
...
It will cause the frame to be initialized with inconsistent values that then
later can cause crashes or any other kind of interesting and hard to debug
bugs.
2014-11-28 10:27:28 +01:00
Tim-Philipp Müller
57811331de
video-blend: make use of x offset when unpacking overlay image pixels
...
Now that it's implemented we can use it, which is a minor
optimisation when the image to overlay gets cropped on the
left.
2014-11-27 15:29:48 +00:00
Tim-Philipp Müller
60d18149e5
video-format: sprinkle some 'restrict' keywords in pack/unpack functions
...
In cases where we just call orc directly this is somewhat
superfluous, but let's do it anyway for consistency. In
other cases the compiler can hopefully use this to optimise
memory access a little.
2014-11-27 15:04:12 +00:00
Wim Taymans
52d4dd1cb0
video-format: handle x offset in unpack
...
Add support for x offset in almost all unpack methods.
Fix naming of source and dest pixels.
Add const to source pixels.
2014-11-27 13:01:03 +01:00
Wim Taymans
a3da634db6
video-format: improve unpack i420
...
unpack_i420 does not need extra code to handle odd widths, the orc code
already handles it fine.
2014-11-27 10:51:58 +01:00
Wim Taymans
0e3bfbd996
video-scale: combine adds when max_taps equals combine size
...
When the amount of pixels/lines matches the amount we can combine,
combine the adds and multiplies and do the scale as a separate
operation.
2014-11-25 17:42:07 +01:00
Wim Taymans
74e63fa660
video-scaler: combine scaling operations
...
Combine add and scale of multiple lines/pixels to reduce the amount of
read and writes to temporary memory.
2014-11-25 17:27:07 +01:00
Wim Taymans
b1eb3b7d81
video-resampler: remove print
2014-11-25 10:36:13 +01:00
Wim Taymans
1d55bde5bb
video-resampler: improve variable taps
...
Improve quality of variable taps on all methods by reusing the lanczos
parameters where possible.
2014-11-25 10:34:02 +01:00
Wim Taymans
721bbcad34
video-resampler: Fix lanczos parameters for variable taps
...
when using variable taps and when we are limiting the number of taps,
recalculate the lanczos parameters to match the clamped value.
Set the max number of taps to 128
2014-11-25 10:34:02 +01:00
Wim Taymans
db304a446b
video-converter: keep track of required temp lines
...
Make a small object to hold a pool of allocated temp lines.
Keep track of how many temp lines each conversion stage needs and use
this to allocate just enough temp lines from the temp lines object. from
the temp lines object.
2014-11-24 12:52:26 +01:00
Wim Taymans
e182abcf79
video-converter: use err line in fastpath
...
Use the error line for temporary storage in the fastpath so that we
don't have to allocate any other temp lines.
2014-11-24 12:52:26 +01:00
Matej Knopp
9d349d8831
videoencoder: don't complain about PTS != DTS on keyframes
...
It is valid for streams with b-frames
https://bugzilla.gnome.org/show_bug.cgi?id=740556
2014-11-22 16:12:16 -05:00
Wim Taymans
b9bee1af8c
video-converter: handle mixed interlaced
...
When dealing with mixed interlaced, setup a scaler and chroma-resampler
for both interlaced and progressive frames and switch between them
depending on the interlace mode of the input frame.
2014-11-21 16:06:54 +01:00
Wim Taymans
0358e23baf
video-converter: Cleanup options parsing
...
Cleanup option parsing
Add some debug
2014-11-21 16:04:11 +01:00
Wim Taymans
d001b10f29
video-converter: there is no need to apply x offset to temp lines
2014-11-21 15:59:47 +01:00
Wim Taymans
1a3e8395bb
video-scaler: ensure both fields have the same number of taps
2014-11-21 15:58:34 +01:00
Wim Taymans
eefdba6dbd
video-converter: rework the options a little
...
Rework the options a little to make it nicer to set defaults.
2014-11-21 11:15:04 +01:00
Wim Taymans
7b7270ecff
video-resampler: add option to limits taps
...
Add an option to limit the number of taps to use in automatic mode. The
problem is that for lanczos, we might use more taps than what we can
handle with the current precision.
Rework the other options a little to make it nicer to set defaults.
2014-11-21 11:12:50 +01:00
Wim Taymans
6620ab9d31
video: update orc files
2014-11-20 18:20:28 +01:00
Sebastian Dröge
823f170fac
video-converter: Use correct enum, GstVideoFormat instead of GstFormat
2014-11-19 14:38:03 +01:00
Wim Taymans
9647a8ca78
video-converter: fix size check
...
Add some debug, fix size check that decides what scaling to do first and
when to do conversion.
2014-11-19 13:25:13 +01:00
Wim Taymans
23adc12e02
video-converter: avoid primaries conversion when asked
...
Don't do conversion between primaries when the option is disabled.
Only do some matrix code when needed.
2014-11-19 12:55:03 +01:00
Wim Taymans
f6683b8f14
video-info: add a note about subsampled formats
...
Add a note about gst_video_info_set_format() and interlaced formats.
2014-11-19 12:55:03 +01:00
Wim Taymans
24989b53fc
video-info: handle interlaced size correctly
...
Refactor GstVideoInfo init, make function to set default colorimetry.
Call fill_planes after we configure the GstVideoInfo with parameters
from the caps.
The size of the chroma planes for interlaced vertically subsampled
formats needs to be rounded up to 2, we have 2 fields with each
the same anount of chroma lines.
2014-11-19 12:55:03 +01:00
Wim Taymans
8f43cc67d5
video-color: return FALSE on unparsable colorimetry
2014-11-19 12:55:02 +01:00
Wim Taymans
5c043f3d50
video-format: handle unpack interlaced subsampled formats
...
For interlaced vertically subsampled formats the check for even lines
needs to take into account the two fields.
2014-11-19 12:55:02 +01:00
Wim Taymans
588fdeb834
video-scaler: fix interlaced shift
2014-11-19 12:55:02 +01:00
Wim Taymans
ac756ba0d9
video-converter: keep a small backlog of lines
...
Allow lines to jump backwards slightly, usefull for interlaced content.
2014-11-19 12:55:02 +01:00
Wim Taymans
b911434716
video-chroma: Fix interlaced chroma resampling
...
Use the interlaced flag to select the right resampler.
2014-11-19 12:55:02 +01:00
Wim Taymans
d6ed383c6f
video: add some more debuging
2014-11-19 12:55:02 +01:00
Wim Taymans
7d0cef3bcb
video-scaler: fix interlacing some more
...
Use the right phase.
Take the right lines from interlaced content.
2014-11-19 12:55:02 +01:00