diff mbox

[FFmpeg-devel,1/4] h264_levels, h264_metadata_bsf: Fix levels typo

Message ID 20181112141815.4472-2-andreas.rheinhardt@googlemail.com
State Accepted
Headers show

Commit Message

Andreas Rheinhardt Nov. 12, 2018, 2:18 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
---
 libavcodec/h264_levels.c       | 2 +-
 libavcodec/h264_metadata_bsf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer Nov. 13, 2018, 12:02 a.m. UTC | #1
On Mon, Nov 12, 2018 at 03:18:12PM +0100, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
> ---
>  libavcodec/h264_levels.c       | 2 +-
>  libavcodec/h264_metadata_bsf.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

breaks fate-h264-levels, a change to the output needs to update the test too
(after double checking that the change is correct)

    libavcodec/tests/h264_levels
    Test h264-levels failed. Look at tests/data/fate/h264-levels.err for details.
    Incorrect level for bitrate 115200 profile 66: expected 10, got 11.


[...]
Mark Thompson Nov. 13, 2018, 9:22 p.m. UTC | #2
On 12/11/18 14:18, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
> ---
>  libavcodec/h264_levels.c       | 2 +-
>  libavcodec/h264_metadata_bsf.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/h264_levels.c b/libavcodec/h264_levels.c
> index 737b7dcf06..7a55116773 100644
> --- a/libavcodec/h264_levels.c
> +++ b/libavcodec/h264_levels.c
> @@ -25,7 +25,7 @@ static const H264LevelDescriptor h264_levels[] = {
>      //  | level_idc     |       MaxFS            |    MaxCPB        | MaxMvsPer2Mb
>      //  |     | cs3f    |         |  MaxDpbMbs   |       |  MaxVmvR |   |
>      { "1",   10, 0,     1485,     99,    396,     64,    175,   64, 2,  0 },
> -    { "1b",  10, 1,     1485,     99,    396,    128,    350,   64, 2,  0 },
> +    { "1b",  11, 1,     1485,     99,    396,    128,    350,   64, 2,  0 },
>      { "1b",   9, 0,     1485,     99,    396,    128,    350,   64, 2,  0 },
>      { "1.1", 11, 0,     3000,    396,    900,    192,    500,  128, 2,  0 },
>      { "1.2", 12, 0,     6000,    396,   2376,    384,   1000,  128, 2,  0 },
> diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
> index bf37528234..521bc36b7e 100644
> --- a/libavcodec/h264_metadata_bsf.c
> +++ b/libavcodec/h264_metadata_bsf.c
> @@ -258,7 +258,7 @@ static int h264_metadata_update_sps(AVBSFContext *bsf,
>              if (sps->profile_idc == 66 ||
>                  sps->profile_idc == 77 ||
>                  sps->profile_idc == 88) {
> -                sps->level_idc = 10;
> +                sps->level_idc = 11;
>                  sps->constraint_set3_flag = 1;
>              } else {
>                  sps->level_idc = 9;
> 

I fixed the matching place this appears in the test and applied.

Thanks,

- Mark
diff mbox

Patch

diff --git a/libavcodec/h264_levels.c b/libavcodec/h264_levels.c
index 737b7dcf06..7a55116773 100644
--- a/libavcodec/h264_levels.c
+++ b/libavcodec/h264_levels.c
@@ -25,7 +25,7 @@  static const H264LevelDescriptor h264_levels[] = {
     //  | level_idc     |       MaxFS            |    MaxCPB        | MaxMvsPer2Mb
     //  |     | cs3f    |         |  MaxDpbMbs   |       |  MaxVmvR |   |
     { "1",   10, 0,     1485,     99,    396,     64,    175,   64, 2,  0 },
-    { "1b",  10, 1,     1485,     99,    396,    128,    350,   64, 2,  0 },
+    { "1b",  11, 1,     1485,     99,    396,    128,    350,   64, 2,  0 },
     { "1b",   9, 0,     1485,     99,    396,    128,    350,   64, 2,  0 },
     { "1.1", 11, 0,     3000,    396,    900,    192,    500,  128, 2,  0 },
     { "1.2", 12, 0,     6000,    396,   2376,    384,   1000,  128, 2,  0 },
diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index bf37528234..521bc36b7e 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -258,7 +258,7 @@  static int h264_metadata_update_sps(AVBSFContext *bsf,
             if (sps->profile_idc == 66 ||
                 sps->profile_idc == 77 ||
                 sps->profile_idc == 88) {
-                sps->level_idc = 10;
+                sps->level_idc = 11;
                 sps->constraint_set3_flag = 1;
             } else {
                 sps->level_idc = 9;