mbox series

[FFmpeg-devel,v3,0/4] Add derive-device function which searches for existing devices in both directions

Message ID pull.25.v3.ffstaging.FFmpeg.1658446783.ffmpegagent@gmail.com
Headers show
Series Add derive-device function which searches for existing devices in both directions | expand

Message

Aman Karmani July 21, 2022, 11:39 p.m. UTC
This is an updated version of: [PATCH v4 1/1] avutils/hwcontext: When
deriving a hwdevice, search for existing device in both directions

There has been an objection that the earlier patchset would change API
behavior, and that this change should be limited to ffmpeg cli.

To achieve this, the API behavior is left unchanged now and a new function
av_hwdevice_ctx_get_or_create_derived() is added and used by the hwupload
and hwmap filters.

v2: Implemented concept for "weak references" to avoid circular reference
lockup.

v3: rebased due to conflicts

softworkz (4):
  avutil/buffer: add av_ref_from_buffer() function
  avutils/hwcontext: add derive-device function which searches for
    existing devices in both directions
  lavu: bump minor version and add doc/APIchanges entry for
    av_hwdevice_ctx_get_or_create_derived()
  avfilter/hwmap,hwupload: use new av_hwdevice_ctx_get_or_create_derived
    method

 doc/APIchanges                 |   6 ++
 libavfilter/vf_hwmap.c         |   4 +-
 libavfilter/vf_hwupload.c      |   2 +-
 libavutil/buffer.c             |  16 ++++
 libavutil/buffer.h             |   8 ++
 libavutil/hwcontext.c          | 167 +++++++++++++++++++++++++++++++--
 libavutil/hwcontext.h          |  20 ++++
 libavutil/hwcontext_internal.h |  11 +++
 libavutil/hwcontext_qsv.c      |  11 ++-
 libavutil/version.h            |   2 +-
 10 files changed, 233 insertions(+), 14 deletions(-)


base-commit: f7d510b33ff33d2f5cb096017ee1c00f624cc138
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-25%2Fsoftworkz%2Fderive_devices-v3
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-25/softworkz/derive_devices-v3
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/25

Range-diff vs v2:

 1:  e9c920c237 = 1:  b17a72426c avutil/buffer: add av_ref_from_buffer() function
 2:  bec8ccfcc2 = 2:  5cd017dfa7 avutils/hwcontext: add derive-device function which searches for existing devices in both directions
 3:  a2c8e79e8a ! 3:  03528fce43 lavu: bump minor version and add doc/APIchanges entry for av_hwdevice_ctx_get_or_create_derived()
     @@ doc/APIchanges: libavutil:     2021-04-27
       
       API changes, most recent first:
       
     -+2022-05-21 - xxxxxxxxxx - lavu 57.25.100 - hwcontext.h
     ++2022-07-01 - xxxxxxxxxx - lavu 57.31.100 - hwcontext.h
      +  Add av_hwdevice_ctx_get_or_create_derived().
      +
     -+2022-04-30 - xxxxxxxxxx - lavu 57.25.100 - buffer.h
     ++2022-07-01 - xxxxxxxxxx - lavu 57.31.100 - buffer.h
      +  Add av_ref_from_buffer().
      +
     - 2022-03-16 - xxxxxxxxxx - all libraries - version_major.h
     -   Add lib<name>/version_major.h as new installed headers, which only
     -   contain the major version number (and corresponding API deprecation
     + 2022-07-xx - xxxxxxxxxx - lavu 57.30.100 - frame.h
     +   Add AVFrame.duration, deprecate AVFrame.pkt_duration.
     + 
      
       ## libavutil/version.h ##
      @@
        */
       
       #define LIBAVUTIL_VERSION_MAJOR  57
     --#define LIBAVUTIL_VERSION_MINOR  24
     --#define LIBAVUTIL_VERSION_MICRO 101
     -+#define LIBAVUTIL_VERSION_MINOR  25
     -+#define LIBAVUTIL_VERSION_MICRO 100
     +-#define LIBAVUTIL_VERSION_MINOR  30
     ++#define LIBAVUTIL_VERSION_MINOR  31
     + #define LIBAVUTIL_VERSION_MICRO 100
       
       #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
     -                                                LIBAVUTIL_VERSION_MINOR, \
 4:  d0957afde6 = 4:  7ee28b7c25 avfilter/hwmap,hwupload: use new av_hwdevice_ctx_get_or_create_derived method

Comments

Soft Works Oct. 21, 2022, 7:06 a.m. UTC | #1
> -----Original Message-----
> From: ffmpegagent <ffmpegagent@gmail.com>
> Sent: Friday, July 22, 2022 1:40 AM
> To: ffmpeg-devel@ffmpeg.org
> Cc: Mark Thompson <sw@jkqxz.net>; Soft Works <softworkz@hotmail.com>;
> softworkz <softworkz@hotmail.com>
> Subject: [PATCH v3 0/4] Add derive-device function which searches for
> existing devices in both directions
> 
> This is an updated version of: [PATCH v4 1/1] avutils/hwcontext: When
> deriving a hwdevice, search for existing device in both directions
> 
> There has been an objection that the earlier patchset would change
> API
> behavior, and that this change should be limited to ffmpeg cli.
> 
> To achieve this, the API behavior is left unchanged now and a new
> function
> av_hwdevice_ctx_get_or_create_derived() is added and used by the
> hwupload
> and hwmap filters.
> 
> v2: Implemented concept for "weak references" to avoid circular
> reference
> lockup.
> 
> v3: rebased due to conflicts
> 
> softworkz (4):
>   avutil/buffer: add av_ref_from_buffer() function
>   avutils/hwcontext: add derive-device function which searches for
>     existing devices in both directions
>   lavu: bump minor version and add doc/APIchanges entry for
>     av_hwdevice_ctx_get_or_create_derived()
>   avfilter/hwmap,hwupload: use new
> av_hwdevice_ctx_get_or_create_derived
>     method

Hi,

@Mark Thompson - would you mind to take a look at this?

You were the only one who was objecting and I had reworked 
this in the sense of our discussion (hopefully).

Thanks,
softworkz