mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
qsv: Add support for HEVC encoding
main and main-10 profiles are supported for now Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
This commit is contained in:
parent
3a7e4635bb
commit
278908ce96
4 changed files with 1254 additions and 0 deletions
1214
subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp
Normal file
1214
subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp
Normal file
File diff suppressed because it is too large
Load diff
34
subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.h
Normal file
34
subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.h
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/* GStreamer
|
||||||
|
* Copyright (C) 2021 Seungha Yang <seungha@centricular.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 <gst/gst.h>
|
||||||
|
#include <gst/video/video.h>
|
||||||
|
#include "gstqsvencoder.h"
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
void gst_qsv_h265_enc_register (GstPlugin * plugin,
|
||||||
|
guint rank,
|
||||||
|
guint impl_index,
|
||||||
|
GstObject * device,
|
||||||
|
mfxSession session);
|
||||||
|
|
||||||
|
G_END_DECLS
|
|
@ -2,6 +2,7 @@ qsv_sources = [
|
||||||
'gstqsvallocator.cpp',
|
'gstqsvallocator.cpp',
|
||||||
'gstqsvencoder.cpp',
|
'gstqsvencoder.cpp',
|
||||||
'gstqsvh264enc.cpp',
|
'gstqsvh264enc.cpp',
|
||||||
|
'gstqsvh265enc.cpp',
|
||||||
'gstqsvutils.cpp',
|
'gstqsvutils.cpp',
|
||||||
'gstqsvvp9enc.cpp',
|
'gstqsvvp9enc.cpp',
|
||||||
'plugin.cpp',
|
'plugin.cpp',
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <mfx.h>
|
#include <mfx.h>
|
||||||
#include "gstqsvutils.h"
|
#include "gstqsvutils.h"
|
||||||
#include "gstqsvh264enc.h"
|
#include "gstqsvh264enc.h"
|
||||||
|
#include "gstqsvh265enc.h"
|
||||||
#include "gstqsvvp9enc.h"
|
#include "gstqsvvp9enc.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -42,6 +43,7 @@ GST_DEBUG_CATEGORY (gst_qsv_debug);
|
||||||
GST_DEBUG_CATEGORY (gst_qsv_allocator_debug);
|
GST_DEBUG_CATEGORY (gst_qsv_allocator_debug);
|
||||||
GST_DEBUG_CATEGORY (gst_qsv_encoder_debug);
|
GST_DEBUG_CATEGORY (gst_qsv_encoder_debug);
|
||||||
GST_DEBUG_CATEGORY (gst_qsv_h264_enc_debug);
|
GST_DEBUG_CATEGORY (gst_qsv_h264_enc_debug);
|
||||||
|
GST_DEBUG_CATEGORY (gst_qsv_h265_enc_debug);
|
||||||
GST_DEBUG_CATEGORY (gst_qsv_vp9_enc_debug);
|
GST_DEBUG_CATEGORY (gst_qsv_vp9_enc_debug);
|
||||||
|
|
||||||
#define GST_CAT_DEFAULT gst_qsv_debug
|
#define GST_CAT_DEFAULT gst_qsv_debug
|
||||||
|
@ -217,6 +219,8 @@ plugin_init (GstPlugin * plugin)
|
||||||
"gstqsvallocator", 0, "gstqsvallocator");
|
"gstqsvallocator", 0, "gstqsvallocator");
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_qsv_h264_enc_debug,
|
GST_DEBUG_CATEGORY_INIT (gst_qsv_h264_enc_debug,
|
||||||
"qsvh264enc", 0, "qsvh264enc");
|
"qsvh264enc", 0, "qsvh264enc");
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_qsv_h265_enc_debug,
|
||||||
|
"qsvh265enc", 0, "qsvh265enc");
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_qsv_vp9_enc_debug, "qsvvp9enc", 0, "qsvvp9enc");
|
GST_DEBUG_CATEGORY_INIT (gst_qsv_vp9_enc_debug, "qsvvp9enc", 0, "qsvvp9enc");
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -243,6 +247,7 @@ plugin_init (GstPlugin * plugin)
|
||||||
goto next;
|
goto next;
|
||||||
|
|
||||||
gst_qsv_h264_enc_register (plugin, GST_RANK_NONE, i, device, session);
|
gst_qsv_h264_enc_register (plugin, GST_RANK_NONE, i, device, session);
|
||||||
|
gst_qsv_h265_enc_register (plugin, GST_RANK_NONE, i, device, session);
|
||||||
gst_qsv_vp9_enc_register (plugin, GST_RANK_NONE, i, device, session);
|
gst_qsv_vp9_enc_register (plugin, GST_RANK_NONE, i, device, session);
|
||||||
|
|
||||||
next:
|
next:
|
||||||
|
|
Loading…
Reference in a new issue