va: Add H264 encoder.

This a new VA-API implementation of a H264 encoder.

It can control the GOP and parameter settings, while the MV searching,
VCL and the rate control algorithm are implemented by VA drivers and HW.
It supports most of the common usage options in H264, but still lacks
of look ahead, field, B frame weighted prediction, etc.

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
This commit is contained in:
He Junyan 2021-10-05 01:51:48 +08:00 committed by Víctor Manuel Jáquez Leal
parent 736a0ac9b0
commit f17357f759
3 changed files with 4533 additions and 1 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,34 @@
/* GStreamer
* Copyright (C) 2021 Intel Corporation
* Author: He Junyan <junyan.he@intel.com>
* Author: Víctor Jáquez <vjaquez@igalia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#pragma once
#include "gstvadevice.h"
G_BEGIN_DECLS
gboolean gst_va_h264_enc_register (GstPlugin * plugin,
GstVaDevice * device,
GstCaps * sink_caps,
GstCaps * src_caps,
guint rank);
G_END_DECLS

View file

@ -20,7 +20,8 @@ va_sources = [
'gstvavp9dec.c',
'gstvampeg2dec.c',
'gstvavpp.c',
'vasurfaceimage.c',
'gstvah264enc.c',
'vasurfaceimage.c'
]
if host_system != 'linux'