On Sun, Jul 13, 2014 at 08:18:28AM +0000, Anton Khirnov wrote:
> --- a/libavcodec/hevcdsp_template.c
> +++ b/libavcodec/hevcdsp_template.c
> @@ -266,81 +241,59 @@ static void FUNC(transform_4x4_add)(uint8_t *_dst,
> int16_t *coeffs,
> -static void FUNC(transform_8x8_add)(uint8_t *_dst, int16_t *coeffs,
> - ptrdiff_t stride)
> +static av_always_inline void FUNC(transform_add)(uint8_t *_dst, int16_t
> *coeffs,
> + ptrdiff_t stride, int size)
> {
> - int i;
> pixel *dst = (pixel *)_dst;
> + int16_t *src = coeffs;
> int shift = 7;
> int add = 1 << (shift - 1);
> - int16_t *src = coeffs;
> + int i;
stray change
> - for (i = 0; i < 8; i++) {
> - TR_8(dst, coeffs, 1, 1, ADD_AND_SCALE);
> - coeffs += 8;
> + for (i = 0; i < size; i++) {
> + if (size == 4) TR_4 (dst, coeffs, 1, 1, ADD_AND_SCALE);
> + if (size == 8) TR_8 (dst, coeffs, 1, 1, ADD_AND_SCALE);
> + if (size == 16) TR_16(dst, coeffs, 1, 1, ADD_AND_SCALE);
> + if (size == 32) TR_32(dst, coeffs, 1, 1, ADD_AND_SCALE);
I'd break these lines.
LGTM otherwise.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel