[mythtv] PATCH: Commercial detection/skip using blank frames

Chris Pinkham cpinkham at bc2va.org
Fri Feb 21 23:26:05 EST 2003


Do you want to fix the case of GetFrameVariance(wpos) around line
3450 or should I send in a patch?  AutoCommercialSkip() needs to know
where to look in the buffer for the frame that was just decoded.  Right 
now it still looks at wpos instead.

> GetFrame().  Just fixed it in CVS.  And yeah, the GetFrameRetainWPos was 
> causing the segfault -- for mp4 encodes, you were essentially telling 
> libavcodec to reuse the same buffer it had just used, and that was causing 

I would see them occasionaly but knowing pretty much zilch about video
compression I wasn't sure what was causing it.  Thanks for the explanation.

> other shows before the actual show came back on, but other than that, seems 
> pretty good.

I'm thinking the variance code is probably better replaced by just
a test to see if the randomly selected pixels have a 'Y' (from YUV) of
less than a certain value.  This way it would only detect dark blank
frames and not light ones.  I'll probably submit a patch to change it over
to that since I've noticed similar all-white screens.



More information about the mythtv-dev mailing list