GNOME Bugzilla – Bug 726376
x265enc: Add x265 encoder element
Last modified: 2014-10-15 16:50:04 UTC
This patch adds the x265enc element. As x265 is based on x264, the code of this element is based on x264enc.
Created attachment 271949 [details] [review] add x265enc element
Review of attachment 271949 [details] [review]: Thanks for the patch :) Just a very short review for now ::: configure.ac @@ +818,3 @@ IGraphBuilder *pGraph = NULL; HRESULT hr = CoInitialize(NULL); + hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, Please remove all these whitespace changes from the diff :) ::: ext/x265/gstx265enc.c @@ +171,3 @@ + "width = (int) [ 4, MAX ], " "height = (int) [ 4, MAX ], " + "stream-format = (string) { avc, byte-stream }, " + "alignment = (string) au, " "profile = (string) { main }") The stream formats are hvc1, hev1 and byte-stream. And the caps have profile, level and tier which need to be negotiated. @@ +487,3 @@ +gst_x265_enc_start (GstVideoEncoder * encoder) +{ + //GstX265Enc *x265enc = GST_X265_ENC (encoder); No C99 comments please ::: ext/x265/gstx265enc.h @@ +74,3 @@ + const gchar *peer_profile; + gboolean peer_intra_profile; + /*const x265_level_t *peer_level; */ You should probably have the profile, level and tier here and negotiate them
Created attachment 272277 [details] [review] add x265enc element The comments are fixed in this new patch. * For stream format only bytestream is supported for now, as it is the basic output of the x265 implementation. What is the preferred way to implement other stream formats, (without duplicating too much from the parser). Or should this task be for the parser element? * Basic negotiation of profile/tier/level is implemented. As tier and level is not yet configurable in x265 it just checkes if the downstream caps are acceptable.
gst-plugins-bad Version: 1.3.3 x265 version: default branch - 7026 when I ported to this version, the gstreamer pipeline exit with an error as follows: libv4l2: error dequeuing buf: invalid parameter 0:00:07.790512136 6151 0xad55e0 ERROR v4l2allocator gstv4l2allocator.c:1326:gst_v4l2_allocator_dqbuf:<v4l2src0:pool:src:allocator> failed dequeuing a mmap buffer: invalid parameter 0:00:07.790559574 6151 0xad55e0 ERROR v4l2allocator gstv4l2allocator.c:1338:gst_v4l2_allocator_dqbuf:<v4l2src0:pool:src:allocator> The buffer type is not supported, or the index is out of bounds, or no buffers have been allocated yet, or the userptr or length are invalid. 0:00:07.790596821 6151 0xad55e0 WARN v4l2src gstv4l2src.c:736:gst_v4l2src_create:<v4l2src0> error: Failed to allocate a buffer
(In reply to comment #4) > gst-plugins-bad > Version: 1.3.3 > x265 version: default branch - 7026 > > when I ported to this version, the gstreamer pipeline exit with an error as > follows: > > libv4l2: error dequeuing buf: invalid parameter > 0:00:07.790512136 6151 0xad55e0 ERROR v4l2allocator > gstv4l2allocator.c:1326:gst_v4l2_allocator_dqbuf:<v4l2src0:pool:src:allocator> > failed dequeuing a mmap buffer: invalid parameter > 0:00:07.790559574 6151 0xad55e0 ERROR v4l2allocator > gstv4l2allocator.c:1338:gst_v4l2_allocator_dqbuf:<v4l2src0:pool:src:allocator> > The buffer type is not supported, or the index is out of bounds, or no buffers > have been allocated yet, or the userptr or length are invalid. > 0:00:07.790596821 6151 0xad55e0 WARN v4l2src > gstv4l2src.c:736:gst_v4l2src_create:<v4l2src0> error: Failed to allocate a > buffer This looks unrelated, check if this is the same as, bug #732288, otherwise create a bug. Meanwhile, use videotestsrc for your tests.
Created attachment 287971 [details] [review] add x265enc element Fixed a few bugs related to different behaviour in newer x265 releases.
Commit: f241294662f3b48c10e527e9949aa2449e51739a Author: Thijs Vermeir <thijsvermeir@gmail.com> Date: Wed Mar 5 16:39:30 2014 +0100 x265enc: add x265 encoder element