Merge commit '8b0dd4942aac320d1ca3c40fa7ea1be342c71273'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 18 Jul 2014 20:16:04 +0000 (22:16 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 18 Jul 2014 20:16:04 +0000 (22:16 +0200)
* commit '8b0dd4942aac320d1ca3c40fa7ea1be342c71273':
  idctdsp: prettyprinting cosmetics

Conflicts:
libavcodec/idctdsp.c
libavcodec/ppc/idctdsp.c
libavcodec/x86/idctdsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/arm/idctdsp_init_arm.c
libavcodec/arm/idctdsp_init_armv5te.c
libavcodec/arm/idctdsp_init_armv6.c
libavcodec/arm/idctdsp_init_neon.c
libavcodec/idctdsp.c
libavcodec/ppc/idctdsp.c
libavcodec/x86/idctdsp_init.c

@@@ -72,18 -72,18 +72,18 @@@ av_cold void ff_idctdsp_init_arm(IDCTDS
      ff_put_pixels_clamped = c->put_pixels_clamped;
      ff_add_pixels_clamped = c->add_pixels_clamped;
  
 -    if (!high_bit_depth) {
 +    if (!avctx->lowres && !high_bit_depth) {
          if (avctx->idct_algo == FF_IDCT_AUTO ||
              avctx->idct_algo == FF_IDCT_ARM) {
-             c->idct_put              = j_rev_dct_arm_put;
-             c->idct_add              = j_rev_dct_arm_add;
-             c->idct                  = ff_j_rev_dct_arm;
-             c->perm_type             = FF_IDCT_PERM_LIBMPEG2;
+             c->idct_put  = j_rev_dct_arm_put;
+             c->idct_add  = j_rev_dct_arm_add;
+             c->idct      = ff_j_rev_dct_arm;
+             c->perm_type = FF_IDCT_PERM_LIBMPEG2;
          } else if (avctx->idct_algo == FF_IDCT_SIMPLEARM) {
-             c->idct_put              = simple_idct_arm_put;
-             c->idct_add              = simple_idct_arm_add;
-             c->idct                  = ff_simple_idct_arm;
-             c->perm_type             = FF_IDCT_PERM_NONE;
+             c->idct_put  = simple_idct_arm_put;
+             c->idct_add  = simple_idct_arm_add;
+             c->idct      = ff_simple_idct_arm;
+             c->perm_type = FF_IDCT_PERM_NONE;
          }
      }
  
@@@ -32,13 -32,12 +32,13 @@@ void ff_simple_idct_add_armv5te(uint8_
  av_cold void ff_idctdsp_init_armv5te(IDCTDSPContext *c, AVCodecContext *avctx,
                                       unsigned high_bit_depth)
  {
 -    if (!high_bit_depth &&
 +    if (!avctx->lowres && !high_bit_depth &&
          (avctx->idct_algo == FF_IDCT_AUTO ||
 +         avctx->idct_algo == FF_IDCT_SIMPLEAUTO ||
           avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) {
-         c->idct_put              = ff_simple_idct_put_armv5te;
-         c->idct_add              = ff_simple_idct_add_armv5te;
-         c->idct                  = ff_simple_idct_armv5te;
-         c->perm_type             = FF_IDCT_PERM_NONE;
+         c->idct_put  = ff_simple_idct_put_armv5te;
+         c->idct_add  = ff_simple_idct_add_armv5te;
+         c->idct      = ff_simple_idct_armv5te;
+         c->perm_type = FF_IDCT_PERM_NONE;
      }
  }
@@@ -35,13 -35,13 +35,13 @@@ void ff_add_pixels_clamped_armv6(const 
  av_cold void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx,
                                     unsigned high_bit_depth)
  {
 -    if (!high_bit_depth) {
 +    if (!avctx->lowres && !high_bit_depth) {
          if (avctx->idct_algo == FF_IDCT_AUTO ||
              avctx->idct_algo == FF_IDCT_SIMPLEARMV6) {
-             c->idct_put              = ff_simple_idct_put_armv6;
-             c->idct_add              = ff_simple_idct_add_armv6;
-             c->idct                  = ff_simple_idct_armv6;
-             c->perm_type             = FF_IDCT_PERM_LIBMPEG2;
+             c->idct_put  = ff_simple_idct_put_armv6;
+             c->idct_add  = ff_simple_idct_add_armv6;
+             c->idct      = ff_simple_idct_armv6;
+             c->perm_type = FF_IDCT_PERM_LIBMPEG2;
          }
      }
      c->add_pixels_clamped = ff_add_pixels_clamped_armv6;
@@@ -37,14 -37,13 +37,14 @@@ void ff_put_signed_pixels_clamped_neon(
  av_cold void ff_idctdsp_init_neon(IDCTDSPContext *c, AVCodecContext *avctx,
                                    unsigned high_bit_depth)
  {
 -    if (!high_bit_depth) {
 +    if (!avctx->lowres && !high_bit_depth) {
          if (avctx->idct_algo == FF_IDCT_AUTO ||
 +            avctx->idct_algo == FF_IDCT_SIMPLEAUTO ||
              avctx->idct_algo == FF_IDCT_SIMPLENEON) {
-             c->idct_put              = ff_simple_idct_put_neon;
-             c->idct_add              = ff_simple_idct_add_neon;
-             c->idct                  = ff_simple_idct_neon;
-             c->perm_type             = FF_IDCT_PERM_PARTTRANS;
+             c->idct_put  = ff_simple_idct_put_neon;
+             c->idct_add  = ff_simple_idct_add_neon;
+             c->idct      = ff_simple_idct_neon;
+             c->perm_type = FF_IDCT_PERM_PARTTRANS;
          }
      }
  
@@@ -249,50 -157,28 +249,50 @@@ av_cold void ff_idctdsp_init(IDCTDSPCon
  {
      const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
  
 -    if (avctx->bits_per_raw_sample == 10) {
 -        c->idct_put  = ff_simple_idct_put_10;
 -        c->idct_add  = ff_simple_idct_add_10;
 -        c->idct      = ff_simple_idct_10;
 +    if (avctx->lowres==1) {
-         c->idct_put              = ff_jref_idct4_put;
-         c->idct_add              = ff_jref_idct4_add;
-         c->idct                  = ff_j_rev_dct4;
-         c->perm_type             = FF_IDCT_PERM_NONE;
++        c->idct_put  = ff_jref_idct4_put;
++        c->idct_add  = ff_jref_idct4_add;
++        c->idct      = ff_j_rev_dct4;
++        c->perm_type = FF_IDCT_PERM_NONE;
 +    } else if (avctx->lowres==2) {
-         c->idct_put              =  ff_jref_idct2_put;
-         c->idct_add              =  ff_jref_idct2_add;
-         c->idct                  =  ff_j_rev_dct2;
-         c->perm_type             = FF_IDCT_PERM_NONE;
++        c->idct_put  = ff_jref_idct2_put;
++        c->idct_add  = ff_jref_idct2_add;
++        c->idct      = ff_j_rev_dct2;
++        c->perm_type = FF_IDCT_PERM_NONE;
 +    } else if (avctx->lowres==3) {
-         c->idct_put              =  ff_jref_idct1_put;
-         c->idct_add              =  ff_jref_idct1_add;
-         c->idct                  =  ff_j_rev_dct1;
-         c->perm_type             = FF_IDCT_PERM_NONE;
++        c->idct_put  = ff_jref_idct1_put;
++        c->idct_add  = ff_jref_idct1_add;
++        c->idct      = ff_j_rev_dct1;
+         c->perm_type = FF_IDCT_PERM_NONE;
      } else {
 +        if (avctx->bits_per_raw_sample == 10) {
 +            c->idct_put              = ff_simple_idct_put_10;
 +            c->idct_add              = ff_simple_idct_add_10;
 +            c->idct                  = ff_simple_idct_10;
 +            c->perm_type             = FF_IDCT_PERM_NONE;
 +        } else if (avctx->bits_per_raw_sample == 12) {
 +            c->idct_put              = ff_simple_idct_put_12;
 +            c->idct_add              = ff_simple_idct_add_12;
 +            c->idct                  = ff_simple_idct_12;
 +            c->perm_type             = FF_IDCT_PERM_NONE;
 +        } else {
          if (avctx->idct_algo == FF_IDCT_INT) {
-             c->idct_put              = jref_idct_put;
-             c->idct_add              = jref_idct_add;
-             c->idct                  = ff_j_rev_dct;
-             c->perm_type             = FF_IDCT_PERM_LIBMPEG2;
+             c->idct_put  = jref_idct_put;
+             c->idct_add  = jref_idct_add;
+             c->idct      = ff_j_rev_dct;
+             c->perm_type = FF_IDCT_PERM_LIBMPEG2;
          } else if (avctx->idct_algo == FF_IDCT_FAAN) {
-             c->idct_put              = ff_faanidct_put;
-             c->idct_add              = ff_faanidct_add;
-             c->idct                  = ff_faanidct;
-             c->perm_type             = FF_IDCT_PERM_NONE;
+             c->idct_put  = ff_faanidct_put;
+             c->idct_add  = ff_faanidct_add;
+             c->idct      = ff_faanidct;
+             c->perm_type = FF_IDCT_PERM_NONE;
          } else { // accurate/default
-             c->idct_put              = ff_simple_idct_put_8;
-             c->idct_add              = ff_simple_idct_add_8;
-             c->idct                  = ff_simple_idct_8;
-             c->perm_type             = FF_IDCT_PERM_NONE;
+             c->idct_put  = ff_simple_idct_put_8;
+             c->idct_add  = ff_simple_idct_add_8;
+             c->idct      = ff_simple_idct_8;
+             c->perm_type = FF_IDCT_PERM_NONE;
          }
 +        }
      }
  
      c->put_pixels_clamped        = put_pixels_clamped_c;
@@@ -248,13 -232,12 +248,13 @@@ av_cold void ff_idctdsp_init_ppc(IDCTDS
  {
  #if HAVE_ALTIVEC
      if (PPC_ALTIVEC(av_get_cpu_flags())) {
 -        if (!high_bit_depth) {
 +        if (!high_bit_depth && avctx->lowres == 0) {
              if ((avctx->idct_algo == FF_IDCT_AUTO) ||
                  (avctx->idct_algo == FF_IDCT_ALTIVEC)) {
-                 c->idct                  = idct_altivec;
-                 c->idct_add              = idct_add_altivec;
-                 c->idct_put              = idct_put_altivec;
-                 c->perm_type             = FF_IDCT_PERM_TRANSPOSE;
++                c->idct      = idct_altivec;
+                 c->idct_add  = idct_add_altivec;
+                 c->idct_put  = idct_put_altivec;
+                 c->perm_type = FF_IDCT_PERM_TRANSPOSE;
              }
          }
      }
@@@ -66,22 -66,22 +66,22 @@@ av_cold void ff_idctdsp_init_x86(IDCTDS
  
      if (INLINE_MMX(cpu_flags)) {
          c->put_pixels_clamped        = ff_put_pixels_clamped_mmx;
 -        c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_mmx;
          c->add_pixels_clamped        = ff_add_pixels_clamped_mmx;
  
 -        if (!high_bit_depth) {
 +        if (avctx->lowres == 0 && !high_bit_depth) {
              switch (avctx->idct_algo) {
              case FF_IDCT_AUTO:
 +            case FF_IDCT_SIMPLEAUTO:
              case FF_IDCT_SIMPLEMMX:
-                 c->idct_put              = ff_simple_idct_put_mmx;
-                 c->idct_add              = ff_simple_idct_add_mmx;
-                 c->idct                  = ff_simple_idct_mmx;
-                 c->perm_type             = FF_IDCT_PERM_SIMPLE;
+                 c->idct_put  = ff_simple_idct_put_mmx;
+                 c->idct_add  = ff_simple_idct_add_mmx;
+                 c->idct      = ff_simple_idct_mmx;
+                 c->perm_type = FF_IDCT_PERM_SIMPLE;
                  break;
              case FF_IDCT_XVIDMMX:
-                 c->idct_put              = ff_idct_xvid_mmx_put;
-                 c->idct_add              = ff_idct_xvid_mmx_add;
-                 c->idct                  = ff_idct_xvid_mmx;
+                 c->idct_put  = ff_idct_xvid_mmx_put;
+                 c->idct_add  = ff_idct_xvid_mmx_add;
+                 c->idct      = ff_idct_xvid_mmx;
                  break;
              }
          }
      }
  
      if (INLINE_SSE2(cpu_flags)) {
 -        if (!high_bit_depth && avctx->idct_algo == FF_IDCT_XVIDMMX) {
 +        if (!high_bit_depth && avctx->idct_algo == FF_IDCT_XVIDMMX && avctx->lowres == 0) {
-             c->idct_put              = ff_idct_xvid_sse2_put;
-             c->idct_add              = ff_idct_xvid_sse2_add;
-             c->idct                  = ff_idct_xvid_sse2;
-             c->perm_type             = FF_IDCT_PERM_SSE2;
+             c->idct_put  = ff_idct_xvid_sse2_put;
+             c->idct_add  = ff_idct_xvid_sse2_add;
+             c->idct      = ff_idct_xvid_sse2;
+             c->perm_type = FF_IDCT_PERM_SSE2;
          }
      }
 +    if (EXTERNAL_SSE2(cpu_flags)) {
 +        c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_sse2;
 +    }
  }