media/gpu/VaapiVEA: Set a size of a reconstructed surface to coded size
There are two modes in VEA, native input mode and non native input mode. In native input mode, a input buffer given by VEA client is a graphic native input buffer. The buffer alignment is decided in minigbm implementation. It is 64 and 4 for width and height, respectively. In non native input mode, the buffer is a shared memory based buffer. The width and height is specified by VEA. crrev.com/c/1810453 changes a dimension alignment for an input buffer in HW video encoder using VA-API. The width and height are aligned by 16 before the CL. The width is aligned by 64 and height aligned by 4 since the CL. For example, if a configured encode stream size is 176x144. | A size of buffer | VA Surface size | VA surface size for | given by client | for an input buffer | a reconstructed surface N-I mode | 192x144 | 192x144 | 192x144 non N-I mode | 192x144 | 192x144 | 192x144 This change causes a lot of failures in chrome encoder test (crbug.com/1009297) and CTS (b:142210669). This CL is expected to mitigate the failures. A reconstructed surface size is the same as coded size, whose width and height both are aligned by 16. The size of a buffer is the same as coded size in non native input mode. This is fine because an input buffer is copied in a client size in non native input mode. The sizes in the above example are below. | A size of buffer | VA Surface size | VA surface size for | given by client | for an input buffer | a reconstructed surface N-I mode | 192x144 | 192x144 | 176x144 non N-I mode | 176x144 | 176x144 | 176x144 Bug: 1009297, 1005205 Bug: b:142210669, b:142217112, b:142091557 Test: EncodeDecodeTest#testEncodeDecodeVideoFromBufferToBufferQCIF on caroline Test: VEA unittest on eve Change-Id: Ibca0f951ace886fcbeb8031e886c196913f69cca Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1847432Reviewed-by:Pawel Osciak <posciak@chromium.org> Commit-Queue: Hirokazu Honda <hiroh@chromium.org> Cr-Commit-Position: refs/heads/master@{#705017}
Showing
Please register or sign in to comment