From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] Added support for MB_INFO
Date: Thu, 23 Jun 2022 16:21:18 +0200
Message-ID: <DB6PR0101MB2214DF70FF18BB95459CAD608FB59@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <165599096835.13099.14253738660427313095@lain>
Anton Khirnov:
> Quoting Carotti, Elias (2022-06-21 10:48:07)
>> Hi,
>>
>> extending AVVideoEncParams was the first hypothesis I made but it
>> didn't seem it was the proper place to add the mb_info flags.
>>
>> I may be wrong but my impression is that AVVideoEncParams is used to
>> carry encoding parameters read from the bitstream at the decoder side
>> while here were going the other direction, i.e., were passing
>> information from the application to the encoder.
>>
>> Secondly, mb_info can't be strictly considered encoding parameters and
>> it's not present in the bitstream at all.
>> It's just a way to give hints to the libx264 encoder on which
>> macroblock we know have not changed since the previous frame and could
>> be coded as P_SKIPs. Libx264 however, may or may not oblige according
>> to its logic, and this specific information is not transmitted in the
>> bitstream nor can be recovered at the decoder.
>
> Right, seems I was too hasty in reading your patch.
>
> But then I have to wonder whether this really needs a new installed
> header, with a struct and a destructor, given that it's specific to a
> single encoder for a single codec that is about 20 years old now.
>
> Wouldn't AV_FRAME_DATA_X264_MBINFO that would be just a raw array of
> uint8_t serve your needs just as fine? You could even get custom buffer
> management by using AVFrameSideData.buf.
>
There is one problem though: libx264's free functions don't accept an
opaque parameter, so one can't easily create a reference for libx264 to
unref. I don't see a way around duplicating this buffer in the encoder.
(Or is there a way to know when libx264 is done with using this buffer?)
- Andreas
_______________________________________________
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".
next prev parent reply other threads:[~2022-06-23 14:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 10:11 Carotti, Elias
2022-06-17 8:41 ` Carotti, Elias
2022-06-17 9:40 ` Timo Rothenpieler
2022-06-17 10:15 ` Carotti, Elias
2022-06-17 10:34 ` Timo Rothenpieler
2022-06-17 10:59 ` Carotti, Elias
2022-06-17 15:10 ` Timo Rothenpieler
2022-06-17 15:30 ` Carotti, Elias
2022-06-17 23:41 ` Stefano Sabatini
2023-05-03 12:27 ` Carotti, Elias
2023-05-05 8:03 ` Carotti, Elias
2022-06-18 15:06 ` Anton Khirnov
2022-06-21 8:48 ` Carotti, Elias
2022-06-23 13:29 ` Anton Khirnov
2022-06-23 14:21 ` Andreas Rheinhardt [this message]
2022-06-23 14:48 ` Anton Khirnov
2022-06-24 9:14 ` Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB6PR0101MB2214DF70FF18BB95459CAD608FB59@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git