Commit f9cd3172 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'fe4d5fe9'

* commit 'fe4d5fe9':
  jpeg2000: Mark static data init functions as av_cold

Conflicts:
	libavcodec/jpeg2000.c
	libavcodec/jpeg2000dec.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a50c6f99 fe4d5fe9
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* JPEG 2000 image encoder and decoder common functions * JPEG 2000 image encoder and decoder common functions
*/ */
#include "libavutil/attributes.h"
#include "libavutil/avassert.h" #include "libavutil/avassert.h"
#include "libavutil/common.h" #include "libavutil/common.h"
#include "libavutil/mem.h" #include "libavutil/mem.h"
...@@ -153,7 +154,7 @@ static int getsgnctxno(int flag, uint8_t *xorbit) ...@@ -153,7 +154,7 @@ static int getsgnctxno(int flag, uint8_t *xorbit)
return ctxlbltab[hcontrib][vcontrib]; return ctxlbltab[hcontrib][vcontrib];
} }
void ff_jpeg2000_init_tier1_luts(void) void av_cold ff_jpeg2000_init_tier1_luts(void)
{ {
int i, j; int i, j;
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <inttypes.h> #include <inttypes.h>
#include "libavutil/attributes.h"
#include "libavutil/avassert.h" #include "libavutil/avassert.h"
#include "libavutil/common.h" #include "libavutil/common.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
...@@ -1691,7 +1692,7 @@ end: ...@@ -1691,7 +1692,7 @@ end:
return ret; return ret;
} }
static void jpeg2000_init_static_data(AVCodec *codec) static av_cold void jpeg2000_init_static_data(AVCodec *codec)
{ {
ff_jpeg2000_init_tier1_luts(); ff_jpeg2000_init_tier1_luts();
ff_mqc_init_context_tables(); ff_mqc_init_context_tables();
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
#include "libavutil/attributes.h"
#include "mqc.h" #include "mqc.h"
/* MQ coder context state structure */ /* MQ coder context state structure */
...@@ -92,7 +94,7 @@ uint16_t ff_mqc_qe [2 * 47]; ...@@ -92,7 +94,7 @@ uint16_t ff_mqc_qe [2 * 47];
uint8_t ff_mqc_nlps[2 * 47]; uint8_t ff_mqc_nlps[2 * 47];
uint8_t ff_mqc_nmps[2 * 47]; uint8_t ff_mqc_nmps[2 * 47];
void ff_mqc_init_context_tables(void) void av_cold ff_mqc_init_context_tables(void)
{ {
int i; int i;
for (i = 0; i < 47; i++) { for (i = 0; i < 47; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment