Hi,
On Sun, Feb 26, 2012 at 8:57 AM, Diego Biurrun <[email protected]> wrote:
> + vector signed short
> \
> + lCY = c->CY,
> \
> + lOY = c->OY,
> \
> + lCRV = c->CRV,
> \
> + lCBU = c->CBU,
> \
> + lCGU = c->CGU,
> \
> + lCGV = c->CGV;
> \
That's kind of silly?
> + vector unsigned char *outo =
> \
> + (vector unsigned char *)
> \
> + (oplanes[0] + srcSliceY * outstrides[0] + outstrides[0]);
> \
> +
> \
> +
> \
> + /* loop moves y{1, 2}i by w */
> \
Double newlines here (and various other places in this function).
> + for (j = 0; j < w / 16; j++) {
> \
> +
> \
> + y1ivP = (vector unsigned char *) y1i;
> \
Why an empty line at the start of the block?
> + vi += 8;
> \
> +
> \
> + }
> \
... or at the end?
> +#define out_abgr(a, b, c, ptr) vec_mstrgb32(__typeof__(a), ((__typeof__(a))
> { 255 }), c, b, a, ptr)
> +#define out_bgra(a, b, c, ptr) vec_mstrgb32(__typeof__(a), c, b, a,
> ((__typeof__(a)) { 255 }), ptr)
> +#define out_rgba(a, b, c, ptr) vec_mstrgb32(__typeof__(a), a, b, c,
> ((__typeof__(a)) { 255 }), ptr)
> +#define out_argb(a, b, c, ptr) vec_mstrgb32(__typeof__(a), ((__typeof__(a))
> { 255 }), a, b, c, ptr)
> +#define out_rgb24(a, b, c, ptr) vec_mstrgb24(a, b, c, ptr)
> +#define out_bgr24(a, b, c, ptr) vec_mstbgr24(a, b, c, ptr)
80 chars, should be easy to split:
#define macro \
bla
> + for (i = 0; i < h; i++)
> + for (j = 0; j < w / 16; j++) {
> + uyvy = vec_ld(0, img);
> + U = (vector signed short)
> + vec_perm(uyvy, (vector unsigned char) { 0 }, demux_u);
>
> V = (vector signed short)
> - vec_perm (uyvy, (vector unsigned char){0}, demux_v);
> + vec_perm(uyvy, (vector unsigned char) { 0 }, demux_v);
>
> Y = (vector signed short)
> - vec_perm (uyvy, (vector unsigned char){0}, demux_y);
> + vec_perm(uyvy, (vector unsigned char) { 0 }, demux_y);
The Y, U and V '=' are not vertically aligned. I'd rather see you
align these, than align the uyvy and the U, which are completely
unrelated.
> + uyvy = vec_ld(16, img);
> + U = (vector signed short)
> + vec_perm(uyvy, (vector unsigned char) { 0 }, demux_u);
>
> V = (vector signed short)
> - vec_perm (uyvy, (vector unsigned char){0}, demux_v);
> + vec_perm(uyvy, (vector unsigned char) { 0 }, demux_v);
>
> Y = (vector signed short)
> - vec_perm (uyvy, (vector unsigned char){0}, demux_y);
> + vec_perm(uyvy, (vector unsigned char) { 0 }, demux_y);
Same.
Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel