cleanup: collect twopass variables
authorJohn Koleszar <jkoleszar@google.com>
Thu, 19 May 2011 21:16:39 +0000 (17:16 -0400)
committerJohn Koleszar <jkoleszar@google.com>
Thu, 19 May 2011 21:26:09 +0000 (17:26 -0400)
commit63cb1a7ce0cb7b41ec3f5c3ad05202eed00ff22a
tree7c70769c2bb6d9b6697567c2528ecbd693e869c2
parent048497720c499c802d4e69b2ef9ba0859ca36587
cleanup: collect twopass variables

This patch collects the twopass specific memebers of VP8_COMP into a
dedicated struct. This is a first step towards isolating the two pass
rate control and aids readability by decorating these variables with
the 'twopass.' namespace. This makes it clear to the reader in what
contexts the variable will be valid, and is a hint that a section of
code might be a good candidate to move to firstpass.c in later
refactoring. There likely will be other rate control modes that need
their own specific data as well.

This notation is probably overly verbose in firstpass.c, so an
alternative would be to access this struct through a pointer like
'rc->' instead of 'cpi->firstpass.' in that file. Feel free to make
a review comment to that effect if you prefer.

Change-Id: I0ab8254647cb4b493a77c16b5d236d0d4a94ca4d
vp8/encoder/firstpass.c
vp8/encoder/onyx_if.c
vp8/encoder/onyx_int.h
vp8/encoder/picklpf.c
vp8/encoder/ratectrl.c
vp8/encoder/rdopt.c