va: Add HEVC decoding support

This add HEVC decoding support into the new VA plugin. This implementation has
been tested using the ITU comformance test (through fluster). It fails all
MAIN10 tests, as this is not implemented yet along with the following:

CONFWIN_A_Sony_1 (looks fine, but md5sum is incorrect)
PICSIZE_A_Bossen_1 (height too high)
PICSIZE_B_Bossen_1 (same)
VPSSPSPPS_A_MainConcept_1 (parser issue)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1714>
This commit is contained in:
Nicolas Dufresne 2020-10-21 09:01:31 -04:00 committed by GStreamer Merge Bot
parent 6f556518c8
commit 2950c76c8f
5 changed files with 1123 additions and 0 deletions

View file

@ -22,6 +22,7 @@
#pragma once
#include <gst/codecs/gsth264decoder.h>
#include <gst/codecs/gsth265decoder.h>
#include <gst/codecs/gstvp8decoder.h>
#include <gst/codecs/gstvp9decoder.h>
@ -44,6 +45,7 @@ struct _GstVaBaseDec
union
{
GstH264Decoder h264;
GstH265Decoder h265;
GstVp8Decoder vp8;
GstVp9Decoder vp9;
} parent;
@ -77,6 +79,7 @@ struct _GstVaBaseDecClass
union
{
GstH264DecoderClass h264;
GstH265DecoderClass h265;
GstVp8DecoderClass vp8;
GstVp9DecoderClass vp9;
} parent_class;

1076
sys/va/gstvah265dec.c Normal file

File diff suppressed because it is too large Load diff

35
sys/va/gstvah265dec.h Normal file
View file

@ -0,0 +1,35 @@
/* GStreamer
* Copyright (C) 2020 Igalia, S.L.
* Author: Víctor Jáquez <vjaquez@igalia.com>
* Copyright (C) 2020 Collabora
* Author: Nicolas Dufresne <nicolas.dufresne@collabora.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_h265_dec_register (GstPlugin * plugin,
GstVaDevice * device,
GstCaps * sink_caps,
GstCaps * src_caps,
guint rank);
G_END_DECLS

View file

@ -10,6 +10,7 @@ va_sources = [
'gstvadevice.c',
'gstvafilter.c',
'gstvah264dec.c',
'gstvah265dec.c',
'gstvapool.c',
'gstvaprofile.c',
'gstvautils.c',

View file

@ -30,6 +30,7 @@
#include "gstvacaps.h"
#include "gstvadevice.h"
#include "gstvah264dec.h"
#include "gstvah265dec.h"
#include "gstvaprofile.h"
#include "gstvavp8dec.h"
#include "gstvavp9dec.h"
@ -98,6 +99,13 @@ plugin_register_decoders (GstPlugin * plugin, GstVaDevice * device,
device->render_device_path);
}
break;
case HEVC:
if (!gst_va_h265_dec_register (plugin, device, sinkcaps, srccaps,
GST_RANK_NONE)) {
GST_WARNING ("Failed to register H265 decoder: %s",
device->render_device_path);
}
break;
case VP8:
if (!gst_va_vp8_dec_register (plugin, device, sinkcaps, srccaps,
GST_RANK_NONE)) {