Improve the libvpx encoder test driver
authorYunqing Wang <yunqingwang@google.com>
Fri, 12 Dec 2014 22:34:30 +0000 (14:34 -0800)
committerYunqing Wang <yunqingwang@google.com>
Wed, 17 Dec 2014 16:49:46 +0000 (08:49 -0800)
commit3666478195144bdf207d99877d2005af231a5651
tree171e2734523e6ec2b4b6c97580e38c007227b184
parentaeeaa679876be7709e55152c979c562787253c49
Improve the libvpx encoder test driver

The encoder initialization is called in EncodeFrame(). Therefore,
in the unit tests, the set control is done when video->frame() is 1.
This didn't cause problem since current tests mainly test lag_frame
> 0 case, or no encoding option that needs to allocate memory before
1st frame is used. If use lag_frame = 0 and encoding multiple tiles,
the unit tests crash. The issue is fixed by doing the initialization
before encoding frames.

Change-Id: I43102048f88448bcf27e9c60e0ec06c176b02e5c
test/encode_test_driver.cc
test/encode_test_driver.h