aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Wang <xin1.wang@intel.com>2016-08-29 13:20:06 +0800
committerNick Desaulniers <ndesaulniers@google.com>2016-09-02 12:58:45 -0700
commit9696c226d88ba911b96c4d2475b902bdc9d4a983 (patch)
tree2ee48c92ceaef29e17c122429fea094101e18277
parentdd20107a9932203f96b4a3059739dc92029ab1ce (diff)
downloadlibmix-9696c226d88ba911b96c4d2475b902bdc9d4a983.tar.gz
Fixed the timestamp mismatching issue for 2 GTS cases.android-cts_7.1_r1android-cts-7.1_r9android-cts-7.1_r8android-cts-7.1_r7android-cts-7.1_r6android-cts-7.1_r5android-cts-7.1_r4android-cts-7.1_r3android-cts-7.1_r29android-cts-7.1_r28android-cts-7.1_r27android-cts-7.1_r26android-cts-7.1_r25android-cts-7.1_r24android-cts-7.1_r23android-cts-7.1_r22android-cts-7.1_r21android-cts-7.1_r20android-cts-7.1_r2android-cts-7.1_r19android-cts-7.1_r18android-cts-7.1_r17android-cts-7.1_r16android-cts-7.1_r15android-cts-7.1_r14android-cts-7.1_r13android-cts-7.1_r12android-cts-7.1_r11android-cts-7.1_r10android-cts-7.1_r1android-7.1.1_r9android-7.1.1_r8android-7.1.1_r7android-7.1.1_r61android-7.1.1_r60android-7.1.1_r6android-7.1.1_r59android-7.1.1_r58android-7.1.1_r57android-7.1.1_r56android-7.1.1_r55android-7.1.1_r54android-7.1.1_r53android-7.1.1_r52android-7.1.1_r51android-7.1.1_r50android-7.1.1_r49android-7.1.1_r48android-7.1.1_r47android-7.1.1_r46android-7.1.1_r45android-7.1.1_r44android-7.1.1_r43android-7.1.1_r42android-7.1.1_r41android-7.1.1_r40android-7.1.1_r4android-7.1.1_r39android-7.1.1_r38android-7.1.1_r35android-7.1.1_r33android-7.1.1_r32android-7.1.1_r31android-7.1.1_r3android-7.1.1_r28android-7.1.1_r27android-7.1.1_r26android-7.1.1_r25android-7.1.1_r24android-7.1.1_r23android-7.1.1_r22android-7.1.1_r21android-7.1.1_r20android-7.1.1_r2android-7.1.1_r17android-7.1.1_r16android-7.1.1_r15android-7.1.1_r14android-7.1.1_r13android-7.1.1_r12android-7.1.1_r11android-7.1.1_r10android-7.1.1_r1nougat-mr1.8-releasenougat-mr1.7-releasenougat-mr1.6-releasenougat-mr1.5-releasenougat-mr1.4-releasenougat-mr1.3-releasenougat-mr1.2-releasenougat-mr1.1-releasenougat-mr1-volantis-releasenougat-mr1-security-releasenougat-mr1-releasenougat-mr1-flounder-releasenougat-mr1-devnougat-mr1-cts-release
Bug: 30945285 BZ: 50789 Check Adaptive when flag is not informed by upper layer. When AdaptivePlayBack is enabled, close low delay mode to keep right PTS order. Change-Id: I6c5609ae795ebceaa3a98e8d537f477e07abb5d8 Signed-off-by: Xin Wang <xin1.wang@intel.com> Signed-off-by: Austin Hu <austin.hu@intel.com>
-rw-r--r--videodecoder/VideoDecoderAVC.cpp6
-rwxr-xr-xvideodecoder/VideoDecoderAVC.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/videodecoder/VideoDecoderAVC.cpp b/videodecoder/VideoDecoderAVC.cpp
index 283442e..f0e047e 100644
--- a/videodecoder/VideoDecoderAVC.cpp
+++ b/videodecoder/VideoDecoderAVC.cpp
@@ -28,7 +28,8 @@
VideoDecoderAVC::VideoDecoderAVC(const char *mimeType)
: VideoDecoderBase(mimeType, VBP_H264),
mToggleDPB(0),
- mErrorConcealment(false){
+ mErrorConcealment(false),
+ mAdaptive(false){
invalidateDPB(0);
invalidateDPB(1);
@@ -681,7 +682,7 @@ 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) {
+ if ((mConfigBuffer.flag & WANT_ADAPTIVE_PLAYBACK) || mAdaptive) {
// 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);
@@ -741,6 +742,7 @@ void VideoDecoderAVC::updateFormatInfo(vbp_data_h264 *data) {
if (VideoDecoderBase::alignMB(mVideoFormatInfo.width) != width ||
VideoDecoderBase::alignMB(mVideoFormatInfo.height) != height) {
mSizeChanged = true;
+ mAdaptive = true;
ITRACE("Video size is changed.");
}
mVideoFormatInfo.width = width;
diff --git a/videodecoder/VideoDecoderAVC.h b/videodecoder/VideoDecoderAVC.h
index 6129703..19135af 100755
--- a/videodecoder/VideoDecoderAVC.h
+++ b/videodecoder/VideoDecoderAVC.h
@@ -77,6 +77,7 @@ private:
uint32_t mLastPictureFlags;
VideoExtensionBuffer mExtensionBuffer;
PackedFrameData mPackedFrame;
+ bool mAdaptive;
};