[FFmpeg-devel] [PATCH 1/2] avcodec/cbs: Remove unused function parameters

Mark Thompson sw at jkqxz.net
Tue Jul 7 00:16:15 EEST 2020


On 06/07/2020 01:53, Andreas Rheinhardt wrote:
> Several cbs-functions had an unused CodedBitstreamContext parameter.
> This commit removes these.

Yeah, the intent was that every call would be attached to a single context for logging / debug stuff.  That didn't end up getting any use, so it's fair to dump all of the extra parameters.

> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> As one sees, removing the ctx parameter from some of these functions
> depends on removing it from others. But ff_cbs_alloc_unit_content is
> separate from all the others; so if we switched to Mark's
> ff_cbs_alloc_unit_content2 [1], one would not need to add this parameter
> back for any other function.
> 
> [1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-May/262042.html

Merging looks like it might be fun :P  I'll rebase and resend that set once you've applied this lot.

> 
>   libavcodec/av1_frame_merge_bsf.c    | 12 ++++----
>   libavcodec/av1_frame_split_bsf.c    | 10 +++---
>   libavcodec/av1_metadata_bsf.c       | 14 ++++-----
>   libavcodec/av1_parser.c             |  6 ++--
>   libavcodec/cbs.c                    | 48 ++++++++++++-----------------
>   libavcodec/cbs.h                    | 21 +++++--------
>   libavcodec/cbs_av1.c                |  4 +--
>   libavcodec/cbs_h264.h               |  6 ++--
>   libavcodec/cbs_h2645.c              | 40 ++++++++++++------------
>   libavcodec/cbs_jpeg.c               | 10 +++---
>   libavcodec/cbs_mpeg2.c              |  6 ++--
>   libavcodec/cbs_vp9.c                |  6 ++--
>   libavcodec/filter_units_bsf.c       |  8 ++---
>   libavcodec/h264_metadata_bsf.c      | 24 +++++++--------
>   libavcodec/h264_redundant_pps_bsf.c |  8 ++---
>   libavcodec/h265_metadata_bsf.c      | 13 ++++----
>   libavcodec/mpeg2_metadata_bsf.c     |  8 ++---
>   libavcodec/trace_headers_bsf.c      |  6 ++--
>   libavcodec/vaapi_encode_h264.c      | 13 ++++----
>   libavcodec/vaapi_encode_h265.c      | 13 ++++----
>   libavcodec/vaapi_encode_mjpeg.c     | 14 ++++-----
>   libavcodec/vaapi_encode_mpeg2.c     |  9 +++---
>   libavcodec/vp9_metadata_bsf.c       |  4 +--
>   23 files changed, 138 insertions(+), 165 deletions(-)
> 
> ...

LGTM.

Thanks,

- Mark


More information about the ffmpeg-devel mailing list