[XviD-devel] discussion continue...

Christoph Lampert xvid-devel@xvid.org
Wed, 11 Sep 2002 15:17:29 +0200 (CEST)


On Wed, 11 Sep 2002, Marc FD wrote:

> Hi.
> You said it would better to "continue over the devel-list"
> but it seems you missed(?) my mail so i just add this part because i need an
> answer.
> 
> > > > For the histogramm based detection, i can write a simple&robust
> > > > implementation.
> > > > i could improve it more when B-frames would be widely used.
> > > > what do you think ?
> > >
> > > Would be a very good idea!
> >
> > Fot that i would need :
> > - a short example of how the function does look like.
> 
> I mean, where would the function be called + can you give a prototype of the
> function

Ah, sorry, I read it of course, but since my harddisk crashed shortly
after or before, I didn't answer. 

Currently there's a very simple image_mad()>30 check in encoder.c 
(branch, dev-api-3, not in the HEAD anymore). You can find it when 
searching for image_mad or this comment: 

  /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     * ivop/pvop/bvop selection
     * %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */

We need a _better_ function to make this decision for bframes, so it would
be called somewhat like 

if ( classifyframe(&pEnc->reference->image, &pEnc->current->image,
                  pEnc->mbParam.edged_width, pEnc->mbParam.width,
                  pEnc->mbParam.height) == FRAMETYPE_SCENECHANGE  )
  

and have a prototype like: 

int 
classifyframe(IMAGE *pRef,IMAGE* pCur,int edged_width,int width,int height)
{

  /* do something with pRef and pCur, e.g. create a histogramm of both 
     and compare, then return e.g. something like FRAMETYPE SCENECHANGE,
     FRAMETYPE_NOSCENECHANGE and later versions might have more
     information, like  FRAMETYPE_UNCERTAIN, or  FRAMETYPE_FADE  
    
     Once this is working fine, we can speed things up by backing up 
     old histogram instead of creating it or whatever...

  */
}

> > - all the papers you said you have on this subject  if they are not too
> big (i don't have DSL)

They are of "normal size" for papers in PDF, maybe 100k-300k each. 
Here are a few links.  The Download of the papers in many different
formats is on the top right at "Cached:"

http://citeseer.nj.nec.com/47138.html

http://citeseer.nj.nec.com/38656.html

http://citeseer.nj.nec.com/lienhart01reliable.html

http://citeseer.nj.nec.com/460026.html

http://citeseer.nj.nec.com/407018.html

I don't know if these are really _good_ ones. Much of the stuff will be
too advanced, but there are always lots of links to other, similar papers.
Normally, it's the older the papers, the simpler the routines... 
Some describe different methods, not histogram based, but often there
is a comparisson with histogram and then one can learn from that what the
other method was. In the end, it's just a question of _how_ to compare two
histograms. Almost any method will be better than image_mad()

gruel