[FFmpeg-devel] Patch - Allow disabling of bit reservoir when encoding MP3 audio
Michael Niedermayer
michaelni
Sat Feb 9 19:19:34 CET 2008
On Sat, Feb 09, 2008 at 03:28:16PM +0000, Paul Kelly wrote:
> On Fri, 8 Feb 2008, Michael Niedermayer wrote:
>
>> On Fri, Feb 08, 2008 at 09:57:47PM +0000, Paul Kelly wrote:
>>
> [...]
>> Everything else is disabled by default and has enable flags.
>> I definitly want the flag to be an enable flag. The default is a seperate
>> issue, we might choose to leave it enabled.
>> "-flags2 -reservoir" would disable it
>> "-flags2 +reservoir" would enable it
>> this is much cleaner than a +disable_reservoir
>>
> [...]
>>> So I'm not sure what to do about the WMA encoder. Would it be acceptable
>>> to put in some code that prints a warning that the bit reservoir will not
>>> be used even though it is specified? I mean just so there is some
>>> reference to this AVCodecContext disable bit reservoir flag there so
>>> someone hacking the code in the future will be reminded to use it.
>>
>> If you want to add that ...
>
> OK, I've attached two patches for consideration. The first, flags2.patch,
> re-arranges the code for setting WMA flags in wmaenc.c to make it clearer.
> It seemed to be a copy and paste of the code in wmadec.c, otherwise it
> doesn't make much sense. It should be clear from the patch my understanding
> of what the code is supposed to do, and I hope my changes are acceptable.
> This patch also adds the warning if the bit reservoir flag is set, and
> unsets it.
Rearanging is a cosmetical change and must be in a seperate patch from
functional changes.
>
> The second patch, bitres.patch, adds the new flag
> CODEC_FLAG2_BIT_RESERVOIR, sets it by default to on, and increases the
> micro version number of libavcodec to indicate the new feature. It also
> changes libavcodec/libmp3lame.c and libavcodec/wmaenc.c to use the new
> flag.
this one looks ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080209/5a67ba28/attachment.pgp>
More information about the ffmpeg-devel
mailing list