summaryrefslogtreecommitdiff
authorHui Zhang <hui.zhang@amlogic.com>2020-07-28 11:17:59 (GMT)
committer Gerrit Code Review <gituser@scgit2.amlogic.com>2020-07-28 11:17:59 (GMT)
commitf8c662345039d943749ff37f131cba8517a186db (patch)
tree2b5dc01edeab29326ec45aed8f29877a28ddf792
parentba3ab96fd7ce1cf012b2935a13adc94927d63568 (diff)
parent4ea926a49ae2643832b1c78e05f0d8a76c7374c7 (diff)
downloadmedia_modules-f8c662345039d943749ff37f131cba8517a186db.zip
media_modules-f8c662345039d943749ff37f131cba8517a186db.tar.gz
media_modules-f8c662345039d943749ff37f131cba8517a186db.tar.bz2
Merge "vmh264: fix bug of abnormal cropping. [1/1]" into amlogic-4.9-dev-q
Diffstat
-rw-r--r--drivers/frame_provider/decoder/h264_multi/vmh264.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c
index 4257a8b..948b436 100644
--- a/drivers/frame_provider/decoder/h264_multi/vmh264.c
+++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c
@@ -4812,6 +4812,12 @@ static int vh264_set_params(struct vdec_h264_hw_s *hw,
bit 15: frame_mbs_only_flag
bit 13-14: chroma_format_idc */
frame_mbs_only_flag = (hw->seq_info >> 15) & 0x01;
+ if (p_H264_Dpb->mSPS.profile_idc != 100 &&
+ p_H264_Dpb->mSPS.profile_idc != 110 &&
+ p_H264_Dpb->mSPS.profile_idc != 122 &&
+ p_H264_Dpb->mSPS.profile_idc != 144) {
+ p_H264_Dpb->chroma_format_idc = 1;
+ }
chroma_format_idc = p_H264_Dpb->chroma_format_idc;
/* @AV_SCRATCH_6.31-16 = (left << 8 | right ) << 1
@@ -8376,6 +8382,12 @@ static int vmh264_get_ps_info(struct vdec_h264_hw_s *hw,
* bit 13-14: chroma_format_idc
*/
frame_mbs_only_flag = (hw->seq_info >> 15) & 0x01;
+ if (hw->dpb.mSPS.profile_idc != 100 &&
+ hw->dpb.mSPS.profile_idc != 110 &&
+ hw->dpb.mSPS.profile_idc != 122 &&
+ hw->dpb.mSPS.profile_idc != 144) {
+ hw->dpb.chroma_format_idc = 1;
+ }
chroma_format_idc = hw->dpb.chroma_format_idc;
/*