diff mbox

[FFmpeg-devel] avcodec/vdpau: clean up vdpau_internal.h

Message ID 20160803043001.4684-1-jamrial@gmail.com
State Accepted
Commit be63ef3c4e6399a3ef8d22cc25e9cb3575cf74ae
Headers show

Checks

Context Check Description
Timothy_Gu/Compilation success Ad-hoc test with VDPAU enabled

Commit Message

James Almer Aug. 3, 2016, 4:30 a.m. UTC
Also don't include it on files that don't need it.

This reduces differences with libav

Signed-off-by: James Almer <jamrial@gmail.com>
---
Untested with VDPAU enabled.

 libavcodec/mpeg12.c         |  1 -
 libavcodec/svq3.c           |  1 -
 libavcodec/vdpau_internal.h | 10 +---------
 3 files changed, 1 insertion(+), 11 deletions(-)

Comments

Carl Eugen Hoyos Aug. 4, 2016, 7:32 a.m. UTC | #1
2016-08-03 6:30 GMT+02:00 James Almer <jamrial@gmail.com>:
> Also don't include it on files that don't need it.
>
> This reduces differences with libav
>
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> Untested with VDPAU enabled.

The patch is probably ok if it does not brake compilation with
VDPAU enabled or disabled.

Carl Eugen
Timothy Gu Aug. 4, 2016, 8:29 a.m. UTC | #2
On Thu, Aug 4, 2016 at 12:57 AM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:

> 2016-08-03 6:30 GMT+02:00 James Almer <jamrial@gmail.com>:
> > Also don't include it on files that don't need it.
> >
> > This reduces differences with libav
> >
> > Signed-off-by: James Almer <jamrial@gmail.com>
> > ---
> > Untested with VDPAU enabled.
>
> The patch is probably ok if it does not brake compilation with
> VDPAU enabled or disabled.
>

Tested with VDPAU enabled. Compilation works.

Timothy
James Almer Aug. 4, 2016, 7:42 p.m. UTC | #3
On 8/4/2016 4:32 AM, Carl Eugen Hoyos wrote:
> 2016-08-03 6:30 GMT+02:00 James Almer <jamrial@gmail.com>:
>> Also don't include it on files that don't need it.
>>
>> This reduces differences with libav
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>> Untested with VDPAU enabled.
> 
> The patch is probably ok if it does not brake compilation with
> VDPAU enabled or disabled.
> 
> Carl Eugen

Pushed, thanks.
diff mbox

Patch

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 7c14052..a61d45b 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -39,7 +39,6 @@ 
 #include "mpeg12data.h"
 #include "mpegvideodata.h"
 #include "bytestream.h"
-#include "vdpau_internal.h"
 #include "thread.h"
 
 uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 223819f..bb4508c 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -53,7 +53,6 @@ 
 #include "mathops.h"
 #include "rectangle.h"
 #include "tpeldsp.h"
-#include "vdpau_internal.h"
 
 #if CONFIG_ZLIB
 #include <zlib.h>
diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h
index 8a63733..77800af 100644
--- a/libavcodec/vdpau_internal.h
+++ b/libavcodec/vdpau_internal.h
@@ -24,15 +24,13 @@ 
 #ifndef AVCODEC_VDPAU_INTERNAL_H
 #define AVCODEC_VDPAU_INTERNAL_H
 
-#include "config.h"
 #include <stdint.h>
-#if CONFIG_VDPAU
 #include <vdpau/vdpau.h>
-#endif
 
 #include "libavutil/frame.h"
 
 #include "avcodec.h"
+#include "vdpau.h"
 
 /** Extract VdpVideoSurface from an AVFrame */
 static inline uintptr_t ff_vdpau_get_surface_id(AVFrame *pic)
@@ -40,8 +38,6 @@  static inline uintptr_t ff_vdpau_get_surface_id(AVFrame *pic)
     return (uintptr_t)pic->data[3];
 }
 
-struct vdpau_picture_context;
-#if CONFIG_VDPAU
 union VDPAUPictureInfo {
     VdpPictureInfoH264        h264;
     VdpPictureInfoMPEG1Or2    mpeg;
@@ -55,8 +51,6 @@  union VDPAUPictureInfo {
 #endif
 };
 
-#include "vdpau.h"
-
 typedef struct VDPAUHWContext {
     AVVDPAUContext context;
     VdpDevice device;
@@ -114,8 +108,6 @@  struct vdpau_picture_context {
 
 int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
                          int level);
-#endif //CONFIG_VDPAU
-
 int ff_vdpau_common_uninit(AVCodecContext *avctx);
 
 int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic,