Commit d779d8d7 authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit 'a001ce31'

* commit 'a001ce31':
  hwcontext: add a VDPAU implementation
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents 1a708780 a001ce31
...@@ -19,6 +19,8 @@ API changes, most recent first: ...@@ -19,6 +19,8 @@ API changes, most recent first:
xxxxxxx buffer.h - Add av_buffer_pool_init2(). xxxxxxx buffer.h - Add av_buffer_pool_init2().
xxxxxxx hwcontext.h - Add a new installed header hwcontext.h with a new API xxxxxxx hwcontext.h - Add a new installed header hwcontext.h with a new API
for handling hwaccel frames. for handling hwaccel frames.
xxxxxxx hwcontext_vdpau.h - Add a new installed header hwcontext_vdpau.h with
VDPAU-specific hwcontext definitions.
-------- 8< --------- FFmpeg 3.0 was cut here -------- 8< --------- -------- 8< --------- FFmpeg 3.0 was cut here -------- 8< ---------
......
...@@ -32,6 +32,7 @@ HEADERS = adler32.h \ ...@@ -32,6 +32,7 @@ HEADERS = adler32.h \
hash.h \ hash.h \
hmac.h \ hmac.h \
hwcontext.h \ hwcontext.h \
hwcontext_vdpau.h \
imgutils.h \ imgutils.h \
intfloat.h \ intfloat.h \
intreadwrite.h \ intreadwrite.h \
...@@ -150,6 +151,7 @@ OBJS-$(!HAVE_ATOMICS_NATIVE) += atomic.o \ ...@@ -150,6 +151,7 @@ OBJS-$(!HAVE_ATOMICS_NATIVE) += atomic.o \
OBJS-$(CONFIG_LZO) += lzo.o OBJS-$(CONFIG_LZO) += lzo.o
OBJS-$(CONFIG_OPENCL) += opencl.o opencl_internal.o OBJS-$(CONFIG_OPENCL) += opencl.o opencl_internal.o
OBJS-$(CONFIG_VDPAU) += hwcontext_vdpau.o
OBJS += $(COMPAT_OBJS:%=../compat/%) OBJS += $(COMPAT_OBJS:%=../compat/%)
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
#include "pixfmt.h" #include "pixfmt.h"
static const HWContextType *hw_table[] = { static const HWContextType *hw_table[] = {
#if CONFIG_VDPAU
&ff_hwcontext_type_vdpau,
#endif
NULL, NULL,
}; };
......
...@@ -86,4 +86,6 @@ struct AVHWFramesInternal { ...@@ -86,4 +86,6 @@ struct AVHWFramesInternal {
AVBufferPool *pool_internal; AVBufferPool *pool_internal;
}; };
extern const HWContextType ff_hwcontext_type_vdpau;
#endif /* AVUTIL_HWCONTEXT_INTERNAL_H */ #endif /* AVUTIL_HWCONTEXT_INTERNAL_H */
This diff is collapsed.
/*
* This file is part of FFmpeg.
*
* FFmpeg 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.
*
* FFmpeg 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 FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVUTIL_HWCONTEXT_VDPAU_H
#define AVUTIL_HWCONTEXT_VDPAU_H
#include <vdpau/vdpau.h>
/**
* @file
* An API-specific header for AV_HWDEVICE_TYPE_VDPAU.
*
* This API supports dynamic frame pools. AVHWFramesContext.pool must return
* AVBufferRefs whose data pointer is a VdpVideoSurface.
*/
/**
* This struct is allocated as AVHWDeviceContext.hwctx
*/
typedef struct AVVDPAUDeviceContext {
VdpDevice device;
VdpGetProcAddress *get_proc_address;
} AVVDPAUDeviceContext;
/**
* AVHWFramesContext.hwctx is currently not used
*/
#endif /* AVUTIL_HWCONTEXT_VDPAU_H */
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