diff mbox

[FFmpeg-devel,RFC] avcodec: add AV_HWACCEL_CODEC_CAP_EXPERIMENTAL flag

Message ID 20170901180016.704-1-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer Sept. 1, 2017, 6 p.m. UTC
This flag replaces the deprecated, non-prefixed HWACCEL_CODEC_CAP_EXPERIMENTAL
one.

Signed-off-by: James Almer <jamrial@gmail.com>
---
No HWAccel uses HWACCEL_CODEC_CAP_EXPERIMENTAL at all. I wonder if we
shouldn't instead just not bother replacing it and consider adding it
once and if an hwaccel is ever committed in an unfinished way.

 doc/APIchanges       | 4 ++++
 libavcodec/avcodec.h | 8 +++++++-
 libavcodec/decode.c  | 2 +-
 libavcodec/version.h | 4 ++--
 4 files changed, 14 insertions(+), 4 deletions(-)

Comments

Michael Niedermayer Sept. 2, 2017, 9:47 p.m. UTC | #1
On Fri, Sep 01, 2017 at 03:00:16PM -0300, James Almer wrote:
> This flag replaces the deprecated, non-prefixed HWACCEL_CODEC_CAP_EXPERIMENTAL
> one.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> No HWAccel uses HWACCEL_CODEC_CAP_EXPERIMENTAL at all. I wonder if we
> shouldn't instead just not bother replacing it and consider adding it
> once and if an hwaccel is ever committed in an unfinished way.
> 
>  doc/APIchanges       | 4 ++++
>  libavcodec/avcodec.h | 8 +++++++-
>  libavcodec/decode.c  | 2 +-
>  libavcodec/version.h | 4 ++--
>  4 files changed, 14 insertions(+), 4 deletions(-)

LGTM

thx

[...]
James Almer Sept. 2, 2017, 9:51 p.m. UTC | #2
On 9/2/2017 6:47 PM, Michael Niedermayer wrote:
> On Fri, Sep 01, 2017 at 03:00:16PM -0300, James Almer wrote:
>> This flag replaces the deprecated, non-prefixed HWACCEL_CODEC_CAP_EXPERIMENTAL
>> one.
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>> No HWAccel uses HWACCEL_CODEC_CAP_EXPERIMENTAL at all. I wonder if we
>> shouldn't instead just not bother replacing it and consider adding it
>> once and if an hwaccel is ever committed in an unfinished way.
>>
>>  doc/APIchanges       | 4 ++++
>>  libavcodec/avcodec.h | 8 +++++++-
>>  libavcodec/decode.c  | 2 +-
>>  libavcodec/version.h | 4 ++--
>>  4 files changed, 14 insertions(+), 4 deletions(-)
> 
> LGTM
> 
> thx

If nobody speaks and argues in favor of just dropping the flag
altogether with the bump then i'll push it.

Thanks.
James Almer Sept. 4, 2017, 8:49 p.m. UTC | #3
On 9/2/2017 6:51 PM, James Almer wrote:
> On 9/2/2017 6:47 PM, Michael Niedermayer wrote:
>> On Fri, Sep 01, 2017 at 03:00:16PM -0300, James Almer wrote:
>>> This flag replaces the deprecated, non-prefixed HWACCEL_CODEC_CAP_EXPERIMENTAL
>>> one.
>>>
>>> Signed-off-by: James Almer <jamrial@gmail.com>
>>> ---
>>> No HWAccel uses HWACCEL_CODEC_CAP_EXPERIMENTAL at all. I wonder if we
>>> shouldn't instead just not bother replacing it and consider adding it
>>> once and if an hwaccel is ever committed in an unfinished way.
>>>
>>>  doc/APIchanges       | 4 ++++
>>>  libavcodec/avcodec.h | 8 +++++++-
>>>  libavcodec/decode.c  | 2 +-
>>>  libavcodec/version.h | 4 ++--
>>>  4 files changed, 14 insertions(+), 4 deletions(-)
>>
>> LGTM
>>
>> thx
> 
> If nobody speaks and argues in favor of just dropping the flag
> altogether with the bump then i'll push it.
> 
> Thanks.

Pushed.
diff mbox

Patch

diff --git a/doc/APIchanges b/doc/APIchanges
index 4effbf9364..0d459ba8c0 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@  libavutil:     2015-08-28
 
 API changes, most recent first:
 
+2017-09-xx - xxxxxxx - lavc 57.105.100 - avcodec.h
+  Add AV_HWACCEL_CODEC_CAP_EXPERIMENTAL, replacing the deprecated
+  HWACCEL_CODEC_CAP_EXPERIMENTAL flag.
+
 2017-09-01 - xxxxxxx - lavf 57.81.100 - avio.h
   Add avio_read_partial().
 
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 513236a863..7708bb2adb 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3879,7 +3879,7 @@  typedef struct AVHWAccel {
 
     /**
      * Hardware accelerated codec capabilities.
-     * see HWACCEL_CODEC_CAP_*
+     * see AV_HWACCEL_CODEC_CAP_*
      */
     int capabilities;
 
@@ -3988,6 +3988,12 @@  typedef struct AVHWAccel {
 } AVHWAccel;
 
 /**
+ * HWAccel is experimental and is thus avoided in favor of non experimental
+ * codecs
+ */
+#define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL 0x0200
+
+/**
  * Hardware acceleration should be used for decoding even if the codec level
  * used is unknown or higher than the maximum supported level reported by the
  * hardware driver.
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 9b57910842..892143c1d2 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1150,7 +1150,7 @@  static int setup_hwaccel(AVCodecContext *avctx,
         return AVERROR(ENOENT);
     }
 
-    if (hwa->capabilities & HWACCEL_CODEC_CAP_EXPERIMENTAL &&
+    if (hwa->capabilities & AV_HWACCEL_CODEC_CAP_EXPERIMENTAL &&
         avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
         av_log(avctx, AV_LOG_WARNING, "Ignoring experimental hwaccel: %s\n",
                hwa->name);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 29cdb85589..55b8ddc13c 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,8 +28,8 @@ 
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  57
-#define LIBAVCODEC_VERSION_MINOR 104
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MINOR 105
+#define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \