x264enc: Change accepted caps width and height from [16, MAX] to [1, MAX]

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>
This commit is contained in:
David Fernandez 2018-02-26 17:28:25 +01:00 committed by Nicolas Dufresne
parent 4d4b82ffdc
commit 828d1d0d18
2 changed files with 3 additions and 3 deletions

View file

@ -1198,7 +1198,7 @@
"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"
},

View 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);