[Ffmpeg-devel] h264 tc0_table usage
Luca Barbato
lu_zero
Sun Oct 15 23:57:23 CEST 2006
Loren Merritt wrote:
> On Sun, 15 Oct 2006, Luca Barbato wrote:
>
>> the tables are int
>>
>> libavcodec/h264data.h
>> static const int tc0_table[52][3] = {
>> static const int alpha_table[52] = {
>> static const int beta_table[52] = {
>
> regardless of the usage, the tables could be stored as int8_t if the
> reduced cache footprint helps.
Ok
>
>> But sometimes they are used as uint8_t sometimes as int.
>>
>> libavcodec/h264.c
>> int8_t tc[4];
>> int8_t tc[4];
>> int8_t tc[4];
>> int8_t tc[4];
>
> this case needs to be int8_t because they're used in mmx code that wants
> all the entries in one register.
I'd like to have all of them int because I like to have all of them in a
single register.... (altivec)
I'll try to understand better the mmx code and see if I have mime it on
half register or I can use full regs.
>
>> libavcodec/h264.c
>> const int tc0 = tc0_table[index_a][bS[bS_index] - 1];
>> int tc = tc0;
>> const int tc = tc0_table[index_a][bS[bS_index] - 1] + 1;
>
> and this case uses int because scalar math is faster on int than on int8_t.
Yes.
--
Luca Barbato
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero
More information about the ffmpeg-devel
mailing list