Codec2BufferUtils: use libyuv to copy between NV12 and I420

In previous algorithm copying U/V planes between interleaved format (NV12) and
planar format (I420) is quite not efficient. libyuv provides NV12ToI420 and
I420ToNV12 copy functions which we could utilize if the source and destination
formats are met.

In practice, the consuming time for copying one image could save more than a
half by using libyuv.

Bug: 119859614
Bug: 120425569
Test: CtsMediaTestCases android.media.cts.DecoderTest#testVP9Decode30fps3840x2160
Test: CtsMediaTestCases android.media.cts.DecoderTest#testVP9Decode60fps3840x2160
Change-Id: If5ff833aa34f80af960b2b012772ed7c8187ce77
(cherry picked from commit d3d4232d872c2c038ee52439fd79f2ee803b73a3)
3 files changed
tree: 4a2bf3934fa04df2709120742d32438a71014dc8
  1. codec2/
  2. hooks/
  3. media/
  4. Android.bp
  5. OWNERS