[FFmpeg-devel] [PATCH] Add av_cold to table generation functions.

2014-08-30 Thread Reimar Döffinger
Signed-off-by: Reimar Döffinger 
---
 libavcodec/aac_tablegen.h  | 2 +-
 libavcodec/aacps_tablegen.h| 4 ++--
 libavcodec/aacsbr_tablegen.h   | 2 +-
 libavcodec/cbrt_tablegen.h | 2 +-
 libavcodec/dv_tablegen.h   | 2 +-
 libavcodec/motionpixels_tablegen.h | 6 +++---
 libavcodec/mpegaudio_tablegen.h| 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libavcodec/aac_tablegen.h b/libavcodec/aac_tablegen.h
index 1c19a15..bf71e59 100644
--- a/libavcodec/aac_tablegen.h
+++ b/libavcodec/aac_tablegen.h
@@ -31,7 +31,7 @@
 #include "libavutil/mathematics.h"
 float ff_aac_pow2sf_tab[428];
 
-void ff_aac_tableinit(void)
+av_cold void ff_aac_tableinit(void)
 {
 int i;
 for (i = 0; i < 428; i++)
diff --git a/libavcodec/aacps_tablegen.h b/libavcodec/aacps_tablegen.h
index 9df38ff..ca1112d 100644
--- a/libavcodec/aacps_tablegen.h
+++ b/libavcodec/aacps_tablegen.h
@@ -70,7 +70,7 @@ static const float g2_Q4[] = {
  0.16486303567403f,  0.23279856662996f, 0.25f
 };
 
-static void make_filters_from_proto(float (*filter)[8][2], const float *proto, 
int bands)
+static av_cold void make_filters_from_proto(float (*filter)[8][2], const float 
*proto, int bands)
 {
 int q, n;
 for (q = 0; q < bands; q++) {
@@ -82,7 +82,7 @@ static void make_filters_from_proto(float (*filter)[8][2], 
const float *proto, i
 }
 }
 
-static void ps_tableinit(void)
+static av_cold void ps_tableinit(void)
 {
 static const float ipdopd_sin[] = { 0, M_SQRT1_2, 1,  M_SQRT1_2,  0, 
-M_SQRT1_2, -1, -M_SQRT1_2 };
 static const float ipdopd_cos[] = { 1, M_SQRT1_2, 0, -M_SQRT1_2, -1, 
-M_SQRT1_2,  0,  M_SQRT1_2 };
diff --git a/libavcodec/aacsbr_tablegen.h b/libavcodec/aacsbr_tablegen.h
index 104daae..7380e26 100644
--- a/libavcodec/aacsbr_tablegen.h
+++ b/libavcodec/aacsbr_tablegen.h
@@ -116,7 +116,7 @@ static DECLARE_ALIGNED(32, float, sbr_qmf_window_us)[640] = 
{
  0.8537385600,
 };
 
-static void aacsbr_tableinit(void)
+static av_cold void aacsbr_tableinit(void)
 {
 int n;
 for (n = 1; n < 320; n++)
diff --git a/libavcodec/cbrt_tablegen.h b/libavcodec/cbrt_tablegen.h
index 0db64fc..73705e1 100644
--- a/libavcodec/cbrt_tablegen.h
+++ b/libavcodec/cbrt_tablegen.h
@@ -32,7 +32,7 @@
 #else
 static uint32_t cbrt_tab[1 << 13];
 
-static void cbrt_tableinit(void)
+static av_cold void cbrt_tableinit(void)
 {
 if (!cbrt_tab[(1<<13) - 1]) {
 int i;
diff --git a/libavcodec/dv_tablegen.h b/libavcodec/dv_tablegen.h
index c04b802..0b83a14 100644
--- a/libavcodec/dv_tablegen.h
+++ b/libavcodec/dv_tablegen.h
@@ -47,7 +47,7 @@ typedef struct dv_vlc_pair {
 #else
 static struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE];
 
-static void dv_vlc_map_tableinit(void)
+static av_cold void dv_vlc_map_tableinit(void)
 {
 int i, j;
 for (i = 0; i < NB_DV_VLC - 1; i++) {
diff --git a/libavcodec/motionpixels_tablegen.h 
b/libavcodec/motionpixels_tablegen.h
index 8fb840f..323914c 100644
--- a/libavcodec/motionpixels_tablegen.h
+++ b/libavcodec/motionpixels_tablegen.h
@@ -49,7 +49,7 @@ static int mp_yuv_to_rgb(int y, int v, int u, int clip_rgb) {
 #else
 static YuvPixel mp_rgb_yuv_table[1 << 15];
 
-static void mp_set_zero_yuv(YuvPixel *p)
+static av_cold void mp_set_zero_yuv(YuvPixel *p)
 {
 int i, j;
 
@@ -63,7 +63,7 @@ static void mp_set_zero_yuv(YuvPixel *p)
 }
 }
 
-static void mp_build_rgb_yuv_table(YuvPixel *p)
+static av_cold void mp_build_rgb_yuv_table(YuvPixel *p)
 {
 int y, v, u, i;
 
@@ -81,7 +81,7 @@ static void mp_build_rgb_yuv_table(YuvPixel *p)
 mp_set_zero_yuv(p + i * 32);
 }
 
-static void motionpixels_tableinit(void)
+static av_cold void motionpixels_tableinit(void)
 {
 if (!mp_rgb_yuv_table[0].u)
 mp_build_rgb_yuv_table(mp_rgb_yuv_table);
diff --git a/libavcodec/mpegaudio_tablegen.h b/libavcodec/mpegaudio_tablegen.h
index f9557c9..872cdf3 100644
--- a/libavcodec/mpegaudio_tablegen.h
+++ b/libavcodec/mpegaudio_tablegen.h
@@ -41,7 +41,7 @@ static float expval_table_float[512][16];
 #define FRAC_BITS 23
 #define IMDCT_SCALAR 1.759
 
-static void mpegaudio_tableinit(void)
+static av_cold void mpegaudio_tableinit(void)
 {
 int i, value, exponent;
 for (i = 1; i < TABLE_4_3_SIZE; i++) {
-- 
2.1.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] Add av_cold to table generation functions.

2014-08-30 Thread Reimar Döffinger
Signed-off-by: Reimar Döffinger 
---
 libavcodec/aac_tablegen.h  | 2 +-
 libavcodec/aacps_tablegen.h| 4 ++--
 libavcodec/aacsbr_tablegen.h   | 2 +-
 libavcodec/cbrt_tablegen.h | 3 ++-
 libavcodec/dv_tablegen.h   | 3 ++-
 libavcodec/motionpixels_tablegen.h | 7 ---
 libavcodec/mpegaudio_tablegen.h| 3 ++-
 7 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/libavcodec/aac_tablegen.h b/libavcodec/aac_tablegen.h
index 1c19a15..bf71e59 100644
--- a/libavcodec/aac_tablegen.h
+++ b/libavcodec/aac_tablegen.h
@@ -31,7 +31,7 @@
 #include "libavutil/mathematics.h"
 float ff_aac_pow2sf_tab[428];
 
-void ff_aac_tableinit(void)
+av_cold void ff_aac_tableinit(void)
 {
 int i;
 for (i = 0; i < 428; i++)
diff --git a/libavcodec/aacps_tablegen.h b/libavcodec/aacps_tablegen.h
index 9df38ff..ca1112d 100644
--- a/libavcodec/aacps_tablegen.h
+++ b/libavcodec/aacps_tablegen.h
@@ -70,7 +70,7 @@ static const float g2_Q4[] = {
  0.16486303567403f,  0.23279856662996f, 0.25f
 };
 
-static void make_filters_from_proto(float (*filter)[8][2], const float *proto, 
int bands)
+static av_cold void make_filters_from_proto(float (*filter)[8][2], const float 
*proto, int bands)
 {
 int q, n;
 for (q = 0; q < bands; q++) {
@@ -82,7 +82,7 @@ static void make_filters_from_proto(float (*filter)[8][2], 
const float *proto, i
 }
 }
 
-static void ps_tableinit(void)
+static av_cold void ps_tableinit(void)
 {
 static const float ipdopd_sin[] = { 0, M_SQRT1_2, 1,  M_SQRT1_2,  0, 
-M_SQRT1_2, -1, -M_SQRT1_2 };
 static const float ipdopd_cos[] = { 1, M_SQRT1_2, 0, -M_SQRT1_2, -1, 
-M_SQRT1_2,  0,  M_SQRT1_2 };
diff --git a/libavcodec/aacsbr_tablegen.h b/libavcodec/aacsbr_tablegen.h
index 7b70c26..56fdccc 100644
--- a/libavcodec/aacsbr_tablegen.h
+++ b/libavcodec/aacsbr_tablegen.h
@@ -113,7 +113,7 @@ static DECLARE_ALIGNED(32, float, sbr_qmf_window_us)[640] = 
{
  0.8537385600,
 };
 
-static void aacsbr_tableinit(void)
+static av_cold void aacsbr_tableinit(void)
 {
 int n;
 for (n = 1; n < 320; n++)
diff --git a/libavcodec/cbrt_tablegen.h b/libavcodec/cbrt_tablegen.h
index 0db64fc..d8c77c2 100644
--- a/libavcodec/cbrt_tablegen.h
+++ b/libavcodec/cbrt_tablegen.h
@@ -25,6 +25,7 @@
 
 #include 
 #include 
+#include "libavutil/attributes.h"
 
 #if CONFIG_HARDCODED_TABLES
 #define cbrt_tableinit()
@@ -32,7 +33,7 @@
 #else
 static uint32_t cbrt_tab[1 << 13];
 
-static void cbrt_tableinit(void)
+static av_cold void cbrt_tableinit(void)
 {
 if (!cbrt_tab[(1<<13) - 1]) {
 int i;
diff --git a/libavcodec/dv_tablegen.h b/libavcodec/dv_tablegen.h
index c04b802..cc6605b 100644
--- a/libavcodec/dv_tablegen.h
+++ b/libavcodec/dv_tablegen.h
@@ -24,6 +24,7 @@
 #define AVCODEC_DV_TABLEGEN_H
 
 #include 
+#include "libavutil/attributes.h"
 
 #include "dvdata.h"
 
@@ -47,7 +48,7 @@ typedef struct dv_vlc_pair {
 #else
 static struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE];
 
-static void dv_vlc_map_tableinit(void)
+static av_cold void dv_vlc_map_tableinit(void)
 {
 int i, j;
 for (i = 0; i < NB_DV_VLC - 1; i++) {
diff --git a/libavcodec/motionpixels_tablegen.h 
b/libavcodec/motionpixels_tablegen.h
index 8fb840f..4ffe74c 100644
--- a/libavcodec/motionpixels_tablegen.h
+++ b/libavcodec/motionpixels_tablegen.h
@@ -24,6 +24,7 @@
 #define AVCODEC_MOTIONPIXELS_TABLEGEN_H
 
 #include 
+#include "libavutil/attributes.h"
 
 typedef struct YuvPixel {
 int8_t y, v, u;
@@ -49,7 +50,7 @@ static int mp_yuv_to_rgb(int y, int v, int u, int clip_rgb) {
 #else
 static YuvPixel mp_rgb_yuv_table[1 << 15];
 
-static void mp_set_zero_yuv(YuvPixel *p)
+static av_cold void mp_set_zero_yuv(YuvPixel *p)
 {
 int i, j;
 
@@ -63,7 +64,7 @@ static void mp_set_zero_yuv(YuvPixel *p)
 }
 }
 
-static void mp_build_rgb_yuv_table(YuvPixel *p)
+static av_cold void mp_build_rgb_yuv_table(YuvPixel *p)
 {
 int y, v, u, i;
 
@@ -81,7 +82,7 @@ static void mp_build_rgb_yuv_table(YuvPixel *p)
 mp_set_zero_yuv(p + i * 32);
 }
 
-static void motionpixels_tableinit(void)
+static av_cold void motionpixels_tableinit(void)
 {
 if (!mp_rgb_yuv_table[0].u)
 mp_build_rgb_yuv_table(mp_rgb_yuv_table);
diff --git a/libavcodec/mpegaudio_tablegen.h b/libavcodec/mpegaudio_tablegen.h
index f9557c9..86b2cd3 100644
--- a/libavcodec/mpegaudio_tablegen.h
+++ b/libavcodec/mpegaudio_tablegen.h
@@ -25,6 +25,7 @@
 
 #include 
 #include 
+#include "libavutil/attributes.h"
 
 #define TABLE_4_3_SIZE (8191 + 16)*4
 #if CONFIG_HARDCODED_TABLES
@@ -41,7 +42,7 @@ static float expval_table_float[512][16];
 #define FRAC_BITS 23
 #define IMDCT_SCALAR 1.759
 
-static void mpegaudio_tableinit(void)
+static av_cold void mpegaudio_tableinit(void)
 {
 int i, value, exponent;
 for (i = 1; i < TABLE_4_3_SIZE; i++) {
-- 
2.1.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Add av_cold to table generation functions.

2014-08-30 Thread Reimar Döffinger
On Sat, Aug 30, 2014 at 05:35:55PM +0200, Reimar Döffinger wrote:
> Signed-off-by: Reimar Döffinger 

Sorry, I sent this by accident.
It does not yet compile, will send a fixed version.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Add av_cold to table generation functions.

2014-08-30 Thread Michael Niedermayer
On Sat, Aug 30, 2014 at 06:00:43PM +0200, Reimar Döffinger wrote:
> Signed-off-by: Reimar Döffinger 
> ---
>  libavcodec/aac_tablegen.h  | 2 +-
>  libavcodec/aacps_tablegen.h| 4 ++--
>  libavcodec/aacsbr_tablegen.h   | 2 +-
>  libavcodec/cbrt_tablegen.h | 3 ++-
>  libavcodec/dv_tablegen.h   | 3 ++-
>  libavcodec/motionpixels_tablegen.h | 7 ---
>  libavcodec/mpegaudio_tablegen.h| 3 ++-
>  7 files changed, 14 insertions(+), 10 deletions(-)

probably ok

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Add av_cold to table generation functions.

2014-08-31 Thread Reimar Döffinger
On Sat, Aug 30, 2014 at 06:15:46PM +0200, Michael Niedermayer wrote:
> On Sat, Aug 30, 2014 at 06:00:43PM +0200, Reimar Döffinger wrote:
> > Signed-off-by: Reimar Döffinger 
> > ---
> >  libavcodec/aac_tablegen.h  | 2 +-
> >  libavcodec/aacps_tablegen.h| 4 ++--
> >  libavcodec/aacsbr_tablegen.h   | 2 +-
> >  libavcodec/cbrt_tablegen.h | 3 ++-
> >  libavcodec/dv_tablegen.h   | 3 ++-
> >  libavcodec/motionpixels_tablegen.h | 7 ---
> >  libavcodec/mpegaudio_tablegen.h| 3 ++-
> >  7 files changed, 14 insertions(+), 10 deletions(-)
> 
> probably ok

Pushed, thanks.
(except for the aacsbr change which I moved into the patch
that adds that file)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel