[FFmpeg-devel] [PATCH] Add x86-optimized function ac3_or_abs_int16() and use in log2_tab().
Justin Ruggles
justin.ruggles
Sat Feb 12 03:21:40 CET 2011
On 02/11/2011 08:48 PM, M?ns Rullg?rd wrote:
> Justin Ruggles <justin.ruggles at gmail.com> writes:
>
>> diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h
>> index 7f13b11..a6a9af4 100644
>> --- a/libavcodec/ac3dsp.h
>> +++ b/libavcodec/ac3dsp.h
>> @@ -35,6 +35,17 @@ typedef struct AC3DSPContext {
>> * @param nb_coefs number of frequency coefficients.
>> */
>> void (*ac3_exponent_min)(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
>> +
>> + /**
>> + * Calculate the logical 'or' of the absolute value of each element in an
>> + * array of int16_t.
>> + * @param src input array
>> + * constraints: align 16
>> + * @param len number of values in the array
>> + * constraints: multiple of 16 greater than 0
>> + * @return abs(src[0]) | abs(src[1]) | ... | abs(src[len-1])
>> + */
>> + int (*ac3_or_abs_int16)(const int16_t *src, int len);
>> } AC3DSPContext;
>
> What is the range of the input values? Specifically, is INT16_MIN allowed?
> Whatever the answer, please mention it in the comment.
Good point. It does not handle INT16_MIN. I'll update the patch after I
get some comments on the x86 parts.
-Justin
More information about the ffmpeg-devel
mailing list