summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuanfa.zhuang <yuanfa.zhuang@amlogic.com>2021-01-14 20:05:48 +0800
committerHui Zhang <hui.zhang@amlogic.com>2021-01-19 21:35:13 -0800
commit4a3603b9b5a9f3861f14ceb8c6e3a8e7d12286b6 (patch)
treeaf823f675d7c901d0f0d99f5f5c3e1162d9fd0b3
parent77d645adf96369a96e47fe04e0d2f115b6c98e60 (diff)
downloadmedia_modules-android-tv-deadpool-4.9-android11.tar.gz
vdec: When one of the fields is empty, play the screen [1/1]android-tv-11.0.0_r0.1android-tv-deadpool-4.9-android11
PD#SWPL-41227 Problem: Interlaced stream is recognized as progressive, when one of the fields is empty, the screen will be played Solution: When this happens, only a valid field is output Verify: U21BQ-S905X2 Signed-off-by: yuanfa.zhuang <yuanfa.zhuang@amlogic.com> Change-Id: Ib5dacc09acf45ce2cddfa700b837961e87ffc106
-rw-r--r--drivers/frame_provider/decoder/h264_multi/vmh264.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c
index b019a38..21d3ac9 100644
--- a/drivers/frame_provider/decoder/h264_multi/vmh264.c
+++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c
@@ -2763,10 +2763,23 @@ static int post_prepare_process(struct vdec_s *vdec, struct FrameStore *frame)
if (frame->frame == NULL &&
((frame->is_used == 1 && frame->top_field)
|| (frame->is_used == 2 && frame->bottom_field))) {
- dpb_print(DECODE_ID(hw), PRINT_FLAG_ERRORFLAG_DBG,
+ if (hw->i_only) {
+ if (frame->is_used == 1)
+ dpb_print(DECODE_ID(hw), PRINT_FLAG_VDEC_STATUS,
+ "%s No bottom_field !! frame_num %d used %d\n",
+ __func__, frame->frame_num, frame->is_used);
+ if (frame->is_used == 2)
+ dpb_print(DECODE_ID(hw), PRINT_FLAG_VDEC_STATUS,
+ "%s No top_field !! frame_num %d used %d\n",
+ __func__, frame->frame_num, frame->is_used);
+ }
+ else {
+ frame->data_flag |= ERROR_FLAG;
+ dpb_print(DECODE_ID(hw), PRINT_FLAG_ERRORFLAG_DBG,
"%s Error frame_num %d used %d\n",
__func__, frame->frame_num, frame->is_used);
- frame->data_flag |= ERROR_FLAG;
+ }
+
}
if (vdec_stream_based(vdec) && !(frame->data_flag & NODISP_FLAG)) {
if ((vdec->vbuf.no_parser == 0) || (vdec->vbuf.use_ptsserv)) {
@@ -3080,6 +3093,27 @@ static int post_video_frame(struct vdec_s *vdec, struct FrameStore *frame)
vf->pts, vf->pts_us64, bForceInterlace);
}
}
+
+ if (hw->i_only) {
+ if (vf_count == 1 && frame->is_used == 1 && frame->top_field
+ && frame->bottom_field == NULL && frame->frame == NULL) {
+ vf->type =
+ VIDTYPE_INTERLACE_FIRST |
+ nv_order;
+ vf->type |= VIDTYPE_INTERLACE_TOP;
+ vf->duration = vf->duration/2;
+ }
+
+ if (vf_count == 1 && frame->is_used == 2 && frame->bottom_field
+ && frame->top_field == NULL && frame->frame == NULL) {
+ vf->type =
+ VIDTYPE_INTERLACE_FIRST |
+ nv_order;
+ vf->type |= VIDTYPE_INTERLACE_BOTTOM;
+ vf->duration = vf->duration/2;
+ }
+ }
+
if (i == 0) {
struct vdec_s *pvdec;
struct vdec_info vs;