Commit 6e7bf32e authored by Thomas Guillem's avatar Thomas Guillem

hw: vaapi: merge chroma and filters libraries

parent 2d37a81d
......@@ -418,10 +418,9 @@ $Id$
* uleaddvaudio: codec for DV Audio from Ulead
* upnp: libupnp UPNP service discovery
* v4l2: Video 4 Linux 2 input module
* vaapi_chroma: VAAPI chroma conversion
* vaapi_dr: VAAPI hardware-accelerated decoding with vout backend (direct rendering)
* vaapi_drm: VAAPI hardware-accelerated decoding with drm backend
* vaapi_filters: VAAPI hardware-accelerated deinterlacing/adjust/sharpen/chroma filters
* vaapi_filters: VAAPI hardware-accelerated deinterlacing/chroma/adjust/sharpen/chroma filters
* vaapi_x11: VAAPI hardware-accelerated decoding with x11 backend
* vc1: VC-1 Video demuxer
* vcd: input module for accessing Video CDs
......
vaapidir = $(pluginsdir)/vaapi
libvaapi_chroma_plugin_la_SOURCES = hw/vaapi/chroma.c hw/vaapi/vlc_vaapi.c hw/vaapi/vlc_vaapi.h \
video_chroma/copy.c video_chroma/copy.h
libvaapi_chroma_plugin_la_CFLAGS = $(AM_CFLAGS) $(LIBVA_CFLAGS)
libvaapi_chroma_plugin_la_LIBADD = $(AM_LIBADD) $(LIBVA_LIBS)
libvaapi_filters_plugin_la_SOURCES = hw/vaapi/filters.c \
hw/vaapi/vlc_vaapi.c hw/vaapi/vlc_vaapi.h \
hw/vaapi/chroma.c video_chroma/copy.c video_chroma/copy.h
libvaapi_filters_plugin_la_SOURCES = hw/vaapi/filters.c hw/vaapi/vlc_vaapi.c hw/vaapi/vlc_vaapi.h
libvaapi_filters_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
libvaapi_filters_plugin_la_CFLAGS = $(AM_CFLAGS) $(LIBVA_CFLAGS)
libvaapi_filters_plugin_la_LIBADD = $(AM_LIBADD) $(LIBVA_LIBS)
if HAVE_VAAPI
vaapi_LTLIBRARIES = libvaapi_chroma_plugin.la \
libvaapi_filters_plugin.la
vaapi_LTLIBRARIES = libvaapi_filters_plugin.la
endif
......@@ -33,7 +33,7 @@
#include <vlc_plugin.h>
#include "../../video_chroma/copy.h"
#include "vlc_vaapi.h"
#include "filters.h"
# define DEST_PICS_POOL_SZ 3
......@@ -50,18 +50,6 @@ struct filter_sys_t
VAImage image_fallback;
};
static int Open(vlc_object_t *obj);
static void Close(vlc_object_t *obj);
vlc_module_begin()
set_shortname(N_("VAAPI"))
set_description(N_("VAAPI surface conversions"))
set_capability("video converter", 10)
set_category(CAT_VIDEO)
set_subcategory(SUBCAT_VIDEO_VFILTER)
set_callbacks(Open, Close)
vlc_module_end()
static int CreateFallbackImage(filter_t *filter, picture_t *src_pic)
{
filter_sys_t *const filter_sys = filter->p_sys;
......@@ -265,7 +253,8 @@ error:
goto ret;
}
static int Open(vlc_object_t *obj)
int
vlc_vaapi_OpenChroma(vlc_object_t *obj)
{
filter_t *const filter = (filter_t *)obj;
filter_sys_t * filter_sys;
......@@ -348,8 +337,8 @@ static int Open(vlc_object_t *obj)
return VLC_SUCCESS;
}
static void
Close(vlc_object_t *obj)
void
vlc_vaapi_CloseChroma(vlc_object_t *obj)
{
filter_sys_t *const filter_sys = ((filter_t *)obj)->p_sys;
......
......@@ -30,7 +30,7 @@
#include <vlc_atomic.h>
#include <vlc_filter.h>
#include <vlc_plugin.h>
#include "vlc_vaapi.h"
#include "filters.h"
/********************************
* Common structures and macros *
......@@ -1021,9 +1021,9 @@ vlc_module_begin()
"Set the Denoise strength, between 0 and 2. "
"Defaults to 1.",
false)
add_shortcut("denoise")
add_shortcut("denoise", "sharpen")
add_submodule()
set_callbacks(OpenBasicFilter, CloseBasicFilter)
add_shortcut("sharpen")
set_capability("video converter", 10)
set_callbacks(vlc_vaapi_OpenChroma, vlc_vaapi_CloseChroma)
vlc_module_end()
/*****************************************************************************
* filters.h: VAAPI filters helper for VLC
*****************************************************************************
* Copyright (C) 2017 VLC authors, VideoLAN and VideoLabs
*
* Authors: Thomas Guillem <thomas@gllm.fr>
* Petri Hintukainen <phintuka@gmail.com>
* Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_VAAPI_FILTERS_H
# define VLC_VAAPI_FILTERS_H
#include "vlc_vaapi.h"
/* chroma filters callbacks */
int vlc_vaapi_OpenChroma(vlc_object_t *obj);
void vlc_vaapi_CloseChroma(vlc_object_t *obj);
#endif /* VLC_VAAPI_FILTERS_H */
......@@ -912,7 +912,6 @@ modules/hw/vdpau/chroma.c
modules/hw/vdpau/deinterlace.c
modules/hw/vdpau/display.c
modules/hw/vdpau/sharpen.c
modules/hw/vaapi/chroma.c
modules/hw/vaapi/filters.c
modules/keystore/keychain.m
modules/lua/demux.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment