On Thu, Jan 24, 2013 at 12:15:49PM +0100, Mans Rullgard wrote:
> 
> Author:    Mans Rullgard <[email protected]>
> Committer: Luca Barbato <[email protected]>
> Date:      Wed Jan 23 20:24:53 2013 -0800
> 
> dsputil: Separate h264 qpel
> 
> The sh4 optimizations are removed, because the code is
> 100% identical to the C code, so it is unlikely to
> provide any real practical benefit.
> 
> Signed-off-by: Diego Biurrun <[email protected]>
> Signed-off-by: Ronald S. Bultje <[email protected]>
> Signed-off-by: Luca Barbato <[email protected]>
> 
> --- a/libavcodec/ppc/h264_altivec.c
> +++ b/libavcodec/ppc/h264_altivec.c
> @@ -22,258 +22,9 @@
> -
> -#define OP_U8_ALTIVEC                          PUT_OP_U8_ALTIVEC
> -#define PREFIX_h264_chroma_mc8_altivec         put_h264_chroma_mc8_altivec
> -#define PREFIX_h264_chroma_mc8_num             
> altivec_put_h264_chroma_mc8_num
> -#include "h264_altivec_template.c"
> -#undef OP_U8_ALTIVEC
> -#undef PREFIX_h264_chroma_mc8_altivec
> -#undef PREFIX_h264_chroma_mc8_num
> -
> -#define OP_U8_ALTIVEC                          AVG_OP_U8_ALTIVEC
> -#define PREFIX_h264_chroma_mc8_altivec         avg_h264_chroma_mc8_altivec
> -#define PREFIX_h264_chroma_mc8_num             
> altivec_avg_h264_chroma_mc8_num
> -#include "h264_altivec_template.c"
> -#undef OP_U8_ALTIVEC
> -#undef PREFIX_h264_chroma_mc8_altivec
> -#undef PREFIX_h264_chroma_mc8_num
> -
> @@ -967,39 +718,6 @@ static void ff_biweight_h264_pixels ## W ## 
> _altivec(uint8_t *dst, uint8_t *src,
>  
> -void ff_dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx) {
> -    const int high_bit_depth = avctx->bits_per_raw_sample > 8;
> -
> -    if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
> -    if (!high_bit_depth) {
> -        c->put_h264_chroma_pixels_tab[0] = put_h264_chroma_mc8_altivec;
> -        c->avg_h264_chroma_pixels_tab[0] = avg_h264_chroma_mc8_altivec;
> -
> -    }
> -    }
> -}
> -
> --- /dev/null
> +++ b/libavcodec/ppc/h264_qpel.c
> @@ -0,0 +1,319 @@
> +
> +#define OP_U8_ALTIVEC                          PUT_OP_U8_ALTIVEC
> +#define PREFIX_h264_chroma_mc8_altivec         put_h264_chroma_mc8_altivec
> +#define PREFIX_h264_chroma_mc8_num             
> altivec_put_h264_chroma_mc8_num
> +#include "h264_qpel_template.c"
> +#undef OP_U8_ALTIVEC
> +#undef PREFIX_h264_chroma_mc8_altivec
> +#undef PREFIX_h264_chroma_mc8_num
> +
> +#define OP_U8_ALTIVEC                          AVG_OP_U8_ALTIVEC
> +#define PREFIX_h264_chroma_mc8_altivec         avg_h264_chroma_mc8_altivec
> +#define PREFIX_h264_chroma_mc8_num             
> altivec_avg_h264_chroma_mc8_num
> +#include "h264_qpel_template.c"
> +#undef OP_U8_ALTIVEC
> +#undef PREFIX_h264_chroma_mc8_altivec
> +#undef PREFIX_h264_chroma_mc8_num
> +
> +void ff_dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx)
> +{
> +    const int high_bit_depth = avctx->bits_per_raw_sample > 8;
> +
> +    if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
> +    if (!high_bit_depth) {
> +        c->put_h264_chroma_pixels_tab[0] = put_h264_chroma_mc8_altivec;
> +        c->avg_h264_chroma_pixels_tab[0] = avg_h264_chroma_mc8_altivec;
> +    }
> +    }
> +}
> +#endif /* HAVE_ALTIVEC */

This mixes h264qpel and h264chroma.  The chroma bits should not have been
moved to the h264qpel template.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to