[FFmpeg-devel] [PATCH] liavcodec: add bit-rate support to RoQ video encoder

Victor Luchitz vluchits at gmail.com
Mon Jan 22 23:40:44 EET 2024


On Tue, Jan 23, 2024 at 12:12 AM Tomas Härdin <git at haerdin.se> wrote:

> mån 2024-01-22 klockan 22:14 +0300 skrev Victor Luchits:
> > The bitrate option (-b:v) can now be used to specify the bit rate
> > of the video stream of the RoQ encoder.
> >
> > Original patch by Joseph Fenton aka Chilly Willy
> >
> > Signed-off-by: Victor Luchits <vluchits at gmail.com>
>
> Still doesn't apply.
>

I have no clue as to what's going on there.. The patch applies perfectly
fine
without all the eml stuff.

root at banana:~/ffmpeg# git reset --hard origin/master
HEAD is now at d2eb6f4d44 fftools/ffmpeg_mux_init: don't free the
AVDictionaryEntry until after it's been used
root@ banana:~/ffmpeg# git apply
0001-liavcodec-add-bit-rate-support-to-RoQ-video-encoder.patch
root@ banana:~/ffmpeg# echo $?
0

Any help would be highly appreciated.


> > +    /* Keyframe when no MOT or FCC codes in frame */
> > +    if (s->key_frame) {
> > +        av_log(avctx, AV_LOG_VERBOSE, "\nFound keyframe!\n");
> > +        rframe->pict_type = AV_PICTURE_TYPE_I;
> > +        avpkt->flags |= AV_PKT_FLAG_KEY;
> > +    } else {
> > +        rframe->pict_type = AV_PICTURE_TYPE_P;
> > +        avpkt->flags &= ~AV_PKT_FLAG_KEY;
> > +    }
>
> Looks like framesSinceKeyframe still doesn't get reset
>

framesSinceKeyframe wasn't introduced in this patch and I'm a bit scared
to mess with it as part of this changeset as that would introduce some new
changes to the core of the original implementation.


> > +    if (avctx->bit_rate) {
> > +        /* no specific bit rate desired, use frame quality */
> > +        if (frame->quality)
> > +            enc->lambda = frame->quality - 1;
> > +        else
> > +            enc->lambda = 2*ROQ_LAMBDA_SCALE;
> > +    }
>
> Looks like you got this backwards
>

You're totally right, thanks!

I'll resubmit the patch once we figure out what's the deal with git failing
to apply the patch for you.


>
> /Tomas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


-- 
Best regards,
 Victor Luchitz


More information about the ffmpeg-devel mailing list