From b04d009b0e1a34b717f3d3bbf407aef0c742aff1 Mon Sep 17 00:00:00 2001
From: Anton Khirnov <anton@khirnov.net>
Date: Fri, 13 Mar 2015 07:55:53 +0100
Subject: [PATCH] qsv: rename to qsvdec

This is to avoid conflicts with the upcoming QSV encoding support.
---
 configure                                | 4 ++--
 libavcodec/Makefile                      | 6 +++---
 libavcodec/{qsv.c => qsvdec.c}           | 2 +-
 libavcodec/{qsv_internal.h => qsvdec.h}  | 6 +++---
 libavcodec/{qsv_h264.c => qsvdec_h264.c} | 2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)
 rename libavcodec/{qsv.c => qsvdec.c} (99%)
 rename libavcodec/{qsv_internal.h => qsvdec.h} (95%)
 rename libavcodec/{qsv_h264.c => qsvdec_h264.c} (99%)

diff --git a/configure b/configure
index 3c38a8c4101..9aac7773b0c 100755
--- a/configure
+++ b/configure
@@ -1597,7 +1597,7 @@ CONFIG_EXTRA="
     nettle
     pixblockdsp
     qpeldsp
-    qsv
+    qsvdec
     rangecoder
     riffdec
     riffenc
@@ -1828,7 +1828,7 @@ h263p_encoder_select="h263_encoder"
 h264_decoder_select="cabac golomb h264chroma h264dsp h264pred h264qpel startcode videodsp"
 h264_decoder_suggest="error_resilience"
 h264_qsv_decoder_deps="libmfx"
-h264_qsv_decoder_select="h264_mp4toannexb_bsf h264_parser qsv h264_qsv_hwaccel"
+h264_qsv_decoder_select="h264_mp4toannexb_bsf h264_parser qsvdec h264_qsv_hwaccel"
 hevc_decoder_select="bswapdsp cabac golomb videodsp"
 huffyuv_decoder_select="bswapdsp huffyuvdsp"
 huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 71ebdb841f9..eafc86a8683 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -80,7 +80,7 @@ OBJS-$(CONFIG_MPEGVIDEOENC)            += mpegvideo_enc.o mpeg12data.o  \
                                           mpegvideoencdsp.o
 OBJS-$(CONFIG_PIXBLOCKDSP)             += pixblockdsp.o
 OBJS-$(CONFIG_QPELDSP)                 += qpeldsp.o
-OBJS-$(CONFIG_QSV)                     += qsv.o
+OBJS-$(CONFIG_QSVDEC)                  += qsvdec.o
 OBJS-$(CONFIG_RANGECODER)              += rangecoder.o
 RDFT-OBJS-$(CONFIG_HARDCODED_TABLES)   += sin_tables.o
 OBJS-$(CONFIG_RDFT)                    += rdft.o $(RDFT-OBJS-yes)
@@ -222,7 +222,7 @@ OBJS-$(CONFIG_H264_DECODER)            += h264.o h264_cabac.o h264_cavlc.o \
                                           h264_direct.o h264_loopfilter.o  \
                                           h264_mb.o h264_picture.o h264_ps.o \
                                           h264_refs.o h264_sei.o h264_slice.o
-OBJS-$(CONFIG_H264_QSV_DECODER)        += qsv_h264.o
+OBJS-$(CONFIG_H264_QSV_DECODER)        += qsvdec_h264.o
 OBJS-$(CONFIG_HEVC_DECODER)            += hevc.o hevc_mvs.o hevc_ps.o hevc_sei.o \
                                           hevc_cabac.o hevc_refs.o hevcpred.o    \
                                           hevcdsp.o hevc_filter.o
@@ -719,7 +719,7 @@ SKIPHEADERS                            += %_tablegen.h                  \
 SKIPHEADERS-$(CONFIG_DXVA2)            += dxva2.h dxva2_internal.h
 SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER)  += libschroedinger.h
 SKIPHEADERS-$(CONFIG_MPEG_XVMC_DECODER) += xvmc.h
-SKIPHEADERS-$(CONFIG_QSV)              += qsv.h qsv_internal.h
+SKIPHEADERS-$(CONFIG_QSVDEC)           += qsv.h qsvdec.h
 SKIPHEADERS-$(CONFIG_VAAPI)            += vaapi_internal.h
 SKIPHEADERS-$(CONFIG_VDA)              += vda.h vda_internal.h
 SKIPHEADERS-$(CONFIG_VDPAU)            += vdpau.h vdpau_internal.h
diff --git a/libavcodec/qsv.c b/libavcodec/qsvdec.c
similarity index 99%
rename from libavcodec/qsv.c
rename to libavcodec/qsvdec.c
index eef06046478..03e31c5bc11 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsvdec.c
@@ -34,7 +34,7 @@
 
 #include "avcodec.h"
 #include "internal.h"
-#include "qsv_internal.h"
+#include "qsvdec.h"
 
 int ff_qsv_error(int mfx_err)
 {
diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsvdec.h
similarity index 95%
rename from libavcodec/qsv_internal.h
rename to libavcodec/qsvdec.h
index 8ab149a7971..d12fde28563 100644
--- a/libavcodec/qsv_internal.h
+++ b/libavcodec/qsvdec.h
@@ -20,8 +20,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_QSV_INTERNAL_H
-#define AVCODEC_QSV_INTERNAL_H
+#ifndef AVCODEC_QSVDEC_H
+#define AVCODEC_QSVDEC_H
 
 #include <stdint.h>
 #include <sys/types.h>
@@ -83,4 +83,4 @@ int ff_qsv_decode(AVCodecContext *s, QSVContext *q,
 
 int ff_qsv_close(QSVContext *q);
 
-#endif /* AVCODEC_QSV_INTERNAL_H */
+#endif /* AVCODEC_QSVDEC_H */
diff --git a/libavcodec/qsv_h264.c b/libavcodec/qsvdec_h264.c
similarity index 99%
rename from libavcodec/qsv_h264.c
rename to libavcodec/qsvdec_h264.c
index a482e9c326d..958ce70f9db 100644
--- a/libavcodec/qsv_h264.c
+++ b/libavcodec/qsvdec_h264.c
@@ -33,7 +33,7 @@
 
 #include "avcodec.h"
 #include "internal.h"
-#include "qsv_internal.h"
+#include "qsvdec.h"
 #include "qsv.h"
 
 typedef struct QSVH264Context {
-- 
GitLab