summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--command/markad-standalone.cpp3
-rw-r--r--command/video.cpp7
-rw-r--r--command/video.h4
3 files changed, 8 insertions, 6 deletions
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index 633555e..8ef6ee0 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -829,7 +829,8 @@ bool cMarkAdStandalone::ProcessFile2ndPass(clMark **Mark1, clMark **Mark2,int Nu
{
if (pframe!=lastiframe)
{
- if (pn>mSTART) pos=video->ProcessOverlap(lastiframe,Frames,(pn==mBEFORE));
+ if (pn>mSTART) pos=video->ProcessOverlap(lastiframe,Frames,(pn==mBEFORE),
+ (macontext.Info.VPid.Type==MARKAD_PIDTYPE_VIDEO_H264));
framecounter++;
}
if ((pos) && (pn==mAFTER))
diff --git a/command/video.cpp b/command/video.cpp
index 9b21c51..868d6ce 100644
--- a/command/video.cpp
+++ b/command/video.cpp
@@ -769,11 +769,12 @@ MarkAdPos *cMarkAdOverlap::Detect()
return &result;
}
-MarkAdPos *cMarkAdOverlap::Process(int FrameNumber, int Frames, bool BeforeAd)
+MarkAdPos *cMarkAdOverlap::Process(int FrameNumber, int Frames, bool BeforeAd, bool H264)
{
if ((lastframenumber>0) && (!similarMaxCnt))
{
similarCutOff=50000; // lower is harder!
+ if (H264) similarCutOff*=6;
similarMaxCnt=4;
}
@@ -897,13 +898,13 @@ bool cMarkAdVideo::aspectratiochange(MarkAdAspectRatio &a, MarkAdAspectRatio &b,
}
-MarkAdPos *cMarkAdVideo::ProcessOverlap(int FrameNumber, int Frames, bool BeforeAd)
+MarkAdPos *cMarkAdVideo::ProcessOverlap(int FrameNumber, int Frames, bool BeforeAd, bool H264)
{
if (!FrameNumber) return NULL;
if (!overlap) overlap=new cMarkAdOverlap(macontext);
if (!overlap) return NULL;
- return overlap->Process(FrameNumber, Frames, BeforeAd);
+ return overlap->Process(FrameNumber, Frames, BeforeAd, H264);
}
MarkAdMarks *cMarkAdVideo::Process(int FrameNumber, int FrameNumberNext)
diff --git a/command/video.h b/command/video.h
index 7fcd97a..05ad796 100644
--- a/command/video.h
+++ b/command/video.h
@@ -82,7 +82,7 @@ private:
public:
cMarkAdOverlap(MarkAdContext *maContext);
~cMarkAdOverlap();
- MarkAdPos *Process(int FrameNumber, int Frames, bool BeforeAd);
+ MarkAdPos *Process(int FrameNumber, int Frames, bool BeforeAd, bool H264);
};
class cMarkAdLogo
@@ -213,7 +213,7 @@ private:
public:
cMarkAdVideo(MarkAdContext *maContext);
~cMarkAdVideo();
- MarkAdPos *ProcessOverlap(int FrameNumber, int Frames, bool BeforeAd);
+ MarkAdPos *ProcessOverlap(int FrameNumber, int Frames, bool BeforeAd, bool H264);
MarkAdMarks *Process(int FrameNumber, int FrameNumberNext);
void Clear();
};