- May 12, 2021
-
-
David Staessens authored
This CL changes the V4L2 decoder and encoder to use the Android Size structure instead of the one copied from Chrome, the Chrome size.h file is removed. Bug: 155138142 Test: arc.VideoEncodeAccel.h264_192p_i420_vm arc.VideoDecodeAccel.h264_vm Change-Id: I8f63e847d8cf4ffd33621706287a44c93a4864fd
-
- Mar 01, 2021
-
-
Chih-Yu Huang authored
Originally we assume the buffers at BufferQueue are not moved to different slot. Then we could track the buffers by the slot index. However, MediaSync implementation detach buffers and attach back to BufferQueue. The slot index might be changed. This CL changes to use GEM handle as the identifier of graphic buffers. Because all the graphic buffers are allocated by gralloc, we could get the GEM handle by DRM. V4L2GraphicAllocator is not used anymore. Bug: 177484971 Test: android.media.cts.AdaptivePlaybackTest Change-Id: I6b7f3f9a6c1d6b97d0e44aa2a19bc71ad3bab880
-
- Jan 12, 2021
-
-
Chih-Yu Huang authored
At ag/12937817 we add V4L2GraphicAllocator to add unique ID for each graphic buffer. This CL switches to use V4L2GraphicAllocator for output buffer allocator. Also we change to use the unique ID instead of IGBP slot in surface mode (C2VdaBqBlockPool), and buffer ID from BufferPoolData in byte buffer mode (C2VdaPooledBlockPool). Bug: 171845630 Test: android.media.cts.AdaptivePlaybackTest#testH264_* Change-Id: Iab06148a09c9ddb01634399c386a0aaea77aaabd
-
Chih-Yu Huang authored
CPU access to buffers is not required in surface mode. This change makes VideoFramePool not set CPU_READ usage flag for surface mode, to allow for more efficient buffers to be used. Bug: 169212117 Test: pass tast.arc.VideoDecodeAccel.vp8_vm Change-Id: I893096a89a54d8784def3650b4a8985e5decbd8d
-
Chih-Yu Huang authored
When resolution changes, the caller calls C2VdaBqBlockPool::requestNewBufferSet() first, then C2VdaBqBlockPool will retrieve C2Block from the bufferqueue. Originally C2VdaBqBlockPool updates the buffer format after getting N C2Blocks from bufferqueue. However, the buffer format should be determined when the caller call requestNewBufferSet(). This CL changes the method signature of requestNewBufferSet(), and passes the buffer format via the method. Bug: 168557465 Test: pass android.media.cts.AdaptivePlaybackTest#testVP8_adaptiveDrc with related CLs Change-Id: If65562eacdb11823cda3af6adde1f5afb6f7339d
-
- Sep 03, 2020
-
-
Chih-Yu Huang authored
Originally, when C2VdaBqBlockPool timed out to fetch a block, the method is blocking to wait for buffer released. If this blocking waiting also timed out, then VideoFramePool would retry again with exponential backoff. We have 2 retry mechanisms for timed out in both VideoFramePool and C2VdaBqBlockPool, which is redundant. In this CL, the C2VdaBqBlockPool method return C2_TIMED_OUT directly when there is no available block. Then VideoFramePool set a callback to C2VdaBqBlockPool. When there is an available block, C2VdaBqBlockPool will notify VideoFramePool via the callback. Bug: 166072201 Test: pass tast.arc.VideoDecodeAccel.h264_vm Change-Id: I27380f144a496457349799cf5ad15c5f8986e307
-
- Sep 02, 2020
-
-
Chih-Yu Huang authored
Originally, VideoFramePool can accept multiple requests in parallel. However, it increases the code complexity. Also, currently the caller only request one frame at the same time. This CL changes the VideoFramePool to accept one request at the same time. Bug: 166072201 Test: pass tast.arc.VideoDecodeAccel.h264_vm Change-Id: I16811e1d004dcaf8baeb70efb4a1cb5d2a3daacf
-
- Aug 31, 2020
-
-
David Staessens authored
This CL removes the duplicate HalPixelFormat and InputCodec types in common.h that are also present in VideoTypes.h. VideoTypes.h is moved to the common/ folder so it can also be used by other classes. note: Submit together with ag/12467730 Bug: 143333813 Test: tast run $HOST arc.VideoEncodeAccel.h264_vm on hatch-arc-r Change-Id: I93bca14a3b2f0c4c49104149d5683193554ba3eb
-
- Aug 26, 2020
-
-
David Stevens authored
This reduces the verbosity of logs that appear very often during execution of the c2_e2e_test. Bug: 166401871 Test: Run c2_e2e_test and verify there is no logspam Change-Id: Ie21c54f50b52c6062f8e7b6c9bc02ef226d3451d
-
- Aug 04, 2020
-
-
Chih-Yu Huang authored
Originally we pass arbitrary output buffers to V4L2 Queue. However, the V4L2 stateful API requires the caller pass the same buffers to the output queue slot. This CL implement this requirement. Bug: 161770200 Bug: 161323057 Test: arc.VideoDecodeAccel.h264_vm runs first test successfully. Change-Id: I8f6c8871997f310425571b3983ae86f05c0c37c6
-
Alexandre Courbot authored
The VideoFramePool needs to poll its backing block pool until a buffer becomes available. The current strategy is to sleep and repeat a number of times before giving up, but this carries the risk that some slower platforms will fail to receive buffers in the alloted time and introduce flakyness. Also the constant time between requests results in many requests to the block pool when it is empty, a situation that typically corresponds to the decoder having plenty of buffers at its disposal and thus not being in a particular hurry for a new buffer. Switch to an exponential backoff strategy for the block pool polling, and remove the time boundary. The exponential backoff limits the number of queries that are done to the block pool, and the absence of time makes the whole process safer. In case of a real error, the backing block pool is supposed to return a proper error code that we will propagate anyway. Bug: 161323057 Test: arc.VideoDecodeAccel.h264_vm does not time out waiting for buffers on Kukui. Change-Id: Ic3b9915926680cfd263352a7922658ec9a60b5cf
-
- Jul 30, 2020
-
-
Chih-Yu Huang authored
The V4L2 stateful API requires the caller pass the same buffers to the output queue slot. Originally we use C2PooledBlockPool for byte buffer mode, but C2PooledBlockPool cannot get buffer identifier. This CL switches to use C2VdaPooledBlockPool, which guarantees to return a fixed set of buffers and could query the buffer index. Bug: 161770200 Test: pass e2e test Change-Id: Ief2bdd9ceb6655cd47627ccf6c239a1e6d73482e
-
- Jul 03, 2020
-
-
Chih-Yu Huang authored
This CL adds or fixes some information at logging, not changing the code logic. Bug: 160110407 Test: m -j32 Change-Id: I97d2cd43a526e56000abcc16886b1f0f6e0f6b71
-
- Jun 05, 2020
-
-
Chih-Yu Huang authored
Originally VideoFramePool shared the same thread with V4L2Decoder. It turned out the performance is pretty bad, many frames were dropped. In this CL, VideoFramePool creates a dedicated thread and fetch GraphicBlock on this thread. Bug: 146406514 Test: pass e2e test Change-Id: I3c51cf1ce1d8e40fb52ad947d779e8c0ad2f754c
-
- Jun 02, 2020
-
-
Chih-Yu Huang authored
This CL implements V4L2DecodeComponent, a decode C2Component via V4L2 API. It mainly contains these parts: - VideoDecoder: An interface for video decoding, similar to media::VideoDecoder at Chromium project. - V4L2Decoder: An implementation of VideoDecoder via V4L2 stateful API. We wrap all V4L2-related logic in this class - VideoFrame The data structure to represent the output buffer of VideoDecoder. It encapsulates a C2GraphicBlock and only exposes the essential information of physical buffers. - VideoFramePool: The buffer pool used by VideoDecoder. It encapsulates C2BlockPool and provides asynchronous method to fetch buffers. - V4L2DecodeComponent, V4L2DecodeInterface: The C2Component implementation that delegates the decode request to V4L2Decoder. - V4L2ComponentFactory: The C2ComponentFactory that creates V4L2DecodeComponent. Bug: 152714603 Test: mmm external/v4l2_codec2/ Test: Run e2e test and make sure the V4L2DecodeComponent is running Change-Id: I23e9b3553b62dd6c83d943d7787297305372c37d
-