Commit graph

1582 commits

Author SHA1 Message Date
Sebastian Dröge
53416af4f0 video-anc: Add Since: 1.16 marker 2019-04-23 12:28:26 +00:00
Sebastian Dröge
fd68d5516e videoaggregator: Add Since: 1.16 markers to all public structs 2019-04-23 12:28:26 +00:00
Sebastian Dröge
31e1c8745c video-anc: Add DID16 value for SMPTE 2016-3 AFD/Bar data 2019-04-23 11:25:05 +00:00
Sebastian Dröge
cbccda6f3b video-anc: Handle SD formats correctly
VANC is stored linearly in SD formats instead of separating the Y and YV
components from each other and having first all Y and then all UV
values.
2019-04-23 11:25:05 +00:00
Aaron Boxer
a397a36b75 video-anc: revert "add support for Bar and AFD meta-data"
This reverts commit 8759c36851.
GstMeta may not be the appropriate vehicle for this information
2019-04-10 16:09:19 -04:00
Guillaume Desmottes
e397c4cea1 video-info: explain in logs why colorimetry are rejected
It wasn't clear from the logs why some colorimetry format were rejected.
2019-04-09 13:22:12 +05:30
Mathieu Duponchelle
951b951188 gstvideometa: fix annotation 2019-04-08 21:54:00 +02:00
Tim-Philipp Müller
c701d17f12 video-anc: fix g-i complaints
video-anc.h💯 Error: GstVideo: identifier not found on the first line:
 *  Active Format Description (AFD) support
   ^
video-anc.h:207: Error: GstVideo: identifier not found on the first line:
 *  Bar data support
   ^
video-anc.h:228: Warning: GstVideo: "@top_bar_flag" parameter unexpected at this location:
 * @top_bar_flag : flag indicating presence of top bar field
    ^
2019-04-07 22:08:37 +01:00
Aaron Boxer
8759c36851 video-anc: add support for Bar and AFD meta-data 2019-04-07 14:58:42 -04:00
Haihao Xiang
3b6415b421 video: add BGR10A2_LE pixel format
This pixel format is a packed 4:4:4 RGB with alpha channel (B-G-R-A),
R/G/B channel has 10 bits and alpha channel is the MSB 2 bits.
2019-04-04 01:59:18 +00:00
Mathieu Duponchelle
abed7c2d3d gstvideometa: do not emit criticals when adding timecode metas
This is inconsistent with other add_meta methods such as
gst_buffer_add_video_meta , which will return NULL without
logging when gst_video_info_set_format fails.

It is up to the caller to check the return value of the
function, and log if appropriate.
2019-04-03 17:37:10 +02:00
Haihao Xiang
a6afa88812 video: fix unpack_Y410
It should handle data starting from x
2019-03-26 10:24:35 +08:00
Haihao Xiang
4ab04e5dea video: fix unpack_Y210
It should handle data starting from x and width may be an odd
2019-03-26 10:24:35 +08:00
Guillaume Desmottes
10ce73b6eb video-info: check if alternate caps has the feature as well
It's invalid to have a 'interlace-mode=alternate' without the Interlaced caps
feature as well.
Modify gst_video_info_from_caps() to reject such case so we can easily
spot them in bugged elements.
2019-03-25 15:36:57 +01:00
Guillaume Desmottes
6ba860021c video-info: handle 'field-order' in alternate mode
The alternate interlace mode may also use the 'field-order' field in caps.
2019-03-25 15:35:46 +01:00
Haihao Xiang
2a45590051 video: update orc generated files for new functions 2019-03-21 23:05:09 +00:00
Haihao Xiang
90f8cca04e video: add VUYA pixel format
AYUV in gstreamer was defined in A-Y-U-V order in memory[1], however
Microsoft defined another AYUV format in V-U-Y-A order in memory[2]. Add
VUYA format for the latter in order to distinguish the two formats

[1] https://gstreamer.freedesktop.org/documentation/design/mediatype-video-raw.html#formats
[2] https://docs.microsoft.com/en-us/windows/desktop/medfound/recommended-8-bit-yuv-formats-for-video-rendering#ayuv)
2019-03-21 23:05:09 +00:00
Guillaume Desmottes
2e939afd73 video-color: add more color primaries formats
They correspond to index 10, 11, 12 and 22 from ITU-T H.273,
Table 2 – Interpretation of colour primaries (ColourPrimaries) value
2019-03-12 16:53:54 +01:00
Mathieu Duponchelle
a35d500eae videoaggregator: fix buffer skipping with pad offsets
The ->skip_buffer implementation in videoaggregator replicates
the behaviour of the aggregate method to determine whether a
buffer can be skipped
(https://bugzilla.gnome.org/show_bug.cgi?id=781928).

This fixes a typo that made it so the start time of the buffer
was calculated against the output segment, not the segment of
the relevant sinkpad, which caused buffers to be skipped when
for example a sinkpad had received a segment which base had
been modified by a pad offset somewhere along the way.

This simply makes the calculation of the buffer start time
identical to the calculation in aggregate()
2019-03-08 07:40:25 +00:00
Olivier Crête
6a8c15f3bd video-aggregator: Sync property values to output timestamp
The properties need to be change at every output frame based on the output
time because they may change even though the input frame is not changing.
2019-03-07 14:43:06 -05:00
Tim-Philipp Müller
81ccfdd6fd video: fix pipeline leak in gst_video_convert_sample_async() 2019-03-06 10:04:48 +00:00
Nicolas Dufresne
3f3719da41 videooverlay: Fix render-rectangle range
The range was set to -1 to MAXINT, but the x,y value can be negative.
Relax the restriction so that we can now have negative coordinates.
2019-03-04 17:05:04 -05:00
James Cowgill
8f51fba8b5 video-format: Fix GBRA_10/12 alpha channel pixel strides
These formats have 4 components, so they should also have 4 components
of pixel stride.
2019-02-20 09:40:24 +00:00
Guillaume Desmottes
f5a1164590 videodecoder: remove useless code in negotiate_default_caps()
gst_video_decoder_negotiate_default_caps() is meant to pick a default output
format when we need one earlier because of an incoming GAP.
It tries to use the input caps as a base if available and fallback to a default
format (I420 1280x720@30) for the missing fields.

But the framerate and pixel-aspect were not explicitly passed to
gst_video_decoder_set_output_state() which is solely relying on the input format
as reference to get the framerate anx pixel-aspect-ratio.
So there is no need to manually handling those two fields as
gst_video_decoder_set_output_state() will already use the ones from
upstream if available, and they will be ignored anyway if there are not.

This also prevent confusing debugging output where we claim to use a
specific framerate while actually none was set.
2019-02-04 11:53:03 +01:00
Andrew Gall
3a9148b334 video-anc: Fix glib version check for G_GNUC_CHECK_VERSION macro
Fixes #544
2019-01-29 13:58:43 +02:00
George Kiagiadakis
358ed9f9b4 videoaggregator: remove broken rate adjustment
The start_time and end_time in this context have already
been adjusted for the input's rate by converting them to running
time above. What is needed afterwards is to compare these
with the output's start/stop running time, which also takes
into account the rate, so we are comparing equal things.

Multiplying these with the output's rate here is only breaking
this logic. In most cases the input and output rate is the same,
so this multiplication effectively reverses the rate adjustment
that happened while converting to running time, which is why
we see the video playing with the original rate in tests.

Fixes #541
2019-01-18 11:33:33 +01:00
Tim-Philipp Müller
37b56c9735 video-format: minor docs improvement 2019-01-16 00:28:16 +00:00
Wim Taymans
a6552ee02e video-converter: fix number of allocated lines
We make an allocator for temporary lines and then use this for all
the steps in the conversion that can do in-place processing.

Keep track of the number of lines each step needs and use this to
allocate the right number of lines.

Previously we would not always allocate enough lines and we would
end up with conversion errors as lines would be reused prematurely.

Fixes #350
2019-01-11 11:47:51 -05:00
Tim-Philipp Müller
5dc33afbcc video: link to design docs in GstVideoFormat docs
Which is where the memory layout of the various pixel formats
is explained in detail.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/538
2019-01-11 11:24:50 +00:00
Tim-Philipp Müller
a9cf6f238f video: build GstVideoAggregator which was moved from -bad 2018-12-28 12:16:12 +01:00
Tim-Philipp Müller
f11571f398 Move GstVideoAggregator, compositor and OpenGL mixers from -bad
Merge branch 'videoaggregator-compositor-glmixers-move'

Fixes #137 and #138.
2018-12-28 12:15:39 +01:00
Sebastian Dröge
acd7010576 videotimecode: Set the DROP_FRAME flag when parsing timecodes with a ,/; from a string
And also add a test for parsing a few valid and invalid timecodes
2018-12-19 23:11:24 +00:00
Sebastian Dröge
571e0abd8a videotimecode: Allow serializing invalid timecodes 2018-12-19 23:11:24 +00:00
Sebastian Dröge
be516c2fbd videotimecode: Allow deserializing invalid timecodes
Timecode strings don't contain a framerate and that has to be provided
first separately before it can be converted into a valid timecode.
2018-12-19 23:11:24 +00:00
Sebastian Dröge
615fa4790f videotimecode: Don't consider 0/1 a valid framerate for timecodes
It breaks all the calculations. While it can make sense during
initialization, there's very little API that can be called with such
timecodes without ending up with wrong results.
2018-12-19 23:11:24 +00:00
Sebastian Dröge
6aa8936eee videotimecode: Remove various unneeded checks 2018-12-19 23:11:24 +00:00
Sebastian Dröge
905dcce61b videotimecode: Fix handling of timecodes without daily jam in gst_video_time_code_to_date_time()
So that it behaves according to documentation.
2018-12-19 23:11:24 +00:00
Sebastian Dröge
17cc4beaa1 videotimecode: Various documentation and annotation fixes 2018-12-19 23:11:24 +00:00
Sebastian Dröge
df14532b0f videotimecode: Add some more guards for function parameters 2018-12-19 23:11:24 +00:00
Sebastian Dröge
c02d3b03c2 videotimecode: Add API for initializing from a GDateTime with validation
The old API would only assert or return an invalid timecode, the new API
returns a boolean or NULL. We can't change the existing API
unfortunately but can at least deprecate it.
2018-12-19 23:11:24 +00:00
Sebastian Dröge
ac6ae25b53 videotimecode: We only support 30000/1001 and 60000/1001 as drop-frame framerates
24000/1001 is *not* a drop-frame framerate.
2018-12-19 23:11:24 +00:00
Sebastian Dröge
ef63c44f41 videotimecode: Fix division by zero in timecode validation function
And add some comments about what exactly we're testing in the
non-trivial cases.
2018-12-19 23:11:24 +00:00
Sebastian Dröge
fbcbbd363b video: Add deprecation macros 2018-12-19 23:11:24 +00:00
Edward Hervey
bb6b518506 video-converter: Remove unused variable/calculation
Since the refactoring in cdd86d025a
calculating the stride was no longer needed in setup_scale.
2018-12-17 12:21:01 +01:00
Edward Hervey
3519b39131 videodecoder: Remove dead assignment
structure is never used afterwards
2018-12-17 12:21:01 +01:00
Sebastian Dröge
fd1a31ee11 video-anc: Add API for converting GstVideoCaptionType from/to GstCaps 2018-12-15 21:31:14 +00:00
Sebastian Dröge
1eb3a20617 video-anc: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A
CEA608_IN_CEA708_RAW is the same format as CEA708_RAW. It's only
difference is that it must contain only CEA608 and a format like this
does not exist in practice. In practice every element that handles raw
cc_data triplets must check each triplet for their actual content and
handle them accordingly.

For CC-only streams a parser could signal the existence of CEA608 and/or
CEA708 inside the caps but for metas this can only potentially be
signalled via the ALLOCATION query for negotiation purposes.

A separate format for this is not very useful and instead it should be a
format qualifier.

CEA608_S334_1A is the format defined by SMPTE S334-1 Annex A and which
is used for transferring CEA608 over SDI instead of CEA708 CDP packets.
2018-12-15 21:31:14 +00:00
Sebastian Dröge
f441b5216e video-overlay-composition: Optimize premultiplication/unpremultiplication loops
Pull in video frame fields into local variables. Without this the
compiler must assume that they could've changed on every use and read
them from memory again.

This reduces the inner loop from 6 memory reads per pixels to 4, and the
number of writes stays at 3.
2018-12-07 19:23:49 +02:00
Wangfei
0ac7d1187b video: add Y410 pixel format.
This pixel format is packed format with 4:4:4 sample. And 10
available bits of Y/U/V and 2 available bits of alpha stored
in 4 Bytes.

Format defined in:
https://docs.microsoft.com/en-us/windows/desktop/medfound/10-bit-and-16-bit-yuv-video-formats
2018-12-01 21:05:36 -05:00
Sebastian Dröge
48460f5ace video: convertframe: Shut down pipeline asynchronously via the thread pool
If we use the main loop it might happen that the caller (e.g. our unit
test) already shut down the loop once the result was received and in
that case the pipeline would never ever be shut down (and our unit test
would hang).
2018-11-30 12:40:19 +02:00