diff mbox series

[FFmpeg-devel,17/19] Remove obsolete version.h inclusions

Message ID AM7PR03MB6660E1976B7E1C5DF60112398F349@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 155cd6baa49797d57f5b42276eeed3f5408ef3f7
Headers show
Series [FFmpeg-devel] avutil/x86/emms: Don't unnecessarily include lavu/cpu.h | expand

Checks

Context Check Description
yinshiyou/commit_msg_loongarch64 warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
yinshiyou/configure_loongarch64 warning Failed to run configure
andriy/commit_msg_x86 warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/commit_msg_ppc warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 15, 2022, 5:43 p.m. UTC
Forgotten in e7bd47e657bbf9e1ce9915e93bc80cb1a29fb7f3.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vc2enc.c            | 2 +-
 libavcodec/x86/blockdsp_init.c | 2 --
 libavfilter/internal.h         | 1 -
 libavfilter/vf_swapuv.c        | 1 -
 libavformat/url.h              | 1 -
 libavutil/common.h             | 1 -
 libavutil/internal.h           | 1 -
 libswscale/swscale_internal.h  | 1 -
 8 files changed, 1 insertion(+), 9 deletions(-)

Comments

Martin Storsjö Feb. 23, 2022, 2:54 p.m. UTC | #1
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote:

> Forgotten in e7bd47e657bbf9e1ce9915e93bc80cb1a29fb7f3.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/vc2enc.c            | 2 +-
> libavcodec/x86/blockdsp_init.c | 2 --
> libavfilter/internal.h         | 1 -
> libavfilter/vf_swapuv.c        | 1 -
> libavformat/url.h              | 1 -
> libavutil/common.h             | 1 -
> libavutil/internal.h           | 1 -
> libswscale/swscale_internal.h  | 1 -
> 8 files changed, 1 insertion(+), 9 deletions(-)

LGTM

What do you think of the includes of version.h in 
libavdevice/android_camera.c, libavcodec/mediacodec.c, 
libavcodec/mediacodec_wrapper.c and libavcodec/xvmc.h?

// Martin
Andreas Rheinhardt Feb. 23, 2022, 3:15 p.m. UTC | #2
Martin Storsjö:
> On Tue, 15 Feb 2022, Andreas Rheinhardt wrote:
> 
>> Forgotten in e7bd47e657bbf9e1ce9915e93bc80cb1a29fb7f3.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
>> ---
>> libavcodec/vc2enc.c            | 2 +-
>> libavcodec/x86/blockdsp_init.c | 2 --
>> libavfilter/internal.h         | 1 -
>> libavfilter/vf_swapuv.c        | 1 -
>> libavformat/url.h              | 1 -
>> libavutil/common.h             | 1 -
>> libavutil/internal.h           | 1 -
>> libswscale/swscale_internal.h  | 1 -
>> 8 files changed, 1 insertion(+), 9 deletions(-)
> 
> LGTM
> 
> What do you think of the includes of version.h in
> libavdevice/android_camera.c, libavcodec/mediacodec.c,
> libavcodec/mediacodec_wrapper.c and libavcodec/xvmc.h?
> 
> // Martin
> 

The one from android_camera.c stems from a misunderstanding: It used
LIBAVDEVICE_VERSION_INT until 13b77af2f0b56d6c87bb147947337981c21f4245,
so it is safe to remove (or replace by lavu/version.h).
The mediacodec.c has been added for reasons unknown and seems to have
been unnecessary all the time.
The one in mediacodec_wrapper.c stems from the same misunderstanding as
for android_camera.c. Has been fixed in
c0bce367e4932f0fb09195e6978ac1a5a60480a4.
xvmc.h's inclusion is certainly unnecessary. But who cares given that
this header isn't included anywhere?

- Andreas
Martin Storsjö Feb. 23, 2022, 7:44 p.m. UTC | #3
On Wed, 23 Feb 2022, Andreas Rheinhardt wrote:

> Martin Storsjö:
>> On Tue, 15 Feb 2022, Andreas Rheinhardt wrote:
>>
>>> Forgotten in e7bd47e657bbf9e1ce9915e93bc80cb1a29fb7f3.
>>>
>>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
>>> ---
>>> libavcodec/vc2enc.c            | 2 +-
>>> libavcodec/x86/blockdsp_init.c | 2 --
>>> libavfilter/internal.h         | 1 -
>>> libavfilter/vf_swapuv.c        | 1 -
>>> libavformat/url.h              | 1 -
>>> libavutil/common.h             | 1 -
>>> libavutil/internal.h           | 1 -
>>> libswscale/swscale_internal.h  | 1 -
>>> 8 files changed, 1 insertion(+), 9 deletions(-)
>>
>> LGTM
>>
>> What do you think of the includes of version.h in
>> libavdevice/android_camera.c, libavcodec/mediacodec.c,
>> libavcodec/mediacodec_wrapper.c and libavcodec/xvmc.h?
>>
>> // Martin
>>
>
> The one from android_camera.c stems from a misunderstanding: It used
> LIBAVDEVICE_VERSION_INT until 13b77af2f0b56d6c87bb147947337981c21f4245,
> so it is safe to remove (or replace by lavu/version.h).
> The mediacodec.c has been added for reasons unknown and seems to have
> been unnecessary all the time.
> The one in mediacodec_wrapper.c stems from the same misunderstanding as
> for android_camera.c. Has been fixed in
> c0bce367e4932f0fb09195e6978ac1a5a60480a4.

Thanks!

> xvmc.h's inclusion is certainly unnecessary. But who cares given that
> this header isn't included anywhere?

It just came up when grepping for 'version.h', and I was trying to check 
whether it could be enough with 'version_major.h' in my patchset or not.

// Martin
diff mbox series

Patch

diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
index ccca78d281..bfa43b3c03 100644
--- a/libavcodec/vc2enc.c
+++ b/libavcodec/vc2enc.c
@@ -21,11 +21,11 @@ 
 
 #include "libavutil/pixdesc.h"
 #include "libavutil/opt.h"
+#include "libavutil/version.h"
 #include "dirac.h"
 #include "encode.h"
 #include "put_bits.h"
 #include "internal.h"
-#include "version.h"
 
 #include "vc2enc_dwt.h"
 #include "diractab.h"
diff --git a/libavcodec/x86/blockdsp_init.c b/libavcodec/x86/blockdsp_init.c
index be3eef0021..d7f8a8e508 100644
--- a/libavcodec/x86/blockdsp_init.c
+++ b/libavcodec/x86/blockdsp_init.c
@@ -20,11 +20,9 @@ 
 
 #include "config.h"
 #include "libavutil/attributes.h"
-#include "libavutil/internal.h"
 #include "libavutil/cpu.h"
 #include "libavutil/x86/cpu.h"
 #include "libavcodec/blockdsp.h"
-#include "libavcodec/version.h"
 
 void ff_clear_block_mmx(int16_t *block);
 void ff_clear_block_sse(int16_t *block);
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 1099b82b4b..53883101a8 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -28,7 +28,6 @@ 
 #include "avfilter.h"
 #include "formats.h"
 #include "framequeue.h"
-#include "version.h"
 #include "video.h"
 
 typedef struct AVFilterCommand {
diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c
index 27d083f026..4452028262 100644
--- a/libavfilter/vf_swapuv.c
+++ b/libavfilter/vf_swapuv.c
@@ -25,7 +25,6 @@ 
 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
-#include "libavutil/version.h"
 #include "avfilter.h"
 #include "formats.h"
 #include "internal.h"
diff --git a/libavformat/url.h b/libavformat/url.h
index a129150d76..3cfe3ecc5c 100644
--- a/libavformat/url.h
+++ b/libavformat/url.h
@@ -25,7 +25,6 @@ 
 #define AVFORMAT_URL_H
 
 #include "avio.h"
-#include "libavformat/version.h"
 
 #include "libavutil/dict.h"
 #include "libavutil/log.h"
diff --git a/libavutil/common.h b/libavutil/common.h
index 3eb9bc5f74..fd1404be6c 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -41,7 +41,6 @@ 
 
 #include "attributes.h"
 #include "macros.h"
-#include "version.h"
 
 //rounded division & shift
 #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 0a7f1c6257..79c2130be0 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -43,7 +43,6 @@ 
 #include "dict.h"
 #include "macros.h"
 #include "pixfmt.h"
-#include "version.h"
 
 #if ARCH_X86
 #   include "x86/emms.h"
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 3a78d95ba6..2be23458a1 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -24,7 +24,6 @@ 
 #include <stdatomic.h>
 
 #include "config.h"
-#include "version.h"
 
 #include "libavutil/avassert.h"
 #include "libavutil/avutil.h"