va: Implement the VA h266 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5865>
This commit is contained in:
parent
0ce5fe3cc9
commit
e25ca874e1
@ -24,6 +24,7 @@
|
||||
#include <gst/codecs/gstav1decoder.h>
|
||||
#include <gst/codecs/gsth264decoder.h>
|
||||
#include <gst/codecs/gsth265decoder.h>
|
||||
#include <gst/codecs/gsth266decoder.h>
|
||||
#include <gst/codecs/gstmpeg2decoder.h>
|
||||
#include <gst/codecs/gstvp8decoder.h>
|
||||
#include <gst/codecs/gstvp9decoder.h>
|
||||
@ -55,6 +56,7 @@ struct _GstVaBaseDec
|
||||
{
|
||||
GstH264Decoder h264;
|
||||
GstH265Decoder h265;
|
||||
GstH266Decoder h266;
|
||||
GstMpeg2Decoder mpeg2;
|
||||
GstVp8Decoder vp8;
|
||||
GstVp9Decoder vp9;
|
||||
@ -100,6 +102,7 @@ struct _GstVaBaseDecClass
|
||||
{
|
||||
GstH264DecoderClass h264;
|
||||
GstH265DecoderClass h265;
|
||||
GstH266DecoderClass h266;
|
||||
GstMpeg2DecoderClass mpeg2;
|
||||
GstVp8DecoderClass vp8;
|
||||
GstVp9DecoderClass vp9;
|
||||
|
1316
subprojects/gst-plugins-bad/sys/va/gstvah266dec.c
Normal file
1316
subprojects/gst-plugins-bad/sys/va/gstvah266dec.c
Normal file
File diff suppressed because it is too large
Load Diff
29
subprojects/gst-plugins-bad/sys/va/gstvah266dec.h
Normal file
29
subprojects/gst-plugins-bad/sys/va/gstvah266dec.h
Normal file
@ -0,0 +1,29 @@
|
||||
/* GStreamer
|
||||
* Copyright (C) 2023 He Junyan <junyan.he@intel.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_h266_dec_register (GstPlugin * plugin, GstVaDevice * device,
|
||||
GstCaps * sink_caps, GstCaps * src_caps, guint rank);
|
||||
|
||||
G_END_DECLS
|
@ -118,6 +118,13 @@ static const struct ProfileMap
|
||||
P (AV1, Profile1, "high", "video/x-av1", "profile = (string) high"),
|
||||
P (HEVC, SccMain444_10, "screen-extended-main-444-10", "video/x-h265",
|
||||
"profile = (string) screen-extended-main-444-10"),
|
||||
#if VA_CHECK_VERSION(1, 22, 0)
|
||||
Q (VVC, Main10, "main-10", "video/x-h266", "profile = (string) main-10",
|
||||
"profile = (string) { main-10, main-10-still-picture }"),
|
||||
Q (VVC, MultilayerMain10, "multilayer-main-10", "video/x-h266",
|
||||
"profile = (string) multilayer-main-10",
|
||||
"profile = (string) { multilayer-main-10, multilayer-main-10-still-picture }"),
|
||||
#endif
|
||||
#undef O
|
||||
#undef P
|
||||
#undef Q
|
||||
|
@ -31,6 +31,7 @@ typedef enum
|
||||
H263 = GST_MAKE_FOURCC ('H', '2', '6', '3'),
|
||||
H264 = GST_MAKE_FOURCC ('H', '2', '6', '4'),
|
||||
HEVC = GST_MAKE_FOURCC ('H', '2', '6', '5'),
|
||||
VVC = GST_MAKE_FOURCC ('H', '2', '6', '6'),
|
||||
JPEG = GST_MAKE_FOURCC ('J', 'P', 'E', 'G'),
|
||||
MPEG2 = GST_MAKE_FOURCC ('M', 'P', 'E', 'G'),
|
||||
MPEG4 = GST_MAKE_FOURCC ('M', 'P', 'G', '4'),
|
||||
|
@ -74,6 +74,10 @@ va_av1enc_sources = [
|
||||
'gstvaav1enc.c'
|
||||
]
|
||||
|
||||
va_h266dec_sources = [
|
||||
'gstvah266dec.c'
|
||||
]
|
||||
|
||||
doc_sources = []
|
||||
foreach s: va_sources + va_linux_sources + va_win32_sources + va_av1enc_sources + va_headers
|
||||
doc_sources += meson.current_source_dir() / s
|
||||
@ -124,6 +128,10 @@ if libva_dep.version().version_compare('>= 1.15')
|
||||
va_sources += va_av1enc_sources
|
||||
endif
|
||||
|
||||
if libva_dep.version().version_compare('>= 1.22')
|
||||
va_sources += va_h266dec_sources
|
||||
endif
|
||||
|
||||
gstva = library('gstva',
|
||||
va_sources,
|
||||
c_args : gst_plugins_bad_args + extra_args,
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "gstvah264enc.h"
|
||||
#include "gstvah265dec.h"
|
||||
#include "gstvah265enc.h"
|
||||
#include "gstvah266dec.h"
|
||||
#include "gstvajpegdec.h"
|
||||
#include "gstvajpegenc.h"
|
||||
#include "gstvampeg2dec.h"
|
||||
@ -124,6 +125,15 @@ plugin_register_decoders (GstPlugin * plugin, GstVaDevice * device,
|
||||
device->render_device_path);
|
||||
}
|
||||
break;
|
||||
#if VA_CHECK_VERSION(1, 22, 0)
|
||||
case VVC:
|
||||
if (!gst_va_h266_dec_register (plugin, device, sinkcaps, srccaps,
|
||||
GST_RANK_NONE)) {
|
||||
GST_WARNING ("Failed to register H266 decoder: %s",
|
||||
device->render_device_path);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case VP8:
|
||||
if (!gst_va_vp8_dec_register (plugin, device, sinkcaps, srccaps,
|
||||
GST_VA_RANK_PRIMARY)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user