summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-27 01:58:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-27 01:58:09 +0200
commitb536e2facfa0872adeb6aaae4189f9b90d907e36 (patch)
tree3649d9dd83aa7e0ed617ce3de4a1b7020ef89251
parent5916bc46581230c68c946c0b4733cce381eddcbd (diff)
parentc29c1a1b6bade2b9118c7fa01239c622c2238656 (diff)
downloadffmpeg-b536e2facfa0872adeb6aaae4189f9b90d907e36.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: avconv: add an assert to silence an uninitialized variable warning. avconv: shut up an uninitialized variable warning. avfiltergraph: shut up uninitialized variable warning. af_join: initialize a variable to shut up gcc warning. amix: fix format specifier for AVFilterLink.sample_rate. lavfi: make filters less verbose. mpc8: read APE tags. lavr: x86: fix ff_conv_fltp_to_flt_6ch function prototypes libm: provide fallback definition for cbrtf() using powf() network: Don't redefine error codes if they already exist in errno.h configure: Check for sys/time.h network: Include unistd.h from network.h avconv: don't include vsrc_buffer.h, which doesn't exist anymore lavfi: reorder AVFilterLink fields. lavfi: reorder AVFilterContext fields. lavfi: reorder AVFilter fields. lavfi: reorder AVFilterBufferRef fields. lavfi: reorder AVFilterBuffer fields. Conflicts: configure libavcodec/v210dec.h libavfilter/asrc_anullsrc.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_crop.c libavfilter/vf_drawbox.c libavfilter/vf_fade.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vsrc_color.c libavformat/network.h libavutil/libm.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure2
-rw-r--r--ffmpeg.c3
-rw-r--r--libavfilter/af_amix.c2
-rw-r--r--libavfilter/af_join.c3
-rw-r--r--libavfilter/asrc_anullsrc.c2
-rw-r--r--libavfilter/avfilter.c2
-rw-r--r--libavfilter/avfilter.h163
-rw-r--r--libavfilter/avfiltergraph.c4
-rw-r--r--libavfilter/fifo.c1
-rw-r--r--libavfilter/src_movie.c2
-rw-r--r--libavfilter/vf_aspect.c4
-rw-r--r--libavfilter/vf_blackframe.c2
-rw-r--r--libavfilter/vf_crop.c2
-rw-r--r--libavfilter/vf_cropdetect.c2
-rw-r--r--libavfilter/vf_drawbox.c2
-rw-r--r--libavfilter/vf_fade.c2
-rw-r--r--libavfilter/vf_fieldorder.c2
-rw-r--r--libavfilter/vf_frei0r.c18
-rw-r--r--libavfilter/vf_gradfun.c2
-rw-r--r--libavfilter/vf_hqdn3d.c2
-rw-r--r--libavfilter/vf_libopencv.c6
-rw-r--r--libavfilter/vf_overlay.c4
-rw-r--r--libavfilter/vf_pad.c2
-rw-r--r--libavfilter/vf_setpts.c2
-rw-r--r--libavfilter/vf_settb.c2
-rw-r--r--libavfilter/vf_transpose.c2
-rw-r--r--libavfilter/vf_unsharp.c2
-rw-r--r--libavfilter/vf_yadif.c2
-rw-r--r--libavfilter/vsrc_color.c2
-rw-r--r--libavformat/Makefile2
-rw-r--r--libavformat/mpc8.c7
-rw-r--r--libavformat/network.c8
-rw-r--r--libavformat/network.h19
-rw-r--r--libavformat/os_support.c2
-rw-r--r--libavformat/sctp.c1
-rw-r--r--libavformat/tcp.c1
-rw-r--r--libavformat/udp.c1
-rw-r--r--libavresample/x86/audio_convert_init.c9
-rw-r--r--libavutil/libm.h8
39 files changed, 169 insertions, 135 deletions
diff --git a/configure b/configure
index ee26a37f80..09abaf8538 100755
--- a/configure
+++ b/configure
@@ -1275,6 +1275,7 @@ HAVE_LIST="
sys_resource_h
sys_select_h
sys_soundcard_h
+ sys_time_h
sys_videoio_h
termios_h
threads
@@ -3187,6 +3188,7 @@ check_header sys/mman.h
check_header sys/param.h
check_header sys/resource.h
check_header sys/select.h
+check_header sys/time.h
check_header termios.h
check_header unistd.h
check_header vdpau/vdpau.h
diff --git a/ffmpeg.c b/ffmpeg.c
index 699147adce..f6ce70b8f2 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -760,6 +760,8 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
exit_program(1);
}
}
+ av_assert0(ist);
+
ist->discard = 0;
ist->decoding_needed = 1;
ist->st->discard = AVDISCARD_NONE;
@@ -4023,6 +4025,7 @@ static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFor
METADATA_CHECK_INDEX(index, context->nb_programs, "program")\
meta = &context->programs[index]->metadata;\
break;\
+ default: av_assert0(0);\
}\
SET_DICT(type_in, meta_in, ic, idx_in);
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index ce77692871..e70c6b6f08 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -255,7 +255,7 @@ static int config_output(AVFilterLink *outlink)
av_get_channel_layout_string(buf, sizeof(buf), -1, outlink->channel_layout);
av_log(ctx, AV_LOG_VERBOSE,
- "inputs:%d fmt:%s srate:%"PRId64" cl:%s\n", s->nb_inputs,
+ "inputs:%d fmt:%s srate:%d cl:%s\n", s->nb_inputs,
av_get_sample_fmt_name(outlink->format), outlink->sample_rate, buf);
return 0;
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index 89bc47fde1..e86c556f5b 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -419,7 +419,7 @@ static int join_request_frame(AVFilterLink *outlink)
JoinBufferPriv *priv;
int linesize = INT_MAX;
int perms = ~0;
- int nb_samples;
+ int nb_samples = 0;
int i, j, ret;
/* get a frame on each input */
@@ -448,6 +448,7 @@ static int join_request_frame(AVFilterLink *outlink)
perms &= cur_buf->perms;
}
+ av_assert0(nb_samples > 0);
buf = avfilter_get_audio_buffer_ref_from_arrays(s->data, linesize, perms,
nb_samples, outlink->format,
outlink->channel_layout);
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index 5d856e8a28..6541a394bd 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -91,7 +91,7 @@ static int config_props(AVFilterLink *outlink)
chans_nb = av_get_channel_layout_nb_channels(null->channel_layout);
av_get_channel_layout_string(buf, sizeof(buf), chans_nb, null->channel_layout);
- av_log(outlink->src, AV_LOG_INFO,
+ av_log(outlink->src, AV_LOG_VERBOSE,
"sample_rate:%d channel_layout:'%s' nb_samples:%d\n",
null->sample_rate, buf, null->nb_samples);
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index ae702df111..0474192b1a 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -163,7 +163,7 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
int ret;
unsigned dstpad_idx = link->dstpad - link->dst->input_pads;
- av_log(link->dst, AV_LOG_INFO, "auto-inserting filter '%s' "
+ av_log(link->dst, AV_LOG_VERBOSE, "auto-inserting filter '%s' "
"between the filter '%s' and the filter '%s'\n",
filt->name, link->src->name, link->dst->name);
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 14f51b92a3..b679635805 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -60,22 +60,6 @@ typedef struct AVFilterFormats AVFilterFormats;
*/
typedef struct AVFilterBuffer {
uint8_t *data[8]; ///< buffer data for each plane/channel
- int linesize[8]; ///< number of bytes per line
-
- unsigned refcount; ///< number of references to this buffer
-
- /** private data to be used by a custom free function */
- void *priv;
- /**
- * A pointer to the function to deallocate this buffer if the default
- * function is not sufficient. This could, for example, add the memory
- * back into a memory pool to be reused later without the overhead of
- * reallocating it from scratch.
- */
- void (*free)(struct AVFilterBuffer *buf);
-
- int format; ///< media format
- int w, h; ///< width and height of the allocated buffer
/**
* pointers to the data planes/channels.
@@ -92,6 +76,21 @@ typedef struct AVFilterBuffer {
* in order to access all channels.
*/
uint8_t **extended_data;
+ int linesize[8]; ///< number of bytes per line
+
+ /** private data to be used by a custom free function */
+ void *priv;
+ /**
+ * A pointer to the function to deallocate this buffer if the default
+ * function is not sufficient. This could, for example, add the memory
+ * back into a memory pool to be reused later without the overhead of
+ * reallocating it from scratch.
+ */
+ void (*free)(struct AVFilterBuffer *buf);
+
+ int format; ///< media format
+ int w, h; ///< width and height of the allocated buffer
+ unsigned refcount; ///< number of references to this buffer
} AVFilterBuffer;
#define AV_PERM_READ 0x01 ///< can read from the buffer
@@ -141,23 +140,6 @@ typedef struct AVFilterBufferRefVideoProps {
typedef struct AVFilterBufferRef {
AVFilterBuffer *buf; ///< the buffer that this is a reference to
uint8_t *data[8]; ///< picture/audio data for each plane
- int linesize[8]; ///< number of bytes per line
- int format; ///< media format
-
- /**
- * presentation timestamp. The time unit may change during
- * filtering, as it is specified in the link and the filter code
- * may need to rescale the PTS accordingly.
- */
- int64_t pts;
- int64_t pos; ///< byte position in stream, -1 if unknown
-
- int perms; ///< permissions, see the AV_PERM_* flags
-
- enum AVMediaType type; ///< media type of buffer data
- AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
- AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
-
/**
* pointers to the data planes/channels.
*
@@ -173,6 +155,24 @@ typedef struct AVFilterBufferRef {
* in order to access all channels.
*/
uint8_t **extended_data;
+ int linesize[8]; ///< number of bytes per line
+
+ AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
+ AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
+
+ /**
+ * presentation timestamp. The time unit may change during
+ * filtering, as it is specified in the link and the filter code
+ * may need to rescale the PTS accordingly.
+ */
+ int64_t pts;
+ int64_t pos; ///< byte position in stream, -1 if unknown
+
+ int format; ///< media format
+
+ int perms; ///< permissions, see the AV_PERM_* flags
+
+ enum AVMediaType type; ///< media type of buffer data
} AVFilterBufferRef;
/**
@@ -388,7 +388,22 @@ void avfilter_default_end_frame(AVFilterLink *link);
typedef struct AVFilter {
const char *name; ///< filter name
- int priv_size; ///< size of private data to allocate for the filter
+ /**
+ * A description for the filter. You should use the
+ * NULL_IF_CONFIG_SMALL() macro to define it.
+ */
+ const char *description;
+
+ const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none
+ const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none
+
+ /*****************************************************************
+ * All fields below this line are not part of the public API. They
+ * may not be used outside of libavfilter and can be changed and
+ * removed at will.
+ * New public fields should be added right above.
+ *****************************************************************
+ */
/**
* Filter initialization function. Args contains the user-supplied
@@ -413,14 +428,7 @@ typedef struct AVFilter {
*/
int (*query_formats)(AVFilterContext *);
- const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none
- const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none
-
- /**
- * A description for the filter. You should use the
- * NULL_IF_CONFIG_SMALL() macro to define it.
- */
- const char *description;
+ int priv_size; ///< size of private data to allocate for the filter
/**
* Make the filter instance process a command.
@@ -445,23 +453,22 @@ struct AVFilterContext {
char *name; ///< name of this filter instance
+ AVFilterPad *input_pads; ///< array of input pads
+ AVFilterLink **inputs; ///< array of pointers to input links
#if FF_API_FOO_COUNT
unsigned input_count; ///< @deprecated use nb_inputs
#endif
- AVFilterPad *input_pads; ///< array of input pads
- AVFilterLink **inputs; ///< array of pointers to input links
+ unsigned nb_inputs; ///< number of input pads
+ AVFilterPad *output_pads; ///< array of output pads
+ AVFilterLink **outputs; ///< array of pointers to output links
#if FF_API_FOO_COUNT
unsigned output_count; ///< @deprecated use nb_outputs
#endif
- AVFilterPad *output_pads; ///< array of output pads
- AVFilterLink **outputs; ///< array of pointers to output links
+ unsigned nb_outputs; ///< number of output pads
void *priv; ///< private data for use by the filter
- unsigned nb_inputs; ///< number of input pads
- unsigned nb_outputs; ///< number of output pads
-
struct AVFilterCommand *command_queue;
};
@@ -479,13 +486,6 @@ struct AVFilterLink {
AVFilterContext *dst; ///< dest filter
AVFilterPad *dstpad; ///< input pad on the dest filter
- /** stage of the initialization of the link properties (dimensions, etc) */
- enum {
- AVLINK_UNINIT = 0, ///< not started
- AVLINK_STARTINIT, ///< started, but incomplete
- AVLINK_INIT ///< complete
- } init_state;
-
enum AVMediaType type; ///< filter media type
/* These parameters apply only to video */
@@ -499,28 +499,6 @@ struct AVFilterLink {
int format; ///< agreed upon media format
/**
- * Lists of formats and channel layouts supported by the input and output
- * filters respectively. These lists are used for negotiating the format
- * to actually be used, which will be loaded into the format and
- * channel_layout members, above, when chosen.
- *
- */
- AVFilterFormats *in_formats;
- AVFilterFormats *out_formats;
-
- /**
- * The buffer reference currently being sent across the link by the source
- * filter. This is used internally by the filter system to allow
- * automatic copying of buffers which do not have sufficient permissions
- * for the destination. This should not be accessed directly by the
- * filters.
- */
- AVFilterBufferRef *src_buf;
-
- AVFilterBufferRef *cur_buf;
- AVFilterBufferRef *out_buf;
-
- /**
* Define the time base used by the PTS of the frames/samples
* which will pass through this link.
* During the configuration stage, each filter is supposed to
@@ -537,6 +515,16 @@ struct AVFilterLink {
*****************************************************************
*/
/**
+ * Lists of formats and channel layouts supported by the input and output
+ * filters respectively. These lists are used for negotiating the format
+ * to actually be used, which will be loaded into the format and
+ * channel_layout members, above, when chosen.
+ *
+ */
+ AVFilterFormats *in_formats;
+ AVFilterFormats *out_formats;
+
+ /**
* Lists of channel layouts and sample rates used for automatic
* negotiation.
*/
@@ -554,6 +542,25 @@ struct AVFilterLink {
*/
int request_samples;
+ /** stage of the initialization of the link properties (dimensions, etc) */
+ enum {
+ AVLINK_UNINIT = 0, ///< not started
+ AVLINK_STARTINIT, ///< started, but incomplete
+ AVLINK_INIT ///< complete
+ } init_state;
+
+ /**
+ * The buffer reference currently being sent across the link by the source
+ * filter. This is used internally by the filter system to allow
+ * automatic copying of buffers which do not have sufficient permissions
+ * for the destination. This should not be accessed directly by the
+ * filters.
+ */
+ AVFilterBufferRef *src_buf;
+
+ AVFilterBufferRef *cur_buf;
+ AVFilterBufferRef *out_buf;
+
struct AVFilterPool *pool;
/**
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index bf58372490..12d5337f48 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -33,6 +33,7 @@
#include "internal.h"
#include "libavutil/audioconvert.h"
+#include "libavutil/avassert.h"
#include "libavutil/log.h"
static const AVClass filtergraph_class = {
@@ -648,7 +649,7 @@ static void swap_sample_fmts_on_filter(AVFilterContext *filter)
for (i = 0; i < filter->nb_outputs; i++) {
AVFilterLink *outlink = filter->outputs[i];
- int best_idx, best_score = INT_MIN;
+ int best_idx = -1, best_score = INT_MIN;
if (outlink->type != AVMEDIA_TYPE_AUDIO ||
outlink->in_formats->format_count < 2)
@@ -681,6 +682,7 @@ static void swap_sample_fmts_on_filter(AVFilterContext *filter)
best_idx = j;
}
}
+ av_assert0(best_idx >= 0);
FFSWAP(int, outlink->in_formats->formats[0],
outlink->in_formats->formats[best_idx]);
}
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
index 1361881fbc..bc9c8fa580 100644
--- a/libavfilter/fifo.c
+++ b/libavfilter/fifo.c
@@ -55,7 +55,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
FifoContext *fifo = ctx->priv;
fifo->last = &fifo->root;
- av_log(ctx, AV_LOG_INFO, "\n");
return 0;
}
diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c
index c91b8345d6..b0c9b086da 100644
--- a/libavfilter/src_movie.c
+++ b/libavfilter/src_movie.c
@@ -167,7 +167,7 @@ static av_cold int movie_common_init(AVFilterContext *ctx, const char *args,
return ret;
}
- av_log(ctx, AV_LOG_INFO, "seek_point:%"PRIi64" format_name:%s file_name:%s stream_index:%d\n",
+ av_log(ctx, AV_LOG_VERBOSE, "seek_point:%"PRIi64" format_name:%s file_name:%s stream_index:%d\n",
movie->seek_point, movie->format_name, movie->file_name,
movie->stream_index);
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index eeaa8870ef..76bc490356 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -47,7 +47,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
}
}
- av_log(ctx, AV_LOG_INFO, "a:%d/%d\n", aspect->ratio.num, aspect->ratio.den);
+ av_log(ctx, AV_LOG_VERBOSE, "a:%d/%d\n", aspect->ratio.num, aspect->ratio.den);
return 0;
}
@@ -69,7 +69,7 @@ static int setdar_config_props(AVFilterLink *inlink)
aspect->ratio.num * inlink->h,
aspect->ratio.den * inlink->w, 100);
- av_log(inlink->dst, AV_LOG_INFO, "w:%d h:%d -> dar:%d/%d sar:%d/%d\n",
+ av_log(inlink->dst, AV_LOG_VERBOSE, "w:%d h:%d -> dar:%d/%d sar:%d/%d\n",
inlink->w, inlink->h, dar.num, dar.den, aspect->ratio.num, aspect->ratio.den);
inlink->sample_aspect_ratio = aspect->ratio;
diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c
index dbdbffb3f9..e41f1f4d8c 100644
--- a/libavfilter/vf_blackframe.c
+++ b/libavfilter/vf_blackframe.c
@@ -66,7 +66,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
if (args)
sscanf(args, "%u:%u", &blackframe->bamount, &blackframe->bthresh);
- av_log(ctx, AV_LOG_INFO, "bamount:%u bthresh:%u\n",
+ av_log(ctx, AV_LOG_VERBOSE, "bamount:%u bthresh:%u\n",
blackframe->bamount, blackframe->bthresh);
if (blackframe->bamount > 100 || blackframe->bthresh > 255) {
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 3b7f0732f3..915806bdaa 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -224,7 +224,7 @@ static int config_input(AVFilterLink *link)
} else
crop->out_sar = link->sample_aspect_ratio;
- av_log(ctx, AV_LOG_INFO, "w:%d h:%d sar:%d/%d -> w:%d h:%d sar:%d/%d\n",
+ av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d sar:%d/%d -> w:%d h:%d sar:%d/%d\n",
link->w, link->h, link->sample_aspect_ratio.num, link->sample_aspect_ratio.den,
crop->w, crop->h, crop->out_sar.num, crop->out_sar.den);
diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c
index 9f303b92fb..8ffbe70949 100644
--- a/libavfilter/vf_cropdetect.c
+++ b/libavfilter/vf_cropdetect.c
@@ -92,7 +92,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
if (args)
sscanf(args, "%d:%d:%d", &cd->limit, &cd->round, &cd->reset_count);
- av_log(ctx, AV_LOG_INFO, "limit:%d round:%d reset_count:%d\n",
+ av_log(ctx, AV_LOG_VERBOSE, "limit:%d round:%d reset_count:%d\n",
cd->limit, cd->round, cd->reset_count);
return 0;
diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c
index 20689033f7..c823b145aa 100644
--- a/libavfilter/vf_drawbox.c
+++ b/libavfilter/vf_drawbox.c
@@ -87,7 +87,7 @@ static int config_input(AVFilterLink *inlink)
if (drawbox->w == 0) drawbox->w = inlink->w;
if (drawbox->h == 0) drawbox->h = inlink->h;
- av_log(inlink->dst, AV_LOG_INFO, "x:%d y:%d w:%d h:%d color:0x%02X%02X%02X%02X\n",
+ av_log(inlink->dst, AV_LOG_VERBOSE, "x:%d y:%d w:%d h:%d color:0x%02X%02X%02X%02X\n",
drawbox->x, drawbox->y, drawbox->w, drawbox->h,
drawbox->yuv_color[Y], drawbox->yuv_color[U], drawbox->yuv_color[V], drawbox->yuv_color[A]);
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index bbf58f223e..0103ca290f 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -126,7 +126,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
}
fade->stop_frame = fade->start_frame + fade->nb_frames;
- av_log(ctx, AV_LOG_INFO,
+ av_log(ctx, AV_LOG_VERBOSE,
"type:%s start_frame:%d nb_frames:%d alpha:%d\n",
fade->type, fade->start_frame, fade->nb_frames, fade->alpha);
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index 3bc7e89726..4f657358d4 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -58,7 +58,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
return AVERROR(EINVAL);
}
- av_log(ctx, AV_LOG_INFO, "output field order: %s\n",
+ av_log(ctx, AV_LOG_VERBOSE, "output field order: %s\n",
fieldorder->dst_tff ? tff : bff);
return 0;
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index a5501270fa..99594551f8 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -146,7 +146,7 @@ static int set_params(AVFilterContext *ctx, const char *params)
return ret;
}
- av_log(ctx, AV_LOG_INFO,
+ av_log(ctx, AV_LOG_VERBOSE,
"idx:%d name:'%s' type:%s explanation:'%s' ",
i, info.name,
info.type == F0R_PARAM_BOOL ? "bool" :
@@ -157,7 +157,7 @@ static int set_params(AVFilterContext *ctx, const char *params)
info.explanation);
#ifdef DEBUG
- av_log(ctx, AV_LOG_INFO, "value:");
+ av_log(ctx, AV_LOG_DEBUG, "value:");
switch (info.type) {
void *v;
double d;
@@ -168,31 +168,31 @@ static int set_params(AVFilterContext *ctx, const char *params)
case F0R_PARAM_BOOL:
v = &d;
frei0r->get_param_value(frei0r->instance, v, i);
- av_log(ctx, AV_LOG_INFO, "%s", d >= 0.5 && d <= 1.0 ? "y" : "n");
+ av_log(ctx, AV_LOG_DEBUG, "%s", d >= 0.5 && d <= 1.0 ? "y" : "n");
break;
case F0R_PARAM_DOUBLE:
v = &d;
frei0r->get_param_value(frei0r->instance, v, i);
- av_log(ctx, AV_LOG_INFO, "%f", d);
+ av_log(ctx, AV_LOG_DEBUG, "%f", d);
break;
case F0R_PARAM_COLOR:
v = &col;
frei0r->get_param_value(frei0r->instance, v, i);
- av_log(ctx, AV_LOG_INFO, "%f/%f/%f", col.r, col.g, col.b);
+ av_log(ctx, AV_LOG_DEBUG, "%f/%f/%f", col.r, col.g, col.b);
break;
case F0R_PARAM_POSITION:
v = &pos;
frei0r->get_param_value(frei0r->instance, v, i);
- av_log(ctx, AV_LOG_INFO, "%lf/%lf", pos.x, pos.y);
+ av_log(ctx, AV_LOG_DEBUG, "%lf/%lf", pos.x, pos.y);
break;
default: /* F0R_PARAM_STRING */
v = s;
frei0r->get_param_value(frei0r->instance, v, i);
- av_log(ctx, AV_LOG_INFO, "'%s'\n", s);
+ av_log(ctx, AV_LOG_DEBUG, "'%s'\n", s);
break;
}
#endif
- av_log(ctx, AV_LOG_INFO, "\n");
+ av_log(ctx, AV_LOG_VERBOSE, "\n");
}
return 0;
@@ -266,7 +266,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx,
return AVERROR(EINVAL);
}
- av_log(ctx, AV_LOG_INFO,
+ av_log(ctx, AV_LOG_VERBOSE,
"name:%s author:'%s' explanation:'%s' color_model:%s "
"frei0r_version:%d version:%d.%d num_params:%d\n",
pi->name, pi->author, pi->explanation,
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index 12e55738bd..2ce9c6a3fd 100644
--- a/libavfilter/vf_gradfun.c
+++ b/libavfilter/vf_gradfun.c
@@ -142,7 +142,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2)
gf->blur_line = ff_gradfun_blur_line_sse2;
- av_log(ctx, AV_LOG_INFO, "threshold:%.2f radius:%d\n", thresh, gf->radius);
+ av_log(ctx, AV_LOG_VERBOSE, "threshold:%.2f radius:%d\n", thresh, gf->radius);
return 0;
}
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
index 54950286e0..62e197dea7 100644
--- a/libavfilter/vf_hqdn3d.c
+++ b/libavfilter/vf_hqdn3d.c
@@ -238,7 +238,7 @@ static int init(AVFilterContext *ctx, const char *args)
}
}
- av_log(ctx, AV_LOG_INFO, "ls:%lf cs:%lf lt:%lf ct:%lf\n",
+ av_log(ctx, AV_LOG_VERBOSE, "ls:%lf cs:%lf lt:%lf ct:%lf\n",
LumSpac, ChromSpac, LumTmp, ChromTmp);
if (LumSpac < 0 || ChromSpac < 0 || isnan(ChromTmp)) {
av_log(ctx, AV_LOG_ERROR,
diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index 6dda3c7680..3c6f645431 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -121,7 +121,7 @@ static av_cold int smooth_init(AVFilterContext *ctx, const char *args)
return AVERROR(EINVAL);
}
- av_log(ctx, AV_LOG_INFO, "type:%s param1:%d param2:%d param3:%f param4:%f\n",
+ av_log(ctx, AV_LOG_VERBOSE, "type:%s param1:%d param2:%d param3:%f param4:%f\n",
type_str, smooth->param1, smooth->param2, smooth->param3, smooth->param4);
return 0;
}
@@ -239,7 +239,7 @@ static int parse_iplconvkernel(IplConvKernel **kernel, char *buf, void *log_ctx)
if (!*kernel)
return AVERROR(ENOMEM);
- av_log(log_ctx, AV_LOG_INFO, "Structuring element: w:%d h:%d x:%d y:%d shape:%s\n",
+ av_log(log_ctx, AV_LOG_VERBOSE, "Structuring element: w:%d h:%d x:%d y:%d shape:%s\n",
rows, cols, anchor_x, anchor_y, shape_str);
return 0;
}
@@ -269,7 +269,7 @@ static av_cold int dilate_init(AVFilterContext *ctx, const char *args)
av_free(kernel_str);
sscanf(buf, ":%d", &dilate->nb_iterations);
- av_log(ctx, AV_LOG_INFO, "iterations_nb:%d\n", dilate->nb_iterations);
+ av_log(ctx, AV_LOG_VERBOSE, "iterations_nb:%d\n", dilate->nb_iterations);
if (dilate->nb_iterations <= 0) {
av_log(ctx, AV_LOG_ERROR, "Invalid non-positive value '%d' for nb_iterations\n",
dilate->nb_iterations);
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index dc4e00d785..a3a9cc275c 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -245,7 +245,7 @@ static int config_input_overlay(AVFilterLink *inlink)
ff_fill_rgba_map(over->overlay_rgba_map, inlink->format) >= 0;
over->overlay_has_alpha = ff_fmt_is_in(inlink->format, alpha_pix_fmts);
- av_log(ctx, AV_LOG_INFO,
+ av_log(ctx, AV_LOG_VERBOSE,
"main w:%d h:%d fmt:%s overlay x:%d y:%d w:%d h:%d fmt:%s\n",
ctx->inputs[MAIN]->w, ctx->inputs[MAIN]->h,
av_pix_fmt_descriptors[ctx->inputs[MAIN]->format].name,
@@ -284,7 +284,7 @@ static int config_output(AVFilterLink *outlink)
av_gcd((int64_t)tb1.num * tb2.den,
(int64_t)tb2.num * tb1.den),
(int64_t)tb1.den * tb2.den, INT_MAX);
- av_log(ctx, AV_LOG_INFO,
+ av_log(ctx, AV_LOG_VERBOSE,
"main_tb:%d/%d overlay_tb:%d/%d -> tb:%d/%d exact:%d\n",
tb1.num, tb1.den, tb2.num, tb2.den, tb->num, tb->den, exact);
if (!exact)
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index 13618f26ef..aeff4241d0 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -184,7 +184,7 @@ static int config_input(AVFilterLink *inlink)
pad->in_w = ff_draw_round_to_sub(&pad->draw, 0, -1, inlink->w);
pad->in_h = ff_draw_round_to_sub(&pad->draw, 1, -1, inlink->h);
- av_log(ctx, AV_LOG_INFO, "w:%d h:%d -> w:%d h:%d x:%d y:%d color:0x%02X%02X%02X%02X\n",
+ av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d -> w:%d h:%d x:%d y:%d color:0x%02X%02X%02X%02X\n",
inlink->w, inlink->h, pad->w, pad->h, pad->x, pad->y,
pad->rgba_color[0], pad->rgba_color[1], pad->rgba_color[2], pad->rgba_color[3]);
diff --git a/libavfilter/vf_setpts.c b/libavfilter/vf_setpts.c
index 7739356566..3fdbd96a32 100644
--- a/libavfilter/vf_setpts.c
+++ b/libavfilter/vf_setpts.c
@@ -85,7 +85,7 @@ static int config_input(AVFilterLink *inlink)
setpts->var_values[VAR_TB] = av_q2d(inlink->time_base);
- av_log(inlink->src, AV_LOG_INFO, "TB:%f\n", setpts->var_values[VAR_TB]);
+ av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f\n", setpts->var_values[VAR_TB]);
return 0;
}
diff --git a/libavfilter/vf_settb.c b/libavfilter/vf_settb.c
index d61a042711..b6e951ba1f 100644
--- a/libavfilter/vf_settb.c
+++ b/libavfilter/vf_settb.c
@@ -88,7 +88,7 @@ static int config_output_props(AVFilterLink *outlink)
}
outlink->time_base = time_base;
- av_log(outlink->src, AV_LOG_INFO, "tb:%d/%d -> tb:%d/%d\n",
+ av_log(outlink->src, AV_LOG_VERBOSE, "tb:%d/%d -> tb:%d/%d\n",
inlink ->time_base.num, inlink ->time_base.den,
outlink->time_base.num, outlink->time_base.den);
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index 0eb2958395..bd3d038cec 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -107,7 +107,7 @@ static int config_props_output(AVFilterLink *outlink)
} else
outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
- av_log(ctx, AV_LOG_INFO, "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n",
+ av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n",
inlink->w, inlink->h, trans->dir, outlink->w, outlink->h,
trans->dir == 1 || trans->dir == 3 ? "clockwise" : "counterclockwise",
trans->dir == 0 || trans->dir == 3);
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index dfd5c09966..4feea8f12f 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -177,7 +177,7 @@ static void init_filter_param(AVFilterContext *ctx, FilterParam *fp, const char
effect = fp->amount == 0 ? "none" : fp->amount < 0 ? "blur" : "sharpen";
- av_log(ctx, AV_LOG_INFO, "effect:%s type:%s msize_x:%d msize_y:%d amount:%0.2f\n",
+ av_log(ctx, AV_LOG_VERBOSE, "effect:%s type:%s msize_x:%d msize_y:%d amount:%0.2f\n",
effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 65535.0);
for (z = 0; z < 2 * fp->steps_y; z++)
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 582effd3d2..41bf153081 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -417,7 +417,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX)
yadif->filter_line = ff_yadif_filter_line_mmx;
- av_log(ctx, AV_LOG_INFO, "mode:%d parity:%d auto_enable:%d\n", yadif->mode, yadif->parity, yadif->auto_enable);
+ av_log(ctx, AV_LOG_VERBOSE, "mode:%d parity:%d auto_enable:%d\n", yadif->mode, yadif->parity, yadif->auto_enable);
return 0;
}
diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c
index 3d0a7764f8..e9f7424a73 100644
--- a/libavfilter/vsrc_color.c
+++ b/libavfilter/vsrc_color.c
@@ -135,7 +135,7 @@ static int color_config_props(AVFilterLink *inlink)
if (av_image_check_size(color->w, color->h, 0, ctx) < 0)
return AVERROR(EINVAL);
- av_log(ctx, AV_LOG_INFO, "w:%d h:%d r:%d/%d color:0x%02x%02x%02x%02x\n",
+ av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d r:%d/%d color:0x%02x%02x%02x%02x\n",
color->w, color->h, color->time_base.den, color->time_base.num,
color->color_rgba[0], color->color_rgba[1], color->color_rgba[2], color->color_rgba[3]);
inlink->w = color->w;
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 9032654ae5..18be808d6f 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -169,7 +169,7 @@ OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o id3v2enc.o
OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o
OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o
OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o
-OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o
+OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o apetag.o
OBJS-$(CONFIG_MPEG1SYSTEM_MUXER) += mpegenc.o
OBJS-$(CONFIG_MPEG1VCD_MUXER) += mpegenc.o
OBJS-$(CONFIG_MPEG2DVD_MUXER) += mpegenc.o
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index c8eaddc757..026115481d 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -21,6 +21,7 @@
#include "libavcodec/get_bits.h"
#include "libavcodec/unary.h"
+#include "apetag.h"
#include "avformat.h"
#include "internal.h"
#include "avio_internal.h"
@@ -242,6 +243,12 @@ static int mpc8_read_header(AVFormatContext *s)
if (size > 0)
avio_skip(pb, size);
+ if (pb->seekable) {
+ int64_t pos = avio_tell(s->pb);
+ ff_ape_parse_tag(s);
+ avio_seek(s->pb, pos, SEEK_SET);
+ }
+
return 0;
}
diff --git a/libavformat/network.c b/libavformat/network.c
index 727ca5024f..6b4cb570b3 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -165,6 +165,14 @@ int ff_neterrno(void)
return AVERROR(EAGAIN);
case WSAEINTR:
return AVERROR(EINTR);
+ case WSAEPROTONOSUPPORT:
+ return AVERROR(EPROTONOSUPPORT);
+ case WSAETIMEDOUT:
+ return AVERROR(ETIMEDOUT);
+ case WSAECONNREFUSED:
+ return AVERROR(ECONNREFUSED);
+ case WSAEINPROGRESS:
+ return AVERROR(EINPROGRESS);
}
return -err;
}
diff --git a/libavformat/network.h b/libavformat/network.h
index d890e7c060..33cd517b51 100644
--- a/libavformat/network.h
+++ b/libavformat/network.h
@@ -27,26 +27,27 @@
#include "libavutil/error.h"
#include "os_support.h"
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#if HAVE_WINSOCK2_H
#include <winsock2.h>
#include <ws2tcpip.h>
-#ifdef EPROTONOSUPPORT
-# undef EPROTONOSUPPORT
-#endif
+#ifndef EPROTONOSUPPORT
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
-#ifdef ETIMEDOUT
-# undef ETIMEDOUT
#endif
+#ifndef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
-#ifdef ECONNREFUSED
-# undef ECONNREFUSED
#endif
+#ifndef ECONNREFUSED
#define ECONNREFUSED WSAECONNREFUSED
-#ifdef EINPROGRESS
-# undef EINPROGRESS
#endif
+#ifndef EINPROGRESS
#define EINPROGRESS WSAEINPROGRESS
+#endif
+
#define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e)
#define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e)
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index e18704428b..fd3836d574 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -59,7 +59,9 @@ int ff_win32_open(const char *filename_utf8, int oflag, int pmode)
#if CONFIG_NETWORK
#include <fcntl.h>
#if !HAVE_POLL_H
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
#if HAVE_WINSOCK2_H
#include <winsock2.h>
#elif HAVE_SYS_SELECT_H
diff --git a/libavformat/sctp.c b/libavformat/sctp.c
index 07de4986d2..7bcb5ae0a9 100644
--- a/libavformat/sctp.c
+++ b/libavformat/sctp.c
@@ -39,7 +39,6 @@
#include <netinet/in.h>
#include <netinet/sctp.h>
-#include <unistd.h>
#include "config.h"
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index c42c1edbf3..2fb6a8a584 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -20,7 +20,6 @@
*/
#include "avformat.h"
#include "libavutil/parseutils.h"
-#include <unistd.h>
#include "internal.h"
#include "network.h"
#include "os_support.h"
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 9ed8f95f73..e8493b5df2 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -32,7 +32,6 @@
#include "libavutil/fifo.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avstring.h"
-#include <unistd.h>
#include "internal.h"
#include "network.h"
#include "os_support.h"
diff --git a/libavresample/x86/audio_convert_init.c b/libavresample/x86/audio_convert_init.c
index 637fd2fb14..2de49709c2 100644
--- a/libavresample/x86/audio_convert_init.c
+++ b/libavresample/x86/audio_convert_init.c
@@ -38,9 +38,12 @@ extern void ff_conv_flt_to_s16_sse2(int16_t *dst, const float *src, int len);
extern void ff_conv_flt_to_s32_sse2(int32_t *dst, const float *src, int len);
extern void ff_conv_flt_to_s32_avx (int32_t *dst, const float *src, int len);
-extern void ff_conv_fltp_to_flt_6ch_mmx (float *dst, float *const *src, int len);
-extern void ff_conv_fltp_to_flt_6ch_sse4(float *dst, float *const *src, int len);
-extern void ff_conv_fltp_to_flt_6ch_avx (float *dst, float *const *src, int len);
+extern void ff_conv_fltp_to_flt_6ch_mmx (float *dst, float *const *src, int len,
+ int channels);
+extern void ff_conv_fltp_to_flt_6ch_sse4(float *dst, float *const *src, int len,
+ int channels);
+extern void ff_conv_fltp_to_flt_6ch_avx (float *dst, float *const *src, int len,
+ int channels);
av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
{
diff --git a/libavutil/libm.h b/libavutil/libm.h
index 57eb0c0d6e..ef90df0384 100644
--- a/libavutil/libm.h
+++ b/libavutil/libm.h
@@ -33,9 +33,11 @@
#endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM*/
#if !HAVE_CBRTF
-#undef cbrtf
-#define cbrtf(x) powf(x, 1.0/3.0)
-#endif /* HAVE_CBRTF */
+static av_always_inline float cbrtf(float x)
+{
+ return x < 0 ? -powf(-x, 1.0 / 3.0) : powf(x, 1.0 / 3.0);
+}
+#endif
#if !HAVE_EXP2
#undef exp2