[mythtv] PATCH: Commercial detection/skip using blank frames
Chris Pinkham
cpinkham at bc2va.org
Fri Feb 21 23:26:05 EST 2003
Isaac,
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.
> Yeah, seemed to work ok. It got confused by an all-white section of an ad,
> that I saw, and several times it stopped on the 'later tonight' previews for
> 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.
Chris
*****************************************************************************
** Chris Pinkham Linux v2.2.18, Sane v1.0.4, Cajun v3.0-8 **
** cpinkham at bc2va.org http://www.bc2va.org/chris/ **
*****************************************************************************
More information about the mythtv-dev
mailing list