vp8, vp9: Validate references in set/copy/get_reference controls
Check that the Y, U, and V plane pointers are non-NULL before
converting to YV12_BUFFER_CONFIG in:
- VP8 decoder: vp8_set_reference(), vp8_get_reference()
- VP9 encoder: ctrl_set_reference(), ctrl_copy_reference()
- VP9 decoder: ctrl_set_reference(), ctrl_copy_reference()
This prevents NULL pointer dereferences in vpx_yv12_copy_frame()
and complements the fix in 0a6f769 for bug 564326909. Also check
return values of vp9_set_reference_enc() and
vp9_copy_reference_enc().
Added unittests for VP8/VP9 decoder and VP9 encoder.
Bug: 564326909
Change-Id: Idbecd524b7913f4db9b3eaa28b489e702bb7d91d
5 files changed