Possible inefficiency in encode.c

Chris Cooksey <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.theora.devel
Message-ID <C6F2831B.28AF4%[email protected]>
Hi,

I am very new to Theora, having just started working through the code a few
weeks ago.

I am working on a requantization tool to reduce bit rates, hopefully on the
fly, for some video conferencing work.

As I was working through the encoding phase I noticed this line in encode.c:

     for(ti=_enc->dct_token_offs[pli][zzi];ti<ndct_tokens;ti++){

It's around line 804, but I am working with 1.1b3 sources so it may have
moved a bit.

Anyway, I am thinking that this line might be an adequate substitute:

     for(ti=0;ti<ndct_tokens;ti++){

Because the tokens are now stored in separate per plane arrays instead of
all strung together in one big array like they used to be. I presume the
point of doing that was to eliminate the need for dct_token_offs altogether.

I see dct_token_offs being used in a couple of other places too.

I could be wrong of course. Please don't beat this neophyte up if I am :-)

Thanks,
Chris.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.