aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Hu <austin.hu@intel.com>2016-04-13 13:20:55 +0800
committerNick Desaulniers <ndesaulniers@google.com>2016-04-13 09:30:38 -0700
commit3558fce240d7994176f200e04acd0d9d6e5b646e (patch)
tree9adba14d9ee07c4d3c2508ebc6ac2f4edb41b53b
parentc5f578fb8ed322ee730a31c50c3778e8af9204b7 (diff)
downloadlibmix-3558fce240d7994176f200e04acd0d9d6e5b646e.tar.gz
Fixed the issue that Netflix can't play AVC 1080p video with
AdaptivePlayback and HDCP authentication. Bug: 27681208 Because the height calculation of format info depends on picture height in MB, so that the result would always be 16 pixels aligned. But it doesn't match all of kinds of video resolutions. Note: 1. The issue doesn't happens with other formats (MPEG2/4, VP8, etc), because their height calculation doesn't depend on height in MB; 2. Need to apply the same change to width calculation of AVC. Change-Id: I1337f01a9fe49f009821a4c86e3ae19d39b02dd7 Signed-off-by: Austin Hu <austin.hu@intel.com>
-rw-r--r--videodecoder/VideoDecoderAVC.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/videodecoder/VideoDecoderAVC.cpp b/videodecoder/VideoDecoderAVC.cpp
index 6f2006c..2b0fdf7 100644
--- a/videodecoder/VideoDecoderAVC.cpp
+++ b/videodecoder/VideoDecoderAVC.cpp
@@ -706,6 +706,13 @@ void VideoDecoderAVC::updateFormatInfo(vbp_data_h264 *data) {
// new video size
uint32_t width = (data->pic_data[0].pic_parms->picture_width_in_mbs_minus1 + 1) * 16;
uint32_t height = (data->pic_data[0].pic_parms->picture_height_in_mbs_minus1 + 1) * 16;
+
+ if (data->codec_data->crop_top > 0)
+ height -= data->codec_data->crop_top;
+
+ if (data->codec_data->crop_bottom > 0)
+ height -= data->codec_data->crop_bottom;
+
ITRACE("updateFormatInfo: current size: %d x %d, new size: %d x %d",
mVideoFormatInfo.width, mVideoFormatInfo.height, width, height);