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>
Tue, 22 Dec 2015 04:13:49 +0000 (12:13 +0800)
commit74908804ca31b4392c3ccb5ccc284889b1e71e92
treeed98804be07297fb40e33378cbca3992acd0717a
parent150984014a49a6dd78b8dcdc7fb78b56952e617b
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