deinterlace: fix 480i error into pulldown [1/1]

PD#TV-1949

Problem:
480i error into pulldown (by yanling)

Solution:
1. add flm22_comlev3 (by yanling);

Verify:
tl1 txlx

Change-Id: Ib5c168deb1327df0e803831dcf9f13e05faaa915
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
This commit is contained in:
Wenfeng Guo
2019-02-20 16:20:10 +08:00
committed by Jianxin Pan
parent 7f3b8d9f99
commit e38d06d2f5
2 changed files with 18 additions and 4 deletions

View File

@@ -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;

View File

@@ -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 */