History

Merge remote-tracking branch 'qatar/master'

* qatar/master: fix hardcoded tables compililation caused by missing math constants lavf: Make codec_tag arrays constant twinvq: give massive struct a name. lavf, lavu: version bumps and APIchanges for av_gettime() move lavfi/audio: don't set cur_buf in ff_filter_samples(). lavfi/fifo: add audio version of the fifo filter. fifo: fix parenthesis placement. lavfi: rename vf_fifo.c -> fifo.c lavc: remove stats_in from AVCodecContext options table. Conflicts: doc/APIchanges libavfilter/Makefile libavfilter/allfilters.c libavfilter/audio.c libavfilter/fifo.c libavformat/version.h libavutil/avutil.h

Michael Niedermayer committed 14 years ago

Commit 87dced82 parents fd0b8c6 1d01fee15 files · +75 −43Browse files

Unified · Split

15 files
  1. configure +1 −1
  2. doc/APIchanges +3 −0
  3. libavcodec/aacps_tablegen.h +1 −0
  4. libavcodec/cos_tablegen.c +0 −3
  5. libavcodec/options_table.h +0 −1
  6. libavcodec/sinewin_tablegen.c +0 −3
  7. libavcodec/twinvq_data.h +1 −1
  8. libavfilter/Makefile +2 −1
  9. libavfilter/allfilters.c +1 −0
  10. libavfilter/audio.c +10 −8
  11. libavfilter/fifo.c +52 −21
  12. libavformat/cafdec.c +1 −1
  13. libavformat/ivfdec.c +1 −1
  14. libavformat/version.h +1 −1
  15. libavutil/avutil.h +1 −1
configure+1−1
@@ -1903,7 +1903,7 @@ AS_O='-o $@' · 1902 unmodified lines
1903CC_O='-o $@'1903CC_O='-o $@'
1904CXX_O='-o $@'1904CXX_O='-o $@'
1905 1905
1906host_cflags='-D_ISOC99_SOURCE -O3 -g'1906host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
1907host_libs='-lm'1907host_libs='-lm'
1908 1908
1909target_path='$(CURDIR)'1909target_path='$(CURDIR)'
doc/APIchanges+3−0
@@ -38,6 +38,9 @@ API changes, most recent first: · 37 unmodified lines
382012-03-26 - a67d9cf - lavfi 2.66.100382012-03-26 - a67d9cf - lavfi 2.66.100
39 Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.39 Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
40 40
412012-06-20 - ae0a301 - lavu 51.33.0
42 Move av_gettime() to libavutil, add libavutil/time.h
43
412012-xx-xx - xxxxxxx - lavr 0.0.3442012-xx-xx - xxxxxxx - lavr 0.0.3
42 Add a parameter to avresample_build_matrix() for Dolby/DPLII downmixing.45 Add a parameter to avresample_build_matrix() for Dolby/DPLII downmixing.
43 46
libavcodec/aacps_tablegen.h+1−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
23#ifndef AACPS_TABLEGEN_H23#ifndef AACPS_TABLEGEN_H
24#define AACPS_TABLEGEN_H24#define AACPS_TABLEGEN_H
25 25
26#include <math.h>
26#include <stdint.h>27#include <stdint.h>
27 28
28#if CONFIG_HARDCODED_TABLES29#if CONFIG_HARDCODED_TABLES
libavcodec/cos_tablegen.c+0−3
@@ -24,9 +24,6 @@ · 23 unmodified lines
24#include <string.h>24#include <string.h>
25#include <math.h>25#include <math.h>
26 26
27#ifndef M_PI
28#define M_PI 3.14159265358979323846
29#endif
30#define BITS 1627#define BITS 16
31#define FLOATFMT "%.18e"28#define FLOATFMT "%.18e"
32#define FIXEDFMT "%6d"29#define FIXEDFMT "%6d"
libavcodec/options_table.h+0−1
@@ -167,7 +167,6 @@ static const AVOption options[]={ · 166 unmodified lines
167{"block_align", NULL, OFFSET(block_align), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX},167{"block_align", NULL, OFFSET(block_align), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX},
168{"mpeg_quant", "use MPEG quantizers instead of H.263", OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},168{"mpeg_quant", "use MPEG quantizers instead of H.263", OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
169{"stats_out", NULL, OFFSET(stats_out), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX},169{"stats_out", NULL, OFFSET(stats_out), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX},
170{"stats_in", NULL, OFFSET(stats_in), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX},
171{"qsquish", "how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function)", OFFSET(rc_qsquish), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, 0, 99, V|E},170{"qsquish", "how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function)", OFFSET(rc_qsquish), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, 0, 99, V|E},
172{"rc_qmod_amp", "experimental quantizer modulation", OFFSET(rc_qmod_amp), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E},171{"rc_qmod_amp", "experimental quantizer modulation", OFFSET(rc_qmod_amp), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E},
173{"rc_qmod_freq", "experimental quantizer modulation", OFFSET(rc_qmod_freq), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},172{"rc_qmod_freq", "experimental quantizer modulation", OFFSET(rc_qmod_freq), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
libavcodec/sinewin_tablegen.c+0−3
@@ -26,9 +26,6 @@ · 25 unmodified lines
26#define SINETABLE(size) \26#define SINETABLE(size) \
27 float ff_sine_##size[size]27 float ff_sine_##size[size]
28#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))28#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
29#ifndef M_PI
30#define M_PI 3.14159265358979323846
31#endif
32#include "sinewin_tablegen.h"29#include "sinewin_tablegen.h"
33#include "tableprint.h"30#include "tableprint.h"
34 31
libavcodec/twinvq_data.h+1−1
@@ -135,7 +135,7 @@ static const uint16_t bark_tab_s44_128[] = { · 134 unmodified lines
135 *135 *
136 * without risking a segfault on malformed files.136 * without risking a segfault on malformed files.
137 */137 */
138static const struct {138static const struct twinvq_data {
139 float lsp08[504];139 float lsp08[504];
140 int16_t fcb08l[640];140 int16_t fcb08l[640];
141 int16_t fcb08m[320];141 int16_t fcb08m[320];
libavfilter/Makefile+2−1
@@ -47,6 +47,7 @@ OBJS-$(CONFIG_AVFORMAT) += lavfutils.o · 46 unmodified lines
47OBJS-$(CONFIG_SWSCALE) += lswsutils.o47OBJS-$(CONFIG_SWSCALE) += lswsutils.o
48 48
49OBJS-$(CONFIG_ACONVERT_FILTER) += af_aconvert.o49OBJS-$(CONFIG_ACONVERT_FILTER) += af_aconvert.o
50OBJS-$(CONFIG_AFIFO_FILTER) += fifo.o
50OBJS-$(CONFIG_AFORMAT_FILTER) += af_aformat.o51OBJS-$(CONFIG_AFORMAT_FILTER) += af_aformat.o
51OBJS-$(CONFIG_AMERGE_FILTER) += af_amerge.o52OBJS-$(CONFIG_AMERGE_FILTER) += af_amerge.o
52OBJS-$(CONFIG_AMIX_FILTER) += af_amix.o53OBJS-$(CONFIG_AMIX_FILTER) += af_amix.o
@@ -87,7 +88,7 @@ OBJS-$(CONFIG_DRAWBOX_FILTER) += vf_drawbox.o · 34 unmodified lines
87OBJS-$(CONFIG_DRAWTEXT_FILTER) += vf_drawtext.o88OBJS-$(CONFIG_DRAWTEXT_FILTER) += vf_drawtext.o
88OBJS-$(CONFIG_FADE_FILTER) += vf_fade.o89OBJS-$(CONFIG_FADE_FILTER) += vf_fade.o
89OBJS-$(CONFIG_FIELDORDER_FILTER) += vf_fieldorder.o90OBJS-$(CONFIG_FIELDORDER_FILTER) += vf_fieldorder.o
90OBJS-$(CONFIG_FIFO_FILTER) += vf_fifo.o91OBJS-$(CONFIG_FIFO_FILTER) += fifo.o
91OBJS-$(CONFIG_FORMAT_FILTER) += vf_format.o92OBJS-$(CONFIG_FORMAT_FILTER) += vf_format.o
92OBJS-$(CONFIG_FPS_FILTER) += vf_fps.o93OBJS-$(CONFIG_FPS_FILTER) += vf_fps.o
93OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o94OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o
libavfilter/allfilters.c+1−0
@@ -35,6 +35,7 @@ void avfilter_register_all(void) · 34 unmodified lines
35 initialized = 1;35 initialized = 1;
36 36
37 REGISTER_FILTER (ACONVERT, aconvert, af);37 REGISTER_FILTER (ACONVERT, aconvert, af);
38 REGISTER_FILTER (AFIFO, afifo, af);
38 REGISTER_FILTER (AFORMAT, aformat, af);39 REGISTER_FILTER (AFORMAT, aformat, af);
39 REGISTER_FILTER (AMERGE, amerge, af);40 REGISTER_FILTER (AMERGE, amerge, af);
40 REGISTER_FILTER (AMIX, amix, af);41 REGISTER_FILTER (AMIX, amix, af);
libavfilter/audio.c+10−8
@@ -181,6 +181,7 @@ void ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) · 180 unmodified lines
181 void (*filter_samples)(AVFilterLink *, AVFilterBufferRef *);181 void (*filter_samples)(AVFilterLink *, AVFilterBufferRef *);
182 AVFilterPad *dst = link->dstpad;182 AVFilterPad *dst = link->dstpad;
183 int64_t pts;183 int64_t pts;
184 AVFilterBufferRef *buf_out;
184 185
185 FF_TPRINTF_START(NULL, filter_samples); ff_tlog_link(NULL, link, 1);186 FF_TPRINTF_START(NULL, filter_samples); ff_tlog_link(NULL, link, 1);
186 187
@@ -194,22 +195,23 @@ void ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) · 7 unmodified lines
194 "Copying audio data in avfilter (have perms %x, need %x, reject %x)\n",195 "Copying audio data in avfilter (have perms %x, need %x, reject %x)\n",
195 samplesref->perms, link->dstpad->min_perms, link->dstpad->rej_perms);196 samplesref->perms, link->dstpad->min_perms, link->dstpad->rej_perms);
196 197
197 link->cur_buf = ff_default_get_audio_buffer(link, dst->min_perms,198 buf_out = ff_default_get_audio_buffer(link, dst->min_perms,
198 samplesref->audio->nb_samples);199 samplesref->audio->nb_samples);
199 link->cur_buf->pts = samplesref->pts;200 buf_out->pts = samplesref->pts;
200 link->cur_buf->audio->sample_rate = samplesref->audio->sample_rate;201 buf_out->audio->sample_rate = samplesref->audio->sample_rate;
201 202
202 /* Copy actual data into new samples buffer */203 /* Copy actual data into new samples buffer */
203 av_samples_copy(link->cur_buf->extended_data, samplesref->extended_data,204 av_samples_copy(buf_out->extended_data, samplesref->extended_data,
204 0, 0, samplesref->audio->nb_samples,205 0, 0, samplesref->audio->nb_samples,
205 av_get_channel_layout_nb_channels(link->channel_layout),206 av_get_channel_layout_nb_channels(link->channel_layout),
206 link->format);207 link->format);
207 208
208 avfilter_unref_buffer(samplesref);209 avfilter_unref_buffer(samplesref);
209 } else210 } else
210 link->cur_buf = samplesref;211 buf_out = samplesref;
211 212
212 pts = link->cur_buf->pts;213 link->cur_buf = buf_out;
213 filter_samples(link, link->cur_buf);214 pts = buf_out->pts;
215 filter_samples(link, buf_out);
214 ff_update_link_current_pts(link, pts);216 ff_update_link_current_pts(link, pts);
215}217}
libavfilter/fifo.crenamed from libavfilter/vf_fifo.c+52−21
@@ -20,21 +20,22 @@ · 19 unmodified lines
20 20
21/**21/**
22 * @file22 * @file
23 * FIFO buffering video filter23 * FIFO buffering filter
24 */24 */
25 25
26#include "audio.h"
26#include "avfilter.h"27#include "avfilter.h"
27#include "internal.h"28#include "internal.h"
28#include "video.h"29#include "video.h"
29 30
30typedef struct BufPic {31typedef struct Buf {
31 AVFilterBufferRef *picref;32 AVFilterBufferRef *buf;
32 struct BufPic *next;33 struct Buf *next;
33} BufPic;34} Buf;
34 35
35typedef struct {36typedef struct {
36 BufPic root;37 Buf root;
37 BufPic *last; ///< last buffered picture38 Buf *last; ///< last buffered frame
38} FifoContext;39} FifoContext;
39 40
40static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)41static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
@@ -49,22 +50,22 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) · 8 unmodified lines
49static av_cold void uninit(AVFilterContext *ctx)50static av_cold void uninit(AVFilterContext *ctx)
50{51{
51 FifoContext *fifo = ctx->priv;52 FifoContext *fifo = ctx->priv;
52 BufPic *pic, *tmp;53 Buf *buf, *tmp;
53 54
54 for (pic = fifo->root.next; pic; pic = tmp) {55 for (buf = fifo->root.next; buf; buf = tmp) {
55 tmp = pic->next;56 tmp = buf->next;
56 avfilter_unref_buffer(pic->picref);57 avfilter_unref_buffer(buf->buf);
57 av_free(pic);58 av_free(buf);
58 }59 }
59}60}
60 61
61static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)62static void add_to_queue(AVFilterLink *inlink, AVFilterBufferRef *buf)
62{63{
63 FifoContext *fifo = inlink->dst->priv;64 FifoContext *fifo = inlink->dst->priv;
64 65
65 fifo->last->next = av_mallocz(sizeof(BufPic));66 fifo->last->next = av_mallocz(sizeof(Buf));
66 fifo->last = fifo->last->next;67 fifo->last = fifo->last->next;
67 fifo->last->picref = picref;68 fifo->last->buf = buf;
68}69}
69 70
70static void end_frame(AVFilterLink *inlink) { }71static void end_frame(AVFilterLink *inlink) { }
@@ -74,19 +75,28 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) { } · 3 unmodified lines
74static int request_frame(AVFilterLink *outlink)75static int request_frame(AVFilterLink *outlink)
75{76{
76 FifoContext *fifo = outlink->src->priv;77 FifoContext *fifo = outlink->src->priv;
77 BufPic *tmp;78 Buf *tmp;
78 int ret;79 int ret;
79 80
80 if (!fifo->root.next) {81 if (!fifo->root.next) {
81 if ((ret = avfilter_request_frame(outlink->src->inputs[0])) < 0)82 if ((ret = ff_request_frame(outlink->src->inputs[0])) < 0)
82 return ret;83 return ret;
83 }84 }
84 85
85 /* by doing this, we give ownership of the reference to the next filter,86 /* by doing this, we give ownership of the reference to the next filter,
86 * so we don't have to worry about dereferencing it ourselves. */87 * so we don't have to worry about dereferencing it ourselves. */
87 ff_start_frame(outlink, fifo->root.next->picref);88 switch (outlink->type) {
88 ff_draw_slice (outlink, 0, outlink->h, 1);89 case AVMEDIA_TYPE_VIDEO:
89 ff_end_frame (outlink);90 ff_start_frame(outlink, fifo->root.next->buf);
91 ff_draw_slice (outlink, 0, outlink->h, 1);
92 ff_end_frame (outlink);
93 break;
94 case AVMEDIA_TYPE_AUDIO:
95 ff_filter_samples(outlink, fifo->root.next->buf);
96 break;
97 default:
98 return AVERROR(EINVAL);
99 }
90 100
91 if (fifo->last == fifo->root.next)101 if (fifo->last == fifo->root.next)
92 fifo->last = &fifo->root;102 fifo->last = &fifo->root;
@@ -109,7 +119,7 @@ AVFilter avfilter_vf_fifo = { · 16 unmodified lines
109 .inputs = (const AVFilterPad[]) {{ .name = "default",119 .inputs = (const AVFilterPad[]) {{ .name = "default",
110 .type = AVMEDIA_TYPE_VIDEO,120 .type = AVMEDIA_TYPE_VIDEO,
111 .get_video_buffer= ff_null_get_video_buffer,121 .get_video_buffer= ff_null_get_video_buffer,
112 .start_frame = start_frame,122 .start_frame = add_to_queue,
113 .draw_slice = draw_slice,123 .draw_slice = draw_slice,
114 .end_frame = end_frame,124 .end_frame = end_frame,
115 .rej_perms = AV_PERM_REUSE2, },125 .rej_perms = AV_PERM_REUSE2, },
@@ -119,3 +129,24 @@ AVFilter avfilter_vf_fifo = { · 3 unmodified lines
119 .request_frame = request_frame, },129 .request_frame = request_frame, },
120 { .name = NULL}},130 { .name = NULL}},
121};131};
132
133AVFilter avfilter_af_afifo = {
134 .name = "afifo",
135 .description = NULL_IF_CONFIG_SMALL("Buffer input frames and send them when they are requested."),
136
137 .init = init,
138 .uninit = uninit,
139
140 .priv_size = sizeof(FifoContext),
141
142 .inputs = (AVFilterPad[]) {{ .name = "default",
143 .type = AVMEDIA_TYPE_AUDIO,
144 .get_audio_buffer = ff_null_get_audio_buffer,
145 .filter_samples = add_to_queue,
146 .rej_perms = AV_PERM_REUSE2, },
147 { .name = NULL}},
148 .outputs = (AVFilterPad[]) {{ .name = "default",
149 .type = AVMEDIA_TYPE_AUDIO,
150 .request_frame = request_frame, },
151 { .name = NULL}},
152};
libavformat/cafdec.c+1−1
@@ -410,5 +410,5 @@ AVInputFormat ff_caf_demuxer = { · 409 unmodified lines
410 .read_header = read_header,410 .read_header = read_header,
411 .read_packet = read_packet,411 .read_packet = read_packet,
412 .read_seek = read_seek,412 .read_seek = read_seek,
413 .codec_tag = (const AVCodecTag*[]){ ff_codec_caf_tags, 0 },413 .codec_tag = (const AVCodecTag* const []){ ff_codec_caf_tags, 0 },
414};414};
libavformat/ivfdec.c+1−1
@@ -87,5 +87,5 @@ AVInputFormat ff_ivf_demuxer = { · 86 unmodified lines
87 .read_header = read_header,87 .read_header = read_header,
88 .read_packet = read_packet,88 .read_packet = read_packet,
89 .flags = AVFMT_GENERIC_INDEX,89 .flags = AVFMT_GENERIC_INDEX,
90 .codec_tag = (const AVCodecTag*[]){ ff_codec_bmp_tags, 0 },90 .codec_tag = (const AVCodecTag* const []){ ff_codec_bmp_tags, 0 },
91};91};
libavformat/version.h+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30#include "libavutil/avutil.h"30#include "libavutil/avutil.h"
31 31
32#define LIBAVFORMAT_VERSION_MAJOR 5432#define LIBAVFORMAT_VERSION_MAJOR 54
33#define LIBAVFORMAT_VERSION_MINOR 1033#define LIBAVFORMAT_VERSION_MINOR 11
34#define LIBAVFORMAT_VERSION_MICRO 10034#define LIBAVFORMAT_VERSION_MICRO 100
35 35
36#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \36#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
libavutil/avutil.h+1−1
@@ -153,7 +153,7 @@ · 152 unmodified lines
153 */153 */
154 154
155#define LIBAVUTIL_VERSION_MAJOR 51155#define LIBAVUTIL_VERSION_MAJOR 51
156#define LIBAVUTIL_VERSION_MINOR 59156#define LIBAVUTIL_VERSION_MINOR 60
157#define LIBAVUTIL_VERSION_MICRO 100157#define LIBAVUTIL_VERSION_MICRO 100
158 158
159#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \159#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t