[FFmpeg-devel] [PATCH 1/4] h261, h263 decoders: convert to RL_VLC.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Aug 31 23:05:23 CEST 2014
On Sun, Aug 31, 2014 at 10:51:40PM +0200, Reimar Döffinger wrote:
> On Sun, Aug 31, 2014 at 09:32:45PM +0200, Michael Niedermayer wrote:
> > On Sun, Aug 31, 2014 at 04:48:41PM +0200, Reimar Döffinger wrote:
> > > - code = get_vlc2(&s->gb, rl->vlc.table, TCOEFF_VLC_BITS, 2);
> > > - if (code < 0) {
> > > + UPDATE_CACHE(re, &s->gb);
> > > + GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TCOEFF_VLC_BITS, 2, 0);
> > > + if (run == 66 && level) {
> > > av_log(s->avctx, AV_LOG_ERROR, "illegal ac vlc code at %dx%d\n",
> > > s->mb_x, s->mb_y);
> > > return -1;
> > > }
> > > - if (code == rl->n) {
> > > + if (run == 66) {
> >
> > the "if (run == 66 && level) {" could be put under run == 66, if thats
> > faster
> > though maybe better as a seperate patch
>
> I should probably test it, but I was thinking about it and then went
> "the compiler certainly will figure that out on its own!?"
Argh! I want to kill a compiler! Except that they only exist as bits so
I can't...
The compiler decides to check level first, and if it is non-0 jump
somewhere else, where it then checks run for being 66...
That's with gcc Debian 4.9.1-11 at least.
More information about the ffmpeg-devel
mailing list