On Mon, Jul 09, 2012 at 08:06:27AM -0700, Jason Garrett-Glaser wrote:
> On Sun, Jul 8, 2012 at 9:42 PM, Kostya Shishkov
> <[email protected]> wrote:
> > On Sun, Jul 08, 2012 at 08:17:10PM -0700, Jason Garrett-Glaser wrote:
> >> > +#define UNQUANT(val, q) ((q * val + 0x80) >> 8)
> >>
> >> I'd call this DEQUANT, but that's just me.
> >
> > I don't have preferences here, so why not.
> >
> >> > +    for (i = 0; i < 4; i++) {
> >> > +        if (i & 1) {
> >> > +            t0 = UNQUANT(q[1], in[0 * 4 + i]);
> >> > +            t1 = UNQUANT(q[2], in[1 * 4 + i]);
> >> > +            t2 = UNQUANT(q[1], in[2 * 4 + i]);
> >> > +            t3 = UNQUANT(q[2], in[3 * 4 + i]);
> >> > +        } else {
> >> > +            t0 = UNQUANT(q[0], in[0 * 4 + i]);
> >> > +            t1 = UNQUANT(q[1], in[1 * 4 + i]);
> >> > +            t2 = UNQUANT(q[0], in[2 * 4 + i]);
> >> > +            t3 = UNQUANT(q[1], in[3 * 4 + i]);
> >> > +        }
> >>
> >> Branchless please?  Maybe q[0+(i&1)] or such?
> >
> > Done.
> >
> >> > +static const uint8_t tscc2_zigzag[16] = {
> >> > +   0,  1,  4,  8,
> >> > +   5,  2,  3,  6,
> >> > +   9, 12, 13, 10,
> >> > +   7, 11, 14, 15
> >> > +//     0,  4,  1,  2,
> >> > +//     5,  8, 12,  9,
> >> > +//     6,  3,  7, 10,
> >> > +//    13, 14, 11, 15
> >> > +};
> >>
> >> Use an existing one if possible?
> >
> > We have several standard ones but they are all 8x8.
> 
> H.264's is 4x4 and I think it matches that?

It does but IMO making it common doesn't worth the effort.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to