media/gpu/V4L2VEA: Let some processing execute in encoder thread

V4L2VideoEncodeAccelerator performs almost initializations and all functions of
image processors in GPU main thread. Since GPU main thread can outlive V4L2VEA,
we have to handle the post task with weak pointer in some places. This also
enables to manage v4l2 queues in image processor and v4l2 queues in encoder
easily. Furthermore, the task executed by GPU main thread reduce, which is
generally good because GPU main thread tends to be busy all the time.

Bug: 938156
Test: video_encode_accelerator_unittest
Test: appr.tc on kevin
Change-Id: I95f7b3119f940e0adac5fce25ec6ccbb5b044e14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1680726
Commit-Queue: Hirokazu Honda <[email protected]>
Reviewed-by: Alexandre Courbot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#675153}
2 files changed