x264enc: Change accepted caps width and height from [16, MAX] to [1, MAX]
authorDavid Fernandez <d.fernandezlop@gmail.com>
Mon, 26 Feb 2018 16:28:25 +0000 (17:28 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 5 May 2021 20:29:13 +0000 (16:29 -0400)
There are cases where the video size might be less than 16x16.
This change allows the x264 encoder to accept this cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/44>

docs/gst_plugins_cache.json
ext/x264/gstx264enc.c

index fb6d824d4fa4c4feb26a2e84b3fd715555214080..e3290a1a922e7a09c0af0226e599f0bd16ea9fb3 100644 (file)
                 "long-name": "x264enc",
                 "pad-templates": {
                     "sink": {
-                        "caps": "video/x-raw:\n      framerate: [ 0/1, 2147483647/1 ]\n          width: [ 16, 2147483647 ]\n         height: [ 16, 2147483647 ]\n         format: { Y444, Y42B, I420, YV12, NV12, Y444_10LE, I422_10LE, I420_10LE }\n",
+                        "caps": "video/x-raw:\n      framerate: [ 0/1, 2147483647/1 ]\n          width: [ 1, 2147483647 ]\n         height: [ 1, 2147483647 ]\n         format: { Y444, Y42B, I420, YV12, NV12, Y444_10LE, I422_10LE, I420_10LE }\n",
                         "direction": "sink",
                         "presence": "always"
                     },
index 07dff7222fba3899ecfead14baca67f0f204659e..38571db9887394720dd1ebd33e0d58e7b68966bb 100644 (file)
@@ -1202,8 +1202,8 @@ gst_x264_enc_class_init (GstX264EncClass * klass)
 
   supported_sinkcaps = gst_caps_new_simple ("video/x-raw",
       "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1,
-      "width", GST_TYPE_INT_RANGE, 16, G_MAXINT,
-      "height", GST_TYPE_INT_RANGE, 16, G_MAXINT, NULL);
+      "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+      "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
 
   gst_x264_enc_add_x264_chroma_format (gst_caps_get_structure
       (supported_sinkcaps, 0), TRUE, TRUE, TRUE, TRUE);