diff mbox series

[FFmpeg-devel,2/7] avcodec/h264_levels: Remove unused ff_h264_get_level()

Message ID 20200207134831.23137-2-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/7] tools/target_dec_fuzzer: Fuzz skip_frame
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Michael Niedermayer Feb. 7, 2020, 1:48 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/h264_levels.c | 12 ------------
 libavcodec/h264_levels.h |  3 ---
 2 files changed, 15 deletions(-)

Comments

James Almer Feb. 7, 2020, 3:41 p.m. UTC | #1
On 2/7/2020 10:48 AM, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/h264_levels.c | 12 ------------
>  libavcodec/h264_levels.h |  3 ---
>  2 files changed, 15 deletions(-)
> 
> diff --git a/libavcodec/h264_levels.c b/libavcodec/h264_levels.c
> index dd517f1005..801b27fdd9 100644
> --- a/libavcodec/h264_levels.c
> +++ b/libavcodec/h264_levels.c
> @@ -75,18 +75,6 @@ static int h264_get_br_factor(int profile_idc)
>      return 1200;
>  }
>  
> -const H264LevelDescriptor *ff_h264_get_level(int level_idc,
> -                                             int constraint_set3_flag)
> -{
> -    int i;
> -    for (i = 0; i < FF_ARRAY_ELEMS(h264_levels); i++) {
> -        if (h264_levels[i].level_idc            == level_idc &&
> -            h264_levels[i].constraint_set3_flag == constraint_set3_flag)
> -            return &h264_levels[i];
> -    }
> -    return NULL;
> -}
> -
>  const H264LevelDescriptor *ff_h264_guess_level(int profile_idc,
>                                                 int64_t bitrate,
>                                                 int framerate,
> diff --git a/libavcodec/h264_levels.h b/libavcodec/h264_levels.h
> index 0a0f410329..6bba2e8624 100644
> --- a/libavcodec/h264_levels.h
> +++ b/libavcodec/h264_levels.h
> @@ -36,9 +36,6 @@ typedef struct H264LevelDescriptor {
>      uint8_t     max_mvs_per_2mb;
>  } H264LevelDescriptor;
>  
> -const H264LevelDescriptor *ff_h264_get_level(int level_idc,
> -                                             int constraint_set3_flag);
> -
>  /**
>   * Guess the level of a stream from some parameters.
>   *

This was added for a reason by Mark, so please wait for him to comment
before applying it. There may be a patchset pending push/review that
makes use of it.
Michael Niedermayer Feb. 7, 2020, 11:12 p.m. UTC | #2
On Fri, Feb 07, 2020 at 12:41:58PM -0300, James Almer wrote:
> On 2/7/2020 10:48 AM, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  libavcodec/h264_levels.c | 12 ------------
> >  libavcodec/h264_levels.h |  3 ---
> >  2 files changed, 15 deletions(-)
> > 
> > diff --git a/libavcodec/h264_levels.c b/libavcodec/h264_levels.c
> > index dd517f1005..801b27fdd9 100644
> > --- a/libavcodec/h264_levels.c
> > +++ b/libavcodec/h264_levels.c
> > @@ -75,18 +75,6 @@ static int h264_get_br_factor(int profile_idc)
> >      return 1200;
> >  }
> >  
> > -const H264LevelDescriptor *ff_h264_get_level(int level_idc,
> > -                                             int constraint_set3_flag)
> > -{
> > -    int i;
> > -    for (i = 0; i < FF_ARRAY_ELEMS(h264_levels); i++) {
> > -        if (h264_levels[i].level_idc            == level_idc &&
> > -            h264_levels[i].constraint_set3_flag == constraint_set3_flag)
> > -            return &h264_levels[i];
> > -    }
> > -    return NULL;
> > -}
> > -
> >  const H264LevelDescriptor *ff_h264_guess_level(int profile_idc,
> >                                                 int64_t bitrate,
> >                                                 int framerate,
> > diff --git a/libavcodec/h264_levels.h b/libavcodec/h264_levels.h
> > index 0a0f410329..6bba2e8624 100644
> > --- a/libavcodec/h264_levels.h
> > +++ b/libavcodec/h264_levels.h
> > @@ -36,9 +36,6 @@ typedef struct H264LevelDescriptor {
> >      uint8_t     max_mvs_per_2mb;
> >  } H264LevelDescriptor;
> >  
> > -const H264LevelDescriptor *ff_h264_get_level(int level_idc,
> > -                                             int constraint_set3_flag);
> > -
> >  /**
> >   * Guess the level of a stream from some parameters.
> >   *
> 
> This was added for a reason by Mark, so please wait for him to comment
> before applying it. There may be a patchset pending push/review that
> makes use of it.

sure, will wait

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/h264_levels.c b/libavcodec/h264_levels.c
index dd517f1005..801b27fdd9 100644
--- a/libavcodec/h264_levels.c
+++ b/libavcodec/h264_levels.c
@@ -75,18 +75,6 @@  static int h264_get_br_factor(int profile_idc)
     return 1200;
 }
 
-const H264LevelDescriptor *ff_h264_get_level(int level_idc,
-                                             int constraint_set3_flag)
-{
-    int i;
-    for (i = 0; i < FF_ARRAY_ELEMS(h264_levels); i++) {
-        if (h264_levels[i].level_idc            == level_idc &&
-            h264_levels[i].constraint_set3_flag == constraint_set3_flag)
-            return &h264_levels[i];
-    }
-    return NULL;
-}
-
 const H264LevelDescriptor *ff_h264_guess_level(int profile_idc,
                                                int64_t bitrate,
                                                int framerate,
diff --git a/libavcodec/h264_levels.h b/libavcodec/h264_levels.h
index 0a0f410329..6bba2e8624 100644
--- a/libavcodec/h264_levels.h
+++ b/libavcodec/h264_levels.h
@@ -36,9 +36,6 @@  typedef struct H264LevelDescriptor {
     uint8_t     max_mvs_per_2mb;
 } H264LevelDescriptor;
 
-const H264LevelDescriptor *ff_h264_get_level(int level_idc,
-                                             int constraint_set3_flag);
-
 /**
  * Guess the level of a stream from some parameters.
  *