diff options
author | Harish Mahendrakar <harish.mahendrakar@ittiam.com> | 2019-08-26 16:22:41 -0700 |
---|---|---|
committer | Jose Cubero <josecubero@google.com> | 2019-11-16 01:35:27 +0000 |
commit | 4900ae28b35d301a2baab23d537a4b9344ce0ee6 (patch) | |
tree | 9037ce4836e6a916dd8c2b21f979d6fe61d00ce5 | |
parent | 4333c308afa4a695fd8f444d308b794cad656a6e (diff) | |
download | av-4900ae28b35d301a2baab23d537a4b9344ce0ee6.tar.gz |
C2SoftMpeg4Enc: Handle yStride not equal to aligned width
mpeg4 encoder doesn't support a stride that is not equal to align(width, 16)
In such cases copy the input to an intermediate buffer and use that for
encoding
Bug: 143506888
Bug: 136962421
Bug: 139921039
Test: tested few nv12 and i420 encoding
Change-Id: I5a8adfc48aff79f52852be94bb46c10e7f9a0469
(cherry picked from commit a6dfef8a44d95f2cc049ee0cb83501605c38ac64)
-rw-r--r-- | media/codec2/components/mpeg4_h263/C2SoftMpeg4Enc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/media/codec2/components/mpeg4_h263/C2SoftMpeg4Enc.cpp b/media/codec2/components/mpeg4_h263/C2SoftMpeg4Enc.cpp index 36053f6885..54c8c47e96 100644 --- a/media/codec2/components/mpeg4_h263/C2SoftMpeg4Enc.cpp +++ b/media/codec2/components/mpeg4_h263/C2SoftMpeg4Enc.cpp @@ -517,9 +517,11 @@ void C2SoftMpeg4Enc::process( if (layout.planes[layout.PLANE_Y].colInc == 1 && layout.planes[layout.PLANE_U].colInc == 1 && layout.planes[layout.PLANE_V].colInc == 1 + && yStride == align(width, 16) && uStride == vStride && yStride == 2 * vStride) { - // I420 compatible - planes are already set up above + // I420 compatible with yStride being equal to aligned width + // planes are already set up above break; } |