diff mbox

[FFmpeg-devel] avcodec/openh264enc.c: generate IDR frame in response to I frame pict_type

Message ID CAGTf1MmsJLtCjCqj0O1OfTGOVPiETWggm7XHKMBahVn_NgTGaA@mail.gmail.com
State Accepted
Commit 67fd8df4197e50720223f9715594a1fa31f48b54
Headers show

Commit Message

Valery Kot March 16, 2018, 2:04 p.m. UTC
On Wed, Mar 14, 2018 at 2:12 PM, Moritz Barsnick <barsnick@gmx.net> wrote:
>
> On Mon, Mar 12, 2018 at 14:38:21 -0800, Lou Logan wrote:
>
> > But you don't necessarily need to make a new patch to address the
> > minor whitespace issue. You can wait for other comments and include
> > it with any other requested changes.
>
> Another whitespace nit:
>
> >  if (frame->pict_type==AV_PICTURE_TYPE_I) {
>
> Please use single spaces around operators, i.e.
>   if (frame->pict_type == AV_PICTURE_TYPE_I) {
>
> Moritz

Attached is an updated patch incorporating all feedback - only
formatting for now.

Friendly ping to maintainers to review and pull the patch.

Valery
From 8334dfcea924ac687783d2ad7685ad143a2f1a26 Mon Sep 17 00:00:00 2001
From: vkot <valery.kot@4cinsights.com>
Date: Fri, 16 Mar 2018 14:50:34 +0100
Subject: [PATCH v2] avcodec/openh264enc.c: generate IDR frame in response to I
 frame pict_type

Signed-off-by: vkot <valery.kot@gmail.com>
---
 libavcodec/libopenh264enc.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Valery Kot March 20, 2018, 8:21 a.m. UTC | #1
On Fri, Mar 16, 2018 at 3:04 PM, Valery Kot <valery.kot@gmail.com> wrote:
>
> Attached is an updated patch incorporating all feedback - only
> formatting for now.
>
> Friendly ping to maintainers to review and pull the patch.
>
> Valery

Another ping.
Valery Kot March 26, 2018, 6:51 a.m. UTC | #2
On Tue, Mar 20, 2018 at 9:21 AM, Valery Kot <valery.kot@gmail.com> wrote:
> On Fri, Mar 16, 2018 at 3:04 PM, Valery Kot <valery.kot@gmail.com> wrote:
>>
>> Attached is an updated patch incorporating all feedback - only
>> formatting for now.
>>
>> Friendly ping to maintainers to review and pull the patch.
>>
>> Valery
>
> Another ping.
Just wondering: is there an active maintainer for avcodec/libopenh264?
If yes - can he or she please review my patch. If no - how does
maintenance works for "orphaned" modules?
I really need my patch in.
PLEASE!
Lou Logan April 5, 2018, 6:25 p.m. UTC | #3
On Sun, Mar 25, 2018, at 10:51 PM, Valery Kot wrote:
>
> Just wondering: is there an active maintainer for avcodec/libopenh264?

Doesn't appear to be so.

> If yes - can he or she please review my patch. If no - how does
> maintenance works for "orphaned" modules?

Any developer simply decides to review, approve, and/or push it. Sorry for the wait, but I recommend pinging this thread once a week until so.

If it has been a while make sure your patch still applies cleanly to the git master branch before pinging. Otherwise please provide an updated patch.
James Almer April 5, 2018, 7:02 p.m. UTC | #4
On 4/5/2018 3:25 PM, Lou Logan wrote:
> On Sun, Mar 25, 2018, at 10:51 PM, Valery Kot wrote:
>>
>> Just wondering: is there an active maintainer for avcodec/libopenh264?
> 
> Doesn't appear to be so.
> 
>> If yes - can he or she please review my patch. If no - how does
>> maintenance works for "orphaned" modules?
> 
> Any developer simply decides to review, approve, and/or push it. Sorry for the wait, but I recommend pinging this thread once a week until so.
> 
> If it has been a while make sure your patch still applies cleanly to the git master branch before pinging. Otherwise please provide an updated patch.

Pushed it. It's been a month and with no maintainer and apparently no
devs using this module it's clear nobody is going to look at it.
Valery Kot April 6, 2018, 8:39 a.m. UTC | #5
On Thu, Apr 5, 2018 at 9:02 PM, James Almer <jamrial@gmail.com> wrote:
> On 4/5/2018 3:25 PM, Lou Logan wrote:
>> On Sun, Mar 25, 2018, at 10:51 PM, Valery Kot wrote:
>>>
>>> Just wondering: is there an active maintainer for avcodec/libopenh264?
>>
>> Doesn't appear to be so.
>>
>>> If yes - can he or she please review my patch. If no - how does
>>> maintenance works for "orphaned" modules?
>>
>> Any developer simply decides to review, approve, and/or push it. Sorry for the wait, but I recommend pinging this thread once a week until so.
>>
>> If it has been a while make sure your patch still applies cleanly to the git master branch before pinging. Otherwise please provide an updated patch.
>
> Pushed it. It's been a month and with no maintainer and apparently no
> devs using this module it's clear nobody is going to look at it.

Thanks, appreciated!

If needed, I volunteer to be a maintainer for libopenh264*, as I am
actively using this codec.

Valery
diff mbox

Patch

diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index fdadb101f5..83c3f0ce20 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -246,6 +246,10 @@  static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     sp.iPicWidth  = avctx->width;
     sp.iPicHeight = avctx->height;
 
+    if (frame->pict_type == AV_PICTURE_TYPE_I) {
+        (*s->encoder)->ForceIntraFrame(s->encoder, true);
+    }
+
     encoded = (*s->encoder)->EncodeFrame(s->encoder, &sp, &fbi);
     if (encoded != cmResultSuccess) {
         av_log(avctx, AV_LOG_ERROR, "EncodeFrame failed\n");