summaryrefslogtreecommitdiff
authorrenjiang.han <renjiang.han@amlogic.com>2019-05-20 08:30:59 (GMT)
committer Shen Liu <shen.liu@amlogic.com>2020-04-26 12:02:12 (GMT)
commit63be7c0d8c0a031c999ef59bcb4afa6b7baa4d47 (patch)
tree8c10411acb337088a1db863a963924d7888fb56a
parent51aff0ddcdeb8ec8e82de69f7cfec3f30347f81b (diff)
downloadcommon-63be7c0d8c0a031c999ef59bcb4afa6b7baa4d47.zip
common-63be7c0d8c0a031c999ef59bcb4afa6b7baa4d47.tar.gz
common-63be7c0d8c0a031c999ef59bcb4afa6b7baa4d47.tar.bz2
ppmgr: 4k video does not do tb detection. [1/1]
PD#SWPL-8338 Problem: video of 4k playback caton. Solution: 4k video does not do tb detection. Verify: on x301 Change-Id: Idf10ca33e7ba2d26d759c6e5c21bc465cad0992e Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
Diffstat
-rw-r--r--drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c b/drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c
index 811c216..f31bc7d 100644
--- a/drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c
+++ b/drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c
@@ -332,7 +332,9 @@ int vf_ppmgr_get_states(struct vframe_states *states)
static int get_input_format(struct vframe_s *vf)
{
int format = GE2D_FORMAT_M24_YUV420;
+ int interlace_mode;
+ interlace_mode = vf->type & VIDTYPE_TYPEMASK;
if (vf->type & VIDTYPE_VIU_422) {
#if 0
if (vf->type & VIDTYPE_INTERLACE_BOTTOM)
@@ -349,9 +351,9 @@ static int get_input_format(struct vframe_s *vf)
format = GE2D_FORMAT_S16_YUV422;
#else
- if (vf->type & VIDTYPE_INTERLACE_BOTTOM) {
+ if (interlace_mode == VIDTYPE_INTERLACE_BOTTOM) {
format = GE2D_FORMAT_S16_YUV422;
- } else if (vf->type & VIDTYPE_INTERLACE_TOP) {
+ } else if (interlace_mode == VIDTYPE_INTERLACE_TOP) {
format = GE2D_FORMAT_S16_YUV422;
} else {
format = GE2D_FORMAT_S16_YUV422
@@ -360,18 +362,17 @@ static int get_input_format(struct vframe_s *vf)
#endif
} else if (vf->type & VIDTYPE_VIU_NV21) {
- if (vf->type & VIDTYPE_INTERLACE_BOTTOM)
+ if (vf->type & VIDTYPE_INTERLACE_BOTTOM) {
format =
GE2D_FORMAT_M24_NV21 |
(GE2D_FORMAT_M24_NV21B & (3 << 3));
-
- else if (vf->type & VIDTYPE_INTERLACE_TOP)
+ } else if (vf->type & VIDTYPE_INTERLACE_TOP) {
format =
GE2D_FORMAT_M24_NV21
| (GE2D_FORMAT_M24_NV21T & (3 << 3));
-
- else
+ } else {
format = GE2D_FORMAT_M24_NV21;
+ }
} else {
if (vf->type & VIDTYPE_INTERLACE_BOTTOM) {
format = GE2D_FORMAT_M24_YUV420
@@ -2977,6 +2978,10 @@ static int ppmgr_task(void *data)
if (vf->source_type !=
VFRAME_SOURCE_TYPE_OTHERS)
goto SKIP_DETECT;
+ if ((vf->width * vf->height)
+ >= (3840 * 2160)) { //4k do not detect
+ goto SKIP_DETECT;
+ }
if (first_frame) {
last_type = vf->type & VIDTYPE_TYPEMASK;
last_width = vf->width;