Commit 5a9943f8 authored by michaelni's avatar michaelni

C99 initializers and kill warnings patch by (mru at users dot sourceforge dot net (Måns Rullgård))


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1474 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ca8ba7fd
...@@ -1452,6 +1452,7 @@ static int AC3_encode_frame(AVCodecContext *avctx, ...@@ -1452,6 +1452,7 @@ static int AC3_encode_frame(AVCodecContext *avctx,
static int AC3_encode_close(AVCodecContext *avctx) static int AC3_encode_close(AVCodecContext *avctx)
{ {
av_freep(&avctx->coded_frame); av_freep(&avctx->coded_frame);
return 0;
} }
#if 0 #if 0
......
...@@ -43,70 +43,70 @@ typedef struct PixFmtInfo { ...@@ -43,70 +43,70 @@ typedef struct PixFmtInfo {
static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
/* YUV formats */ /* YUV formats */
[PIX_FMT_YUV420P] = { [PIX_FMT_YUV420P] = {
name: "yuv420p", .name = "yuv420p",
nb_components: 3, is_yuv: 1, .nb_components = 3, .is_yuv = 1,
x_chroma_shift: 1, y_chroma_shift: 1, .x_chroma_shift = 1, .y_chroma_shift = 1,
}, },
[PIX_FMT_YUV422P] = { [PIX_FMT_YUV422P] = {
name: "yuv422p", .name = "yuv422p",
nb_components: 3, is_yuv: 1, .nb_components = 3, .is_yuv = 1,
x_chroma_shift: 1, y_chroma_shift: 0, .x_chroma_shift = 1, .y_chroma_shift = 0,
}, },
[PIX_FMT_YUV444P] = { [PIX_FMT_YUV444P] = {
name: "yuv444p", .name = "yuv444p",
nb_components: 3, is_yuv: 1, .nb_components = 3, .is_yuv = 1,
x_chroma_shift: 0, y_chroma_shift: 0, .x_chroma_shift = 0, .y_chroma_shift = 0,
}, },
[PIX_FMT_YUV422] = { [PIX_FMT_YUV422] = {
name: "yuv422", .name = "yuv422",
nb_components: 1, is_yuv: 1, is_packed: 1, .nb_components = 1, .is_yuv = 1, .is_packed = 1,
x_chroma_shift: 1, y_chroma_shift: 0, .x_chroma_shift = 1, .y_chroma_shift = 0,
}, },
[PIX_FMT_YUV410P] = { [PIX_FMT_YUV410P] = {
name: "yuv410p", .name = "yuv410p",
nb_components: 3, is_yuv: 1, .nb_components = 3, .is_yuv = 1,
x_chroma_shift: 2, y_chroma_shift: 2, .x_chroma_shift = 2, .y_chroma_shift = 2,
}, },
[PIX_FMT_YUV411P] = { [PIX_FMT_YUV411P] = {
name: "yuv411p", .name = "yuv411p",
nb_components: 3, is_yuv: 1, .nb_components = 3, .is_yuv = 1,
x_chroma_shift: 2, y_chroma_shift: 0, .x_chroma_shift = 2, .y_chroma_shift = 0,
}, },
/* RGB formats */ /* RGB formats */
[PIX_FMT_RGB24] = { [PIX_FMT_RGB24] = {
name: "rgb24", .name = "rgb24",
nb_components: 1, is_packed: 1, .nb_components = 1, .is_packed = 1,
}, },
[PIX_FMT_BGR24] = { [PIX_FMT_BGR24] = {
name: "bgr24", .name = "bgr24",
nb_components: 1, is_packed: 1, .nb_components = 1, .is_packed = 1,
}, },
[PIX_FMT_RGBA32] = { [PIX_FMT_RGBA32] = {
name: "rgba32", .name = "rgba32",
nb_components: 1, is_packed: 1, is_alpha: 1, .nb_components = 1, .is_packed = 1, .is_alpha = 1,
}, },
[PIX_FMT_RGB565] = { [PIX_FMT_RGB565] = {
name: "rgb565", .name = "rgb565",
nb_components: 1, is_packed: 1, .nb_components = 1, .is_packed = 1,
}, },
[PIX_FMT_RGB555] = { [PIX_FMT_RGB555] = {
name: "rgb555", .name = "rgb555",
nb_components: 1, is_packed: 1, is_alpha : 1, .nb_components = 1, .is_packed = 1, .is_alpha = 1,
}, },
/* gray / mono formats */ /* gray / mono formats */
[PIX_FMT_GRAY8] = { [PIX_FMT_GRAY8] = {
name: "gray", .name = "gray",
nb_components: 1, is_gray: 1, .nb_components = 1, .is_gray = 1,
}, },
[PIX_FMT_MONOWHITE] = { [PIX_FMT_MONOWHITE] = {
name: "monow", .name = "monow",
nb_components: 1, is_packed: 1, is_gray: 1, .nb_components = 1, .is_packed = 1, .is_gray = 1,
}, },
[PIX_FMT_MONOBLACK] = { [PIX_FMT_MONOBLACK] = {
name: "monob", .name = "monob",
nb_components: 1, is_packed: 1, is_gray: 1, .nb_components = 1, .is_packed = 1, .is_gray = 1,
}, },
}; };
...@@ -938,97 +938,97 @@ typedef struct ConvertEntry { ...@@ -938,97 +938,97 @@ typedef struct ConvertEntry {
static ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = { static ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
[PIX_FMT_YUV420P] = { [PIX_FMT_YUV420P] = {
[PIX_FMT_RGB555] = { [PIX_FMT_RGB555] = {
convert: yuv420p_to_rgb555 .convert = yuv420p_to_rgb555
}, },
[PIX_FMT_RGB565] = { [PIX_FMT_RGB565] = {
convert: yuv420p_to_rgb565 .convert = yuv420p_to_rgb565
}, },
[PIX_FMT_BGR24] = { [PIX_FMT_BGR24] = {
convert: yuv420p_to_bgr24 .convert = yuv420p_to_bgr24
}, },
[PIX_FMT_RGB24] = { [PIX_FMT_RGB24] = {
convert: yuv420p_to_rgb24 .convert = yuv420p_to_rgb24
}, },
[PIX_FMT_RGBA32] = { [PIX_FMT_RGBA32] = {
convert: yuv420p_to_rgba32 .convert = yuv420p_to_rgba32
}, },
}, },
[PIX_FMT_YUV422P] = { [PIX_FMT_YUV422P] = {
[PIX_FMT_RGB555] = { [PIX_FMT_RGB555] = {
convert: yuv422p_to_rgb555 .convert = yuv422p_to_rgb555
}, },
[PIX_FMT_RGB565] = { [PIX_FMT_RGB565] = {
convert: yuv422p_to_rgb565 .convert = yuv422p_to_rgb565
}, },
[PIX_FMT_BGR24] = { [PIX_FMT_BGR24] = {
convert: yuv422p_to_bgr24 .convert = yuv422p_to_bgr24
}, },
[PIX_FMT_RGB24] = { [PIX_FMT_RGB24] = {
convert: yuv422p_to_rgb24 .convert = yuv422p_to_rgb24
}, },
[PIX_FMT_RGBA32] = { [PIX_FMT_RGBA32] = {
convert: yuv422p_to_rgba32 .convert = yuv422p_to_rgba32
}, },
}, },
[PIX_FMT_YUV422] = { [PIX_FMT_YUV422] = {
[PIX_FMT_YUV420P] = { [PIX_FMT_YUV420P] = {
convert: yuv422_to_yuv420p, .convert = yuv422_to_yuv420p,
}, },
}, },
[PIX_FMT_RGB24] = { [PIX_FMT_RGB24] = {
[PIX_FMT_YUV420P] = { [PIX_FMT_YUV420P] = {
convert: rgb24_to_yuv420p .convert = rgb24_to_yuv420p
}, },
[PIX_FMT_RGB565] = { [PIX_FMT_RGB565] = {
convert: rgb24_to_rgb565 .convert = rgb24_to_rgb565
}, },
[PIX_FMT_RGB555] = { [PIX_FMT_RGB555] = {
convert: rgb24_to_rgb555 .convert = rgb24_to_rgb555
}, },
[PIX_FMT_GRAY8] = { [PIX_FMT_GRAY8] = {
convert: rgb24_to_gray .convert = rgb24_to_gray
}, },
}, },
[PIX_FMT_RGBA32] = { [PIX_FMT_RGBA32] = {
[PIX_FMT_YUV420P] = { [PIX_FMT_YUV420P] = {
convert: rgba32_to_yuv420p .convert = rgba32_to_yuv420p
}, },
}, },
[PIX_FMT_BGR24] = { [PIX_FMT_BGR24] = {
[PIX_FMT_YUV420P] = { [PIX_FMT_YUV420P] = {
convert: bgr24_to_yuv420p .convert = bgr24_to_yuv420p
}, },
}, },
[PIX_FMT_RGB555] = { [PIX_FMT_RGB555] = {
[PIX_FMT_YUV420P] = { [PIX_FMT_YUV420P] = {
convert: rgb555_to_yuv420p .convert = rgb555_to_yuv420p
}, },
}, },
[PIX_FMT_RGB565] = { [PIX_FMT_RGB565] = {
[PIX_FMT_YUV420P] = { [PIX_FMT_YUV420P] = {
convert: rgb565_to_yuv420p .convert = rgb565_to_yuv420p
}, },
}, },
[PIX_FMT_GRAY8] = { [PIX_FMT_GRAY8] = {
[PIX_FMT_RGB24] = { [PIX_FMT_RGB24] = {
convert: gray_to_rgb24 .convert = gray_to_rgb24
}, },
[PIX_FMT_MONOWHITE] = { [PIX_FMT_MONOWHITE] = {
convert: gray_to_monowhite .convert = gray_to_monowhite
}, },
[PIX_FMT_MONOBLACK] = { [PIX_FMT_MONOBLACK] = {
convert: gray_to_monoblack .convert = gray_to_monoblack
}, },
}, },
[PIX_FMT_MONOWHITE] = { [PIX_FMT_MONOWHITE] = {
[PIX_FMT_GRAY8] = { [PIX_FMT_GRAY8] = {
convert: monowhite_to_gray .convert = monowhite_to_gray
}, },
}, },
[PIX_FMT_MONOBLACK] = { [PIX_FMT_MONOBLACK] = {
[PIX_FMT_GRAY8] = { [PIX_FMT_GRAY8] = {
convert: monoblack_to_gray .convert = monoblack_to_gray
}, },
}, },
}; };
......
...@@ -302,7 +302,7 @@ static void set_cmp(MpegEncContext *s, me_cmp_func *cmp, int type){ ...@@ -302,7 +302,7 @@ static void set_cmp(MpegEncContext *s, me_cmp_func *cmp, int type){
default: default:
fprintf(stderr,"internal error in cmp function selection\n"); fprintf(stderr,"internal error in cmp function selection\n");
} }
}; }
static inline int get_penalty_factor(MpegEncContext *s, int type){ static inline int get_penalty_factor(MpegEncContext *s, int type){
switch(type&0xFF){ switch(type&0xFF){
......
...@@ -507,7 +507,7 @@ static int decode_init(AVCodecContext * avctx) ...@@ -507,7 +507,7 @@ static int decode_init(AVCodecContext * avctx)
return 0; return 0;
} }
/* tab[i][j] = 1.0 / (2.0 * cos(pi*(2*k+1) / 2^(6 - j))) */; /* tab[i][j] = 1.0 / (2.0 * cos(pi*(2*k+1) / 2^(6 - j))) */
/* cos(i*pi/64) */ /* cos(i*pi/64) */
......
...@@ -291,7 +291,7 @@ static int alloc_picture(MpegEncContext *s, Picture *pic, int shared){ ...@@ -291,7 +291,7 @@ static int alloc_picture(MpegEncContext *s, Picture *pic, int shared){
r= s->avctx->get_buffer(s->avctx, (AVFrame*)pic); r= s->avctx->get_buffer(s->avctx, (AVFrame*)pic);
if(r<0 || !pic->age || !pic->type || !pic->data[0]){ if(r<0 || !pic->age || !pic->type || !pic->data[0]){
fprintf(stderr, "get_buffer() failed (%d %d %d %X)\n", r, pic->age, pic->type, (int)pic->data[0]); fprintf(stderr, "get_buffer() failed (%d %d %d %p)\n", r, pic->age, pic->type, pic->data[0]);
return -1; return -1;
} }
......
...@@ -363,7 +363,7 @@ AVCodec name ## _decoder = { \ ...@@ -363,7 +363,7 @@ AVCodec name ## _decoder = { \
NULL, \ NULL, \
NULL, \ NULL, \
pcm_decode_frame, \ pcm_decode_frame, \
}; }
PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le); PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be); PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
......
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