The H264 encoder on some Huawei devices doesn't take care of row strides information provided by MediaImage object. That resulted on bad pixel conversion while input raw pictures were copied into the encoder input buffer.
The workaround is to assume that the encoder take yuv420p pictures as input and thus to copy each picture in the input buffer without any pixel format conversion.
This workaround is only applied on Huawei GRA-L09 and VNS-L31 for now.