aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLang Dai <langx.dai@intel.com>2016-06-02 21:01:56 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-06-02 21:01:56 +0000
commitaded47aa12d5bbe34c035a8f2e222706fcbbd169 (patch)
tree784f265249b3253a2991b8c3ad9ef79cc1e4423a
parent9c2d6d9b88e12db6e09d2031b58eb7f442ebaa04 (diff)
parentc3fc35d6b190d536332e1c32bb2e7a7858877035 (diff)
downloadlibmix-aded47aa12d5bbe34c035a8f2e222706fcbbd169.tar.gz
Update mLowDelay value when startVA am: f75cf2c237 am: f0ce477854
am: c3fc35d6b1 * commit 'c3fc35d6b190d536332e1c32bb2e7a7858877035': Update mLowDelay value when startVA Change-Id: I69612b9abe121e3e406ce9b36b77542edd9db3c8
-rw-r--r--videodecoder/VideoDecoderAVC.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/videodecoder/VideoDecoderAVC.cpp b/videodecoder/VideoDecoderAVC.cpp
index ca4b123..077710c 100644
--- a/videodecoder/VideoDecoderAVC.cpp
+++ b/videodecoder/VideoDecoderAVC.cpp
@@ -681,6 +681,15 @@ Decode_Status VideoDecoderAVC::startVA(vbp_data_h264 *data) {
//Use high profile for all kinds of H.264 profiles (baseline, main and high) except for constrained baseline
VAProfile vaProfile = VAProfileH264High;
+ if (mConfigBuffer.flag & WANT_ADAPTIVE_PLAYBACK) {
+ // When Adaptive playback is enabled, turn off low delay mode.
+ // Otherwise there may be a 240ms stuttering if the output mode is changed from LowDelay to Delay.
+ enableLowDelayMode(false);
+ } else {
+ // for baseline profile or constrained high profile, enable low delay mode automatically
+ enableLowDelayMode((data->codec_data->profile_idc == 66) || (data->codec_data->profile_idc == 100 && data->codec_data->constraint_set4_flag == 1 && data->codec_data->constraint_set5_flag == 1));
+ }
+
// TODO: determine when to use VAProfileH264ConstrainedBaseline, set only if we are told to do so
if ((data->codec_data->profile_idc == 66 || data->codec_data->constraint_set0_flag == 1) &&
data->codec_data->constraint_set1_flag == 1) {
@@ -716,15 +725,6 @@ void VideoDecoderAVC::updateFormatInfo(vbp_data_h264 *data) {
ITRACE("updateFormatInfo: current size: %d x %d, new size: %d x %d",
mVideoFormatInfo.width, mVideoFormatInfo.height, width, height);
- if (mConfigBuffer.flag & WANT_ADAPTIVE_PLAYBACK) {
- // When Adaptive playback is enabled, turn off low delay mode.
- // Otherwise there may be a 240ms stuttering if the output mode is changed from LowDelay to Delay.
- enableLowDelayMode(false);
- } else {
- // for baseline profile or constrained high profile, enable low delay mode automatically
- enableLowDelayMode((data->codec_data->profile_idc == 66) || (data->codec_data->profile_idc == 100 && data->codec_data->constraint_set4_flag == 1 && data->codec_data->constraint_set5_flag == 1));
- }
-
if ((mConfigBuffer.flag & USE_NATIVE_GRAPHIC_BUFFER) && mStoreMetaData) {
pthread_mutex_lock(&mFormatLock);
}