diff mbox series

[FFmpeg-devel,4/4] lavc: deprecate FF_IDCT_NONE

Message ID 20220201100227.18928-4-anton@khirnov.net
State Accepted
Commit b648ece34b6f2576698bea86bcc198a3f4e1f47b
Headers show
Series [FFmpeg-devel,1/4] lavc/mpeg*: drop the XvMC hwaccel code | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Anton Khirnov Feb. 1, 2022, 10:02 a.m. UTC
It was only used by XvMC.
---
 libavcodec/avcodec.h | 5 ++++-
 libavcodec/idctdsp.c | 1 -
 libavcodec/version.h | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

Comments

Lynne Feb. 1, 2022, 11:16 a.m. UTC | #1
1 Feb 2022, 11:02 by anton@khirnov.net:

> It was only used by XvMC.
> ---
>  libavcodec/avcodec.h | 5 ++++-
>  libavcodec/idctdsp.c | 1 -
>  libavcodec/version.h | 1 +
>  3 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index acb7ae0e14..5362446092 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1407,7 +1407,10 @@ typedef struct AVCodecContext {
>  #define FF_IDCT_SIMPLEARMV6   17
>  #define FF_IDCT_FAAN          20
>  #define FF_IDCT_SIMPLENEON    22
> -#define FF_IDCT_NONE          24 /* Used by XvMC to extract IDCT coefficients with FF_IDCT_PERM_NONE */
> +#if FF_API_IDCT_NONE
> +// formerly used by xvmc
> +#define FF_IDCT_NONE          24
> +#endif
>  #define FF_IDCT_SIMPLEAUTO    128  
>

Isn't this a private define that clients weren't meant to use?
If so, may as well drop it with patch #1
James Almer Feb. 1, 2022, 11:32 a.m. UTC | #2
On 2/1/2022 8:16 AM, Lynne wrote:
> 1 Feb 2022, 11:02 by anton@khirnov.net:
> 
>> It was only used by XvMC.
>> ---
>>   libavcodec/avcodec.h | 5 ++++-
>>   libavcodec/idctdsp.c | 1 -
>>   libavcodec/version.h | 1 +
>>   3 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index acb7ae0e14..5362446092 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -1407,7 +1407,10 @@ typedef struct AVCodecContext {
>>   #define FF_IDCT_SIMPLEARMV6   17
>>   #define FF_IDCT_FAAN          20
>>   #define FF_IDCT_SIMPLENEON    22
>> -#define FF_IDCT_NONE          24 /* Used by XvMC to extract IDCT coefficients with FF_IDCT_PERM_NONE */
>> +#if FF_API_IDCT_NONE
>> +// formerly used by xvmc
>> +#define FF_IDCT_NONE          24
>> +#endif
>>   #define FF_IDCT_SIMPLEAUTO    128
>>
> 
> Isn't this a private define that clients weren't meant to use?

Nowhere it says that. All FF_IDCT_ defines are documented as being able 
to be used in AVCodecContext.idct_algo

> If so, may as well drop it with patch #1
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index acb7ae0e14..5362446092 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1407,7 +1407,10 @@  typedef struct AVCodecContext {
 #define FF_IDCT_SIMPLEARMV6   17
 #define FF_IDCT_FAAN          20
 #define FF_IDCT_SIMPLENEON    22
-#define FF_IDCT_NONE          24 /* Used by XvMC to extract IDCT coefficients with FF_IDCT_PERM_NONE */
+#if FF_API_IDCT_NONE
+// formerly used by xvmc
+#define FF_IDCT_NONE          24
+#endif
 #define FF_IDCT_SIMPLEAUTO    128
 
     /**
diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c
index 71bd03c606..79e7f87443 100644
--- a/libavcodec/idctdsp.c
+++ b/libavcodec/idctdsp.c
@@ -287,7 +287,6 @@  av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
                 c->perm_type = FF_IDCT_PERM_NONE;
 #endif /* CONFIG_FAANIDCT */
             } else { // accurate/default
-                /* Be sure FF_IDCT_NONE will select this one, since it uses FF_IDCT_PERM_NONE */
                 c->idct_put  = ff_simple_idct_put_int16_8bit;
                 c->idct_add  = ff_simple_idct_add_int16_8bit;
                 c->idct      = ff_simple_idct_int16_8bit;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index a46fb05f1a..b2c57360cf 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -64,5 +64,6 @@ 
 #define FF_API_FLAG_TRUNCATED      (LIBAVCODEC_VERSION_MAJOR < 60)
 #define FF_API_SUB_TEXT_FORMAT     (LIBAVCODEC_VERSION_MAJOR < 60)
 #define FF_API_MJPEG_PRED          (LIBAVCODEC_VERSION_MAJOR < 60)
+#define FF_API_IDCT_NONE           (LIBAVCODEC_VERSION_MAJOR < 60)
 
 #endif /* AVCODEC_VERSION_H */