[Ffmpeg-devel] H.264 encoder
Panagiotis Issaris
takis.issaris
Tue Oct 10 17:25:07 CEST 2006
Hi,
On Wed, Oct 04, 2006 at 01:11:07PM +0200, Michael Niedermayer wrote:
> > > [...]
> > >
> > >> +static inline int h264cavlc_get_lookup_table(int na, int nb)
> > >> +{
> > >> + int nc = 0;
> > >> + int8_t lookup_table[8] = {0, 0, 1, 1, 2, 2, 2, 2};
> > >> +
> > >> + if (na >= 0 && nb >= 0)
> > >> + {
> > >> + nc = na+nb+1;
> > >> + nc >>= 1;
> > >> + }
> > >> + else
> > >> + {
> > >> + if (na >= 0) // nB < 0
> > >> + nc = na;
> > >> + else if (nb >= 0) // nA < 0
> > >> + nc = nb;
> > >> + }
> > >> +
> > >> + return (nc < 8) ? lookup_table[nc] : 3;
> > >> +}
> > > pred_non_zero_count() could be used for the first part
> [...]
pred_non_zero_count() is using non_zero_count_cache, which is getting filled by
fill_caches() which is dependent on MpegEncContext. This makes it nearly
impossible to reuse this unless I pull in MpegEncContext in the H264 encoder.
Would that be a good idea?
With friendly regards,
Takis
More information about the ffmpeg-devel
mailing list