diff --git a/drivers/amlogic/media/deinterlace/deinterlace.c b/drivers/amlogic/media/deinterlace/deinterlace.c index c79e17c7cfc7..d9ef4cf08d37 100644 --- a/drivers/amlogic/media/deinterlace/deinterlace.c +++ b/drivers/amlogic/media/deinterlace/deinterlace.c @@ -129,7 +129,7 @@ static di_dev_t *de_devp; static dev_t di_devno; static struct class *di_clsp; -static const char version_s[] = "2018-12-25a"; +static const char version_s[] = "2019-02-26a"; static int bypass_state = 1; static int bypass_all; diff --git a/drivers/amlogic/media/deinterlace/film_mode_fmw/film_fw1.c b/drivers/amlogic/media/deinterlace/film_mode_fmw/film_fw1.c index cd6b46782d14..9fefa75f52c2 100644 --- a/drivers/amlogic/media/deinterlace/film_mode_fmw/film_fw1.c +++ b/drivers/amlogic/media/deinterlace/film_mode_fmw/film_fw1.c @@ -1159,6 +1159,10 @@ int Flm22DetSft(struct sFlmDatSt *pRDat, int *nDif02, int flm22_comlev1 = pPar->flm22_comlev1; int flm22_comnum = pPar->flm22_comnum; + int dif_flag; + int flm22_min; + int flm22_th; + int cFlg = pFlg[HISDETNUM - 1]; int rFlg[4] = { 2, 3, 4, 1 }; @@ -1558,7 +1562,16 @@ int Flm22DetSft(struct sFlmDatSt *pRDat, int *nDif02, nFlm22Lvl -= nT1; } - if (flm22_flag) { + /* ---------------------- */ + /*DI:PQ patch fix 480i error into pulldown22(by yanling)*/ + flm22_min = nDif01[HISDIFNUM-1] > nDif01[HISDIFNUM-2] + ? nDif01[HISDIFNUM-2] : nDif01[HISDIFNUM-1]; + flm22_th = flm22_min/2; + dif_flag = abs(nDif01[HISDIFNUM-1]-nDif01[HISDIFNUM-2]) + > flm22_th ? 1:0; + dif_flag = nDif01[HISDIFNUM-1] > (1<<16) ? dif_flag : 0; + if (flm22_flag && dif_flag) { + /* ---------------------- */ if (pFlg[HISDETNUM-1] == 3 || pFlg[HISDETNUM-1] == 1) { if (comsum > flm22_comnum) { @@ -1581,8 +1594,9 @@ int Flm22DetSft(struct sFlmDatSt *pRDat, int *nDif02, if (nFlgCk21 < flm22_chk21_sml) nFlm22Lvl = nFlm22Lvl + flm22_comlev1 - nFlgCk21; if (prt_flg) { - pr_info("nFlm22Lvl=%d, nFlgCk20=%d, nFlgCk21=%d\n", - nFlm22Lvl, nFlgCk20, nFlgCk21); + pr_info("nFlm22Lvl=%d, nFlgCk20=%d, nFlgCk21=%d,flm22_min=%d,flm22_th=%d\n", + nFlm22Lvl, nFlgCk20, nFlgCk21, + flm22_min, flm22_th); } } /* for sony-mp3 */