summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-11-12 13:33:26 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-11-12 13:33:26 +0100
commit5876f232eefc4c9f3c3d20918b9ff3808b79af98 (patch)
treed2661d8b469d4a68090143781fc1bb0c68f86f4a /sys
parent7b2368b6dfb0705a7999b610f141c6b618b63fa3 (diff)
downloadgstreamer-plugins-bad-5876f232eefc4c9f3c3d20918b9ff3808b79af98.tar.gz
va: comments to explain code
There are a couple part where code seems, at least to me, a bit oscure or confusing. So let's better add an explanation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1802>
Diffstat (limited to 'sys')
-rw-r--r--sys/va/gstvabasedec.c2
-rw-r--r--sys/va/gstvapool.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/sys/va/gstvabasedec.c b/sys/va/gstvabasedec.c
index 87aa8f5bc..b33e85432 100644
--- a/sys/va/gstvabasedec.c
+++ b/sys/va/gstvabasedec.c
@@ -334,6 +334,8 @@ gst_va_base_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
gst_object_unref (allocator);
gst_object_unref (pool);
+ /* There's no need to chain decoder's method since all what is
+ * needed is done. */
return TRUE;
wrong_caps:
diff --git a/sys/va/gstvapool.c b/sys/va/gstvapool.c
index 18ea59103..9c7a76866 100644
--- a/sys/va/gstvapool.c
+++ b/sys/va/gstvapool.c
@@ -145,7 +145,14 @@ gst_va_pool_set_config (GstBufferPool * pool, GstStructure * config)
vpool->caps_info = caps_info;
vpool->alloc_info = alloc_info;
- /* May adjust the stride alignment based on the real HW alignment */
+ /* May adjust the stride alignment based on the real HW alignment:
+ *
+ * Counts the number of consecutive bits from lower significant
+ * bit. This number is then converted to the notion of alignment in
+ * GStreamer and passed as as constraint in GstVideoAlignment. The
+ * side effect is that the updated GstVideoInfo is now guarantied to
+ * endup with the same stride (ndufresne).
+ */
if (vpool->need_alignment) {
for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&alloc_info); i++) {
gint nth_bit;