diff options
author | Jochen Dolze <vdr@dolze.de> | 2016-09-25 10:13:45 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2016-09-25 10:13:45 +0200 |
commit | c3ca6bd8fc34f048499f8915c63c8eba710b89bd (patch) | |
tree | c4e50564b68e3b1aa1cc7119efdf9f76f3f96b19 /command/video.cpp | |
parent | 74e2a8c5382fa8bfacd12274899112724a1e0d51 (diff) | |
download | vdr-plugin-markad-c3ca6bd8fc34f048499f8915c63c8eba710b89bd.tar.gz vdr-plugin-markad-c3ca6bd8fc34f048499f8915c63c8eba710b89bd.tar.bz2 |
Added new/updated logos: ServusTV, Pro7MAXX, EinsPlus
Updated vertical border detection
Diffstat (limited to 'command/video.cpp')
-rw-r--r-- | command/video.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/command/video.cpp b/command/video.cpp index b828c0c..1bf3ec9 100644 --- a/command/video.cpp +++ b/command/video.cpp @@ -338,7 +338,7 @@ int cMarkAdLogo::Detect(int framenumber, int *logoframenumber) if (extract) return LOGO_NOCHANGE; if (!processed) return LOGO_ERROR; - tsyslog("rp=%5i mp=%5i mpV=%5.f mpI=%5.f i=%3i s=%i",rpixel,mpixel,(mpixel*LOGO_VMARK),(mpixel*LOGO_IMARK),area.intensity,area.status); + //tsyslog("rp=%5i mp=%5i mpV=%5.f mpI=%5.f i=%3i s=%i",rpixel,mpixel,(mpixel*LOGO_VMARK),(mpixel*LOGO_IMARK),area.intensity,area.status); if (processed==1) { @@ -547,7 +547,7 @@ int cMarkAdBlackBordersHoriz::Process(int FrameNumber, int *BorderIFrame) borderframenumber=FrameNumber; } else { if (borderstatus!=HBORDER_VISIBLE) { - if (FrameNumber>(borderframenumber+macontext->Video.Info.FramesPerSecond*MINSECS)) + if (FrameNumber>(borderframenumber+macontext->Video.Info.FramesPerSecond*MINBORDERSECS)) { *BorderIFrame=borderframenumber; borderstatus=HBORDER_VISIBLE; @@ -586,6 +586,7 @@ int cMarkAdBlackBordersVert::Process(int FrameNumber, int *BorderIFrame) #define CHECKWIDTH 32 #define BRIGHTNESS 20 #define HOFFSET 50 +#define VOFFSET_ 120 if (!macontext) return 0; if (!macontext->Video.Data.Valid) return 0; if (macontext->Video.Info.FramesPerSecond==0) return 0; @@ -596,8 +597,8 @@ int cMarkAdBlackBordersVert::Process(int FrameNumber, int *BorderIFrame) bool fleft=true,fright=true; int val=0,cnt=0; - int end=macontext->Video.Data.PlaneLinesize[0]*macontext->Video.Info.Height; - int i=0; + int end=macontext->Video.Data.PlaneLinesize[0]*(macontext->Video.Info.Height-VOFFSET_); + int i=VOFFSET_*macontext->Video.Data.PlaneLinesize[0]; while (i<end) { for (int x=0; x<CHECKWIDTH; x++) { @@ -611,8 +612,9 @@ int cMarkAdBlackBordersVert::Process(int FrameNumber, int *BorderIFrame) if (fleft) { - val=cnt=i=0; - int w=macontext->Video.Info.Width-HOFFSET; + val=cnt=0; + i=VOFFSET_*macontext->Video.Data.PlaneLinesize[0]; + int w=macontext->Video.Info.Width-HOFFSET-CHECKWIDTH; while (i<end) { for (int x=0; x<CHECKWIDTH; x++) { @@ -630,7 +632,7 @@ int cMarkAdBlackBordersVert::Process(int FrameNumber, int *BorderIFrame) borderframenumber=FrameNumber; } else { if (borderstatus!=VBORDER_VISIBLE) { - if (FrameNumber>(borderframenumber+macontext->Video.Info.FramesPerSecond*MINSECS)) + if (FrameNumber>(borderframenumber+macontext->Video.Info.FramesPerSecond*MINBORDERSECS)) { *BorderIFrame=borderframenumber; borderstatus=VBORDER_VISIBLE; |