diff mbox series

[FFmpeg-devel] avcodec: Fix h264_videotoolbox writing b-frames (fix ticket #8353)

Message ID 20200229013951.7792-1-Nomis101@web.de
State New
Headers show
Series [FFmpeg-devel] avcodec: Fix h264_videotoolbox writing b-frames (fix ticket #8353) | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Nomis101 Feb. 29, 2020, 1:39 a.m. UTC
From: Damiano Galassi <damiog@gmail.com>

Signed-off-by: Nomis101 <Nomis101@web.de>
---
 libavcodec/videotoolboxenc.c | 1 +
 1 file changed, 1 insertion(+)

--
2.21.1 (Apple Git-122.3)

Comments

Nomis101 March 18, 2020, 4:32 p.m. UTC | #1
Am 29.02.20 um 02:39 schrieb Nomis101:
> From: Damiano Galassi <damiog@gmail.com>
>
> Signed-off-by: Nomis101 <Nomis101@web.de>
> ---
>  libavcodec/videotoolboxenc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
> index cc08cf6a50..32d893e485 100644
> --- a/libavcodec/videotoolboxenc.c
> +++ b/libavcodec/videotoolboxenc.c
> @@ -1355,6 +1355,7 @@ static int vtenc_configure_encoder(AVCodecContext *avctx)
>          vtctx->get_param_set_func = compat_keys.CMVideoFormatDescriptionGetHEVCParameterSetAtIndex;
>          if (!vtctx->get_param_set_func) return AVERROR(EINVAL);
>          if (!get_vt_hevc_profile_level(avctx, &profile_level)) return AVERROR(EINVAL);
> +        vtctx->has_b_frames = avctx->max_b_frames > 0;
>      }
>
>      enc_info = CFDictionaryCreateMutable(
> --
> 2.21.1 (Apple Git-122.3)
>


What do I need to do to get this reviewed? Its just a one-liner.
Rick Kern March 21, 2020, 2:58 p.m. UTC | #2
On Wed, Mar 18, 2020 at 12:32 PM Nomis101 <Nomis101@web.de> wrote:

> Am 29.02.20 um 02:39 schrieb Nomis101:
> > From: Damiano Galassi <damiog@gmail.com>
> >
> > Signed-off-by: Nomis101 <Nomis101@web.de>
> > ---
> >  libavcodec/videotoolboxenc.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
> > index cc08cf6a50..32d893e485 100644
> > --- a/libavcodec/videotoolboxenc.c
> > +++ b/libavcodec/videotoolboxenc.c
> > @@ -1355,6 +1355,7 @@ static int vtenc_configure_encoder(AVCodecContext
> *avctx)
> >          vtctx->get_param_set_func =
> compat_keys.CMVideoFormatDescriptionGetHEVCParameterSetAtIndex;
> >          if (!vtctx->get_param_set_func) return AVERROR(EINVAL);
> >          if (!get_vt_hevc_profile_level(avctx, &profile_level)) return
> AVERROR(EINVAL);
> > +        vtctx->has_b_frames = avctx->max_b_frames > 0;
>
This is in the HEVC block. The H.264 encoder will output B-frames if the
hardware supports it and the -bf parameter is used with a value of 1 or
more.

>      }
> >
> >      enc_info = CFDictionaryCreateMutable(
> > --
> > 2.21.1 (Apple Git-122.3)
> >
>
>
> What do I need to do to get this reviewed? Its just a one-liner.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Nomis101 March 21, 2020, 3:34 p.m. UTC | #3
Am 21.03.20 um 15:58 schrieb Rick Kern:
> On Wed, Mar 18, 2020 at 12:32 PM Nomis101 <Nomis101@web.de> wrote:
>
>> Am 29.02.20 um 02:39 schrieb Nomis101:
>>> From: Damiano Galassi <damiog@gmail.com>
>>>
>>> Signed-off-by: Nomis101 <Nomis101@web.de>
>>> ---
>>>  libavcodec/videotoolboxenc.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
>>> index cc08cf6a50..32d893e485 100644
>>> --- a/libavcodec/videotoolboxenc.c
>>> +++ b/libavcodec/videotoolboxenc.c
>>> @@ -1355,6 +1355,7 @@ static int vtenc_configure_encoder(AVCodecContext
>> *avctx)
>>>          vtctx->get_param_set_func =
>> compat_keys.CMVideoFormatDescriptionGetHEVCParameterSetAtIndex;
>>>          if (!vtctx->get_param_set_func) return AVERROR(EINVAL);
>>>          if (!get_vt_hevc_profile_level(avctx, &profile_level)) return
>> AVERROR(EINVAL);
>>> +        vtctx->has_b_frames = avctx->max_b_frames > 0;
>>
> This is in the HEVC block. The H.264 encoder will output B-frames if the
> hardware supports it and the -bf parameter is used with a value of 1 or
> more.

Oh yes, the patch was that old, that I have actually mixed this up. It was for HEVC.
I found the original bug: https://github.com/HandBrake/HandBrake/pull/1522
I could change the subject and the commit message accordingly, if thats fine?


>
>>      }
>>>
>>>      enc_info = CFDictionaryCreateMutable(
>>> --
>>> 2.21.1 (Apple Git-122.3)
>>>
>>
>>
>> What do I need to do to get this reviewed? Its just a one-liner.
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
diff mbox series

Patch

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index cc08cf6a50..32d893e485 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -1355,6 +1355,7 @@  static int vtenc_configure_encoder(AVCodecContext *avctx)
         vtctx->get_param_set_func = compat_keys.CMVideoFormatDescriptionGetHEVCParameterSetAtIndex;
         if (!vtctx->get_param_set_func) return AVERROR(EINVAL);
         if (!get_vt_hevc_profile_level(avctx, &profile_level)) return AVERROR(EINVAL);
+        vtctx->has_b_frames = avctx->max_b_frames > 0;
     }

     enc_info = CFDictionaryCreateMutable(