[FFmpeg-devel] [PATCH] write AC-3 metadata
Justin Ruggles
justin.ruggles
Fri Dec 31 17:57:59 CET 2010
On 12/30/2010 09:46 PM, Michael Niedermayer wrote:
> On Wed, Dec 29, 2010 at 05:20:36PM -0500, Justin Ruggles wrote:
>> Hi,
>>
>> On 12/25/2010 03:05 PM, Michael Niedermayer wrote:
>>
>>> On Wed, Dec 22, 2010 at 01:26:13PM -0500, Justin Ruggles wrote:
>>>> + {"0", "+3.0 dB (1.414)", 0, FF_OPT_TYPE_CONST, 0, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtcmixlev"},
>>>> + {"1", "+1.5 dB (1.189)", 0, FF_OPT_TYPE_CONST, 1, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtcmixlev"},
>>>> + {"2", "+0.0 dB (1.000)", 0, FF_OPT_TYPE_CONST, 2, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtcmixlev"},
>>>> + {"3", "-1.5 dB (0.841)", 0, FF_OPT_TYPE_CONST, 3, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtcmixlev"},
>>>> + {"4", "-3.0 dB (0.707)", 0, FF_OPT_TYPE_CONST, 4, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtcmixlev"},
>>>> + {"5", "-4.5 dB (0.595) (default)", 0, FF_OPT_TYPE_CONST, 5, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtcmixlev"},
>>>> + {"6", "-6.0 dB (0.500)", 0, FF_OPT_TYPE_CONST, 6, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtcmixlev"},
>>>> + {"7", "-inf dB (0.000)", 0, FF_OPT_TYPE_CONST, 7, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtcmixlev"},
>>>> +{"ltrtsurmixlev", "Lt/Rt Surround Mix Level", offsetof(AC3EncodeContext, options.lt_rt_surround_mix_level), FF_OPT_TYPE_INT, -1, -1, 7, AC3ENC_PARAM, "ltrtsurmixlev"},
>>>> + {"3", "-1.5 dB (0.841)", 0, FF_OPT_TYPE_CONST, 3, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtsurmixlev"},
>>>> + {"4", "-3.0 dB (0.707)", 0, FF_OPT_TYPE_CONST, 4, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtsurmixlev"},
>>>> + {"5", "-4.5 dB (0.595)", 0, FF_OPT_TYPE_CONST, 5, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtsurmixlev"},
>>>> + {"6", "-6.0 dB (0.500) (default)", 0, FF_OPT_TYPE_CONST, 6, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtsurmixlev"},
>>>> + {"7", "-inf dB (0.000)", 0, FF_OPT_TYPE_CONST, 7, INT_MIN, INT_MAX, AC3ENC_PARAM, "ltrtsurmixlev"},
>>>> +{"lorocmixlev", "Lo/Ro Center Mix Level", offsetof(AC3EncodeContext, options.lo_ro_center_mix_level), FF_OPT_TYPE_INT, -1, -1, 7, AC3ENC_PARAM, "lorocmixlev"},
>>>> + {"0", "+3.0 dB (1.414)", 0, FF_OPT_TYPE_CONST, 0, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorocmixlev"},
>>>> + {"1", "+1.5 dB (1.189)", 0, FF_OPT_TYPE_CONST, 1, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorocmixlev"},
>>>> + {"2", "+0.0 dB (1.000)", 0, FF_OPT_TYPE_CONST, 2, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorocmixlev"},
>>>> + {"3", "-1.5 dB (0.841)", 0, FF_OPT_TYPE_CONST, 3, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorocmixlev"},
>>>> + {"4", "-3.0 dB (0.707)", 0, FF_OPT_TYPE_CONST, 4, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorocmixlev"},
>>>> + {"5", "-4.5 dB (0.595) (default)", 0, FF_OPT_TYPE_CONST, 5, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorocmixlev"},
>>>> + {"6", "-6.0 dB (0.500)", 0, FF_OPT_TYPE_CONST, 6, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorocmixlev"},
>>>> + {"7", "-inf dB (0.000)", 0, FF_OPT_TYPE_CONST, 7, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorocmixlev"},
>>>> +{"lorosurmixlev", "Lo/Ro Surround Mix Level", offsetof(AC3EncodeContext, options.lo_ro_surround_mix_level), FF_OPT_TYPE_INT, -1, -1, 7, AC3ENC_PARAM, "lorosurmixlev"},
>>>> + {"3", "-1.5 dB (0.841)", 0, FF_OPT_TYPE_CONST, 3, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorosurmixlev"},
>>>> + {"4", "-3.0 dB (0.707)", 0, FF_OPT_TYPE_CONST, 4, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorosurmixlev"},
>>>> + {"5", "-4.5 dB (0.595)", 0, FF_OPT_TYPE_CONST, 5, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorosurmixlev"},
>>>> + {"6", "-6.0 dB (0.500) (default)", 0, FF_OPT_TYPE_CONST, 6, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorosurmixlev"},
>>>> + {"7", "-inf dB (0.000)", 0, FF_OPT_TYPE_CONST, 7, INT_MIN, INT_MAX, AC3ENC_PARAM, "lorosurmixlev"},
>>>
>>> dont float/double make more sense here?
>>
>>
>> Well, I thought it would be better this way so that the valid option
>> values could be listed to the user and validated by AVOption. But if
>> you prefer floats, I have an alternative implemented that checks the
>> value against a list of valid values with a tolerance of +/-0.01. If
>> the value is not in the list, a warning is printed and a default value
>> is used instead. Does that sound like a better option?
>
> with names like lorosurmixlev it doesnt matter ;)
> noone will ever use it except you and members of the standard comittee ;)
point taken. I can change them to use the long names (e.g.
lo_ro_surround_mix_level).
-Justin
More information about the ffmpeg-devel
mailing list