[2/5] simple_idct: Conditionally compile bits used only by DV and ProRes decoders

Message ID 1410269130-28173-2-git-send-email-diego@biurrun.de
State New
Headers show

Commit Message

Diego Biurrun Sept. 9, 2014, 1:25 p.m.
---
 libavcodec/simple_idct.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Luca Barbato Sept. 11, 2014, 9:03 p.m. | #1
On 09/09/14 15:25, Diego Biurrun wrote:
> ---
>  libavcodec/simple_idct.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/libavcodec/simple_idct.c b/libavcodec/simple_idct.c
> index f61e9e6..7946f01 100644
> --- a/libavcodec/simple_idct.c
> +++ b/libavcodec/simple_idct.c
> @@ -49,6 +49,7 @@
>     and the butterfly must be multiplied by 0.5 * sqrt(2.0) */
>  #define C_SHIFT (4+1+12)
>  
> +#if CONFIG_DVVIDEO_DECODER
>  static inline void idct4col_put(uint8_t *dest, int line_size, const int16_t *col)
>  {
>      int c0, c1, c2, c3, a0, a1, a2, a3;
> @@ -115,6 +116,7 @@ void ff_simple_idct248_put(uint8_t *dest, int line_size, int16_t *block)
>          idct4col_put(dest + line_size + i, 2 * line_size, block + 8 + i);
>      }
>  }
> +#endif /* CONFIG_DVVIDEO_DECODER */

libavcodec/dct-test.c uses it

lu

Patch

diff --git a/libavcodec/simple_idct.c b/libavcodec/simple_idct.c
index f61e9e6..7946f01 100644
--- a/libavcodec/simple_idct.c
+++ b/libavcodec/simple_idct.c
@@ -49,6 +49,7 @@ 
    and the butterfly must be multiplied by 0.5 * sqrt(2.0) */
 #define C_SHIFT (4+1+12)
 
+#if CONFIG_DVVIDEO_DECODER
 static inline void idct4col_put(uint8_t *dest, int line_size, const int16_t *col)
 {
     int c0, c1, c2, c3, a0, a1, a2, a3;
@@ -115,6 +116,7 @@  void ff_simple_idct248_put(uint8_t *dest, int line_size, int16_t *block)
         idct4col_put(dest + line_size + i, 2 * line_size, block + 8 + i);
     }
 }
+#endif /* CONFIG_DVVIDEO_DECODER */
 
 /* 8x4 & 4x8 WMV2 IDCT */
 #undef CN_SHIFT
@@ -218,6 +220,7 @@  void ff_simple_idct44_add(uint8_t *dest, int line_size, int16_t *block)
     }
 }
 
+#if CONFIG_PRORES_DECODER
 void ff_prores_idct(int16_t *block, const int16_t *qmat)
 {
     int i;
@@ -231,3 +234,4 @@  void ff_prores_idct(int16_t *block, const int16_t *qmat)
     for (i = 0; i < 8; i++)
         idctSparseCol_10(block + i);
 }
+#endif /* CONFIG_PRORES_DECODER */