OSDN Git Service

import YuvToEncoder R3 patches, BZ 18528, 19092, 19696
authorZhao Liang <leo.zhao@intel.com>
Fri, 20 Jul 2012 03:56:51 +0000 (11:56 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 5 May 2016 17:50:19 +0000 (01:50 +0800)
commit61f74c2bbcb9000f12a253ee563e45afe01f4da4
tree4ecb43aa06dac1075b816db10342a7e3135bdba1
parent9e4f52a35dfc5347045b92571d51f50684e4c915
import YuvToEncoder R3 patches, BZ 18528, 19092, 19696

BZ: 47824

Please refer http://umgbugzilla.sh.intel.com:41006/show_bug.cgi?id=19092 and
external/jpeg/libjpeg.doc

The MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16
scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual
sample rows of Y and 8 each of Cb and Cr.

The original implement of Yuv420SpToJpegEncoder::compress didn't add padding to the frame buffer
when height and width aren't aligned with 16 pixel. It will cause illegal memory violation and core dump.

Category: aosp improvement
Domain: Video.Media-jpeg
Origin: Internal
Upstream: Yes

Change-Id: Ibcf14230d616e2d440ace244bb420723b5c01dc2
Orig-Change-Id: Ic1b7494b98ee9c1997b226d58abd034b1dcb18f6
Signed-off-by: Tong, Bo <box.tong@intel.com>
Signed-off-by: Zhao Liang <leo.zhao@intel.com>
core/jni/android/graphics/YuvToJpegEncoder.cpp