summaryrefslogtreecommitdiffstats
path: root/libhb/qsv_libav.h
diff options
context:
space:
mode:
authorTim Walker <[email protected]>2016-04-01 06:12:31 +0200
committerJohn Stebbins <[email protected]>2016-12-17 07:28:51 -0800
commit5b48deb11f450de5d26f37cbe08a6272b6bb1e5b (patch)
treed2b464d074fdd35b920ef7d55d731cbad54c52e7 /libhb/qsv_libav.h
parentac6c1ab005cad9c78bb427aad7be6c9af6d22816 (diff)
libhb: fix build with --enable-qsv
Convert qsv_livav.[ch] to be built within libhb. Convert other files to use qsv_libav.h in place of libavcodec/qsv.h Don't attempt to build libav with QSV support (not available in unpatched release/11 branch). QSV-accelerated decoding is broken, so disable it for the time being.
Diffstat (limited to 'libhb/qsv_libav.h')
-rw-r--r--libhb/qsv_libav.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/libhb/qsv_libav.h b/libhb/qsv_libav.h
index 971e6a4b3..bd6caf7ed 100644
--- a/libhb/qsv_libav.h
+++ b/libhb/qsv_libav.h
@@ -26,8 +26,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\* ********************************************************************* */
-#ifndef AVCODEC_QSV_H
-#define AVCODEC_QSV_H
+#ifndef HB_QSV_LIBAV_H
+#define HB_QSV_LIBAV_H
/**
* @file
@@ -120,11 +120,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libavutil/mem.h"
#include "libavutil/time.h"
-#ifdef HAVE_AV_CONFIG_H
-#include "config.h"
-#endif
-
-#if HAVE_THREADS
#if defined (__GNUC__)
#include <pthread.h>
#define ff_qsv_atomic_inc(ptr) __sync_add_and_fetch(ptr,1)
@@ -138,13 +133,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#define ff_qsv_atomic_inc(ptr) InterlockedIncrement(ptr)
#define ff_qsv_atomic_dec(ptr) InterlockedDecrement (ptr)
-#else
-// targeting only for MinGW or MSVC
-#endif
-
-#else
-#define ff_qsv_atomic_inc(ptr) ((*ptr)++)
-#define ff_qsv_atomic_dec(ptr) ((*ptr)--)
#endif
@@ -202,9 +190,7 @@ typedef enum AV_QSV_STAGE_TYPE {
typedef struct av_qsv_list {
// practically pthread_mutex_t
void *mutex;
-#if HAVE_THREADS
pthread_mutexattr_t mta;
-#endif
void **items;
int items_alloc;
@@ -491,4 +477,4 @@ void *av_qsv_list_item(av_qsv_list *, int);
/* @} */
-#endif //AVCODEC_QSV_H
+#endif // HB_QSV_LIBAV_H