级别: 圣骑士
- 注册时间:
- 2006-08-17
- 在线时间:
- 146小时
- 发帖:
- 215
|
无聊改了下tivtc中的tfm,当display=true时通过消息列队把场景切换帧帧号和交错帧帧号 发送给MyVDIVTC MyVDIVTC CheckListBox中双击帧号,通过发送消息方式操作VD界面跳转到该帧 tfm函数初始化时,通过FindWindowEx搜索标题为 MyVDIVTC 的窗口 获取MyVDIVTC的窗口句柄 代码尚未整理,凑合着用似乎没问题 http://dl.dbank.com/c08u5ftvot- diff -C 3 B/TFM.cpp A/TFM.cpp
- *** B/TFM.cpp 2008-01-17 13:01:06.000000000 +0800
- --- A/TFM.cpp 2011-04-27 14:12:56.000000000 +0800
- ***************
- *** 537,542 ****
- --- 537,543 ----
- int blockN, int xblocks, bool d2vmatch, int *mics, PVideoFrame &prv,
- PVideoFrame &src, PVideoFrame &nxt, IScriptEnvironment *env)
- {
- + bool isSC;
- if (combed > 1 && PP > 1) return;
- if (combed > 1 && PP == 1 && blockN != -20)
- {
- ***************
- *** 552,563 ****
- sprintf(buf, "order = %d field = %d mode = %d ", order, field, mode);
- if (np == 3) DrawYV12(dst, 0, 1, buf);
- else DrawYUY2(dst, 0, 1, buf);
- if (!over && !d2vmatch) sprintf(buf, "frame: %d match = %c %s", n, MTC(fmatch),
- ! ((ubsco || mmsco || flags == 5) && checkSceneChange(prv, src, nxt, env, n)) ? " (SC) " : "");
- else if (d2vmatch) sprintf(buf, "frame: %d match = %c (D2V) %s", n, MTC(fmatch),
- ! ((ubsco || mmsco || flags == 5) && checkSceneChange(prv, src, nxt, env, n)) ? " (SC) " : "");
- else sprintf(buf, "frame: %d match = %c (OVR) %s", n, MTC(fmatch),
- ! ((ubsco || mmsco || flags == 5) && checkSceneChange(prv, src, nxt, env, n)) ? " (SC) " : "");
- if (np == 3) DrawYV12(dst, 0, 2, buf);
- else DrawYUY2(dst, 0, 2, buf);
- int i = 3;
- --- 553,565 ----
- sprintf(buf, "order = %d field = %d mode = %d ", order, field, mode);
- if (np == 3) DrawYV12(dst, 0, 1, buf);
- else DrawYUY2(dst, 0, 1, buf);
- + isSC = checkSceneChange(prv, src, nxt, env, n);
- if (!over && !d2vmatch) sprintf(buf, "frame: %d match = %c %s", n, MTC(fmatch),
- ! ((ubsco || mmsco || flags == 5) && isSC) ? " (SC) " : "");
- else if (d2vmatch) sprintf(buf, "frame: %d match = %c (D2V) %s", n, MTC(fmatch),
- ! ((ubsco || mmsco || flags == 5) && isSC) ? " (SC) " : "");
- else sprintf(buf, "frame: %d match = %c (OVR) %s", n, MTC(fmatch),
- ! ((ubsco || mmsco || flags == 5) && isSC) ? " (SC) " : "");
- if (np == 3) DrawYV12(dst, 0, 2, buf);
- else DrawYUY2(dst, 0, 2, buf);
- int i = 3;
- ***************
- *** 606,611 ****
- --- 608,633 ----
- if (np == 3) DrawYV12(dst, 0, i, buf);
- else DrawYUY2(dst, 0, i, buf);
- }
- +
- + if ((MyVDIVTC == NULL) || ((!isSC) && (combed == 0)))
- + {
- + return;
- + } else
- + if ((combed != 0) && isSC)
- + {
- + SendMessage(MyVDIVTC, WM_USER+100, n, 0);
- + } else
- + if ((combed != 0) && (!isSC))
- + {
- + SendMessage(MyVDIVTC, WM_USER+100, n, 1);
- + } else
- + if ((combed == 0) && isSC)
- + {
- + SendMessage(MyVDIVTC, WM_USER+100, n, 2);
- +
- + }
- +
- +
- }
-
- void TFM::getSettingOvr(int n)
- ***************
- *** 2316,2321 ****
- --- 2338,2347 ----
- sprintf(buf, "TFM: %s by tritical\n", VERSION);
- OutputDebugString(buf);
- }
- + if (display)
- + {
- + MyVDIVTC = FindWindowEx(NULL,NULL,NULL,"MyVDIVTC");
- + }
- child->SetCacheHints(CACHE_RANGE, 3); // fixed to diameter (07/30/2005)
- lastMatch.frame = lastMatch.field = lastMatch.combed = lastMatch.match = -20;
- nfrms = vi.num_frames-1;
- diff -C 3 B/TFM.h A/TFM.h
- *** B/TFM.h 2008-01-17 13:01:28.000000000 +0800
- --- A/TFM.h 2011-04-26 12:38:22.000000000 +0800
- ***************
- *** 92,97 ****
- --- 92,98 ----
- int tpitchy, tpitchuv, *moutArray, *moutArrayE;
- MTRACK lastMatch;
- SCTRACK sclast;
- + HWND MyVDIVTC;
- double scthresh;
- char buf[4096], outputFull[270], outputCFull[270];
- PlanarFrame *map, *cmask;
|