History

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

Michael Niedermayer committed 14 years ago

Commit b536e2f2 parents 5916bc4 c29c1a139 files · +169 −135Browse files

Unified · Split

39 files
  1. configure +2 −0
  2. ffmpeg.c +3 −0
  3. libavfilter/af_amix.c +1 −1
  4. libavfilter/af_join.c +2 −1
  5. libavfilter/asrc_anullsrc.c +1 −1
  6. libavfilter/avfilter.c +1 −1
  7. libavfilter/avfilter.h +85 −78
  8. libavfilter/avfiltergraph.c +3 −1
  9. libavfilter/fifo.c +0 −1
  10. libavfilter/src_movie.c +1 −1
  11. libavfilter/vf_aspect.c +2 −2
  12. libavfilter/vf_blackframe.c +1 −1
  13. libavfilter/vf_crop.c +1 −1
  14. libavfilter/vf_cropdetect.c +1 −1
  15. libavfilter/vf_drawbox.c +1 −1
  16. libavfilter/vf_fade.c +1 −1
  17. libavfilter/vf_fieldorder.c +1 −1
  18. libavfilter/vf_frei0r.c +9 −9
  19. libavfilter/vf_gradfun.c +1 −1
  20. libavfilter/vf_hqdn3d.c +1 −1
  21. libavfilter/vf_libopencv.c +3 −3
  22. libavfilter/vf_overlay.c +2 −2
  23. libavfilter/vf_pad.c +1 −1
  24. libavfilter/vf_setpts.c +1 −1
  25. libavfilter/vf_settb.c +1 −1
  26. libavfilter/vf_transpose.c +1 −1
  27. libavfilter/vf_unsharp.c +1 −1
  28. libavfilter/vf_yadif.c +1 −1
  29. libavfilter/vsrc_color.c +1 −1
  30. libavformat/Makefile +1 −1
  31. libavformat/mpc8.c +7 −0
  32. libavformat/network.c +8 −0
  33. libavformat/network.h +10 −9
  34. libavformat/os_support.c +2 −0
  35. libavformat/sctp.c +0 −1
  36. libavformat/tcp.c +0 −1
  37. libavformat/udp.c +0 −1
  38. libavresample/x86/audio_convert_init.c +6 −3
  39. libavutil/libm.h +5 −3
configure+2−0
@@ -1275,6 +1275,7 @@ HAVE_LIST=" · 1274 unmodified lines
12751275 sys_resource_h
12761276 sys_select_h
12771277 sys_soundcard_h
1278+ sys_time_h
12781279 sys_videoio_h
12791280 termios_h
12801281 threads
@@ -3187,6 +3188,7 @@ check_header sys/mman.h · 1906 unmodified lines
31873188 check_header sys/param.h
31883189 check_header sys/resource.h
31893190 check_header sys/select.h
3191+check_header sys/time.h
31903192 check_header termios.h
31913193 check_header unistd.h
31923194 check_header vdpau/vdpau.h
ffmpeg.c+3−0
@@ -760,6 +760,8 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) · 759 unmodified lines
760760 exit_program(1);
761761 }
762762 }
763+ av_assert0(ist);
764+
763765 ist->discard = 0;
764766 ist->decoding_needed = 1;
765767 ist->st->discard = AVDISCARD_NONE;
@@ -4023,6 +4025,7 @@ static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFor · 3257 unmodified lines
40234025 METADATA_CHECK_INDEX(index, context->nb_programs, "program")\
40244026 meta = &context->programs[index]->metadata;\
40254027 break;\
4028+ default: av_assert0(0);\
40264029 }\
40274030
40284031 SET_DICT(type_in, meta_in, ic, idx_in);
libavfilter/af_amix.c+1−1
@@ -255,7 +255,7 @@ static int config_output(AVFilterLink *outlink) · 254 unmodified lines
255255 av_get_channel_layout_string(buf, sizeof(buf), -1, outlink->channel_layout);
256256
257257 av_log(ctx, AV_LOG_VERBOSE,
258− "inputs:%d fmt:%s srate:%"PRId64" cl:%s\n", s->nb_inputs,
258+ "inputs:%d fmt:%s srate:%d cl:%s\n", s->nb_inputs,
259259 av_get_sample_fmt_name(outlink->format), outlink->sample_rate, buf);
260260
261261 return 0;
libavfilter/af_join.c+2−1
@@ -419,7 +419,7 @@ static int join_request_frame(AVFilterLink *outlink) · 418 unmodified lines
419419 JoinBufferPriv *priv;
420420 int linesize = INT_MAX;
421421 int perms = ~0;
422− int nb_samples;
422+ int nb_samples = 0;
423423 int i, j, ret;
424424
425425 /* get a frame on each input */
@@ -448,6 +448,7 @@ static int join_request_frame(AVFilterLink *outlink) · 22 unmodified lines
448448 perms &= cur_buf->perms;
449449 }
450450
451+ av_assert0(nb_samples > 0);
451452 buf = avfilter_get_audio_buffer_ref_from_arrays(s->data, linesize, perms,
452453 nb_samples, outlink->format,
453454 outlink->channel_layout);
libavfilter/asrc_anullsrc.c+1−1
@@ -91,7 +91,7 @@ static int config_props(AVFilterLink *outlink) · 90 unmodified lines
9191
9292 chans_nb = av_get_channel_layout_nb_channels(null->channel_layout);
9393 av_get_channel_layout_string(buf, sizeof(buf), chans_nb, null->channel_layout);
94− av_log(outlink->src, AV_LOG_INFO,
94+ av_log(outlink->src, AV_LOG_VERBOSE,
9595 "sample_rate:%d channel_layout:'%s' nb_samples:%d\n",
9696 null->sample_rate, buf, null->nb_samples);
9797
libavfilter/avfilter.c+1−1
@@ -163,7 +163,7 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 162 unmodified lines
163163 int ret;
164164 unsigned dstpad_idx = link->dstpad - link->dst->input_pads;
165165
166− av_log(link->dst, AV_LOG_INFO, "auto-inserting filter '%s' "
166+ av_log(link->dst, AV_LOG_VERBOSE, "auto-inserting filter '%s' "
167167 "between the filter '%s' and the filter '%s'\n",
168168 filt->name, link->src->name, link->dst->name);
169169
libavfilter/avfilter.h+85−78
@@ -60,22 +60,6 @@ typedef struct AVFilterFormats AVFilterFormats; · 59 unmodified lines
6060 */
6161 typedef struct AVFilterBuffer {
6262 uint8_t *data[8]; ///< buffer data for each plane/channel
63− int linesize[8]; ///< number of bytes per line
64−
65− unsigned refcount; ///< number of references to this buffer
66−
67− /** private data to be used by a custom free function */
68− void *priv;
69− /**
70− * A pointer to the function to deallocate this buffer if the default
71− * function is not sufficient. This could, for example, add the memory
72− * back into a memory pool to be reused later without the overhead of
73− * reallocating it from scratch.
74− */
75− void (*free)(struct AVFilterBuffer *buf);
76−
77− int format; ///< media format
78− int w, h; ///< width and height of the allocated buffer
7963
8064 /**
8165 * pointers to the data planes/channels.
@@ -92,6 +76,21 @@ typedef struct AVFilterBuffer { · 10 unmodified lines
9276 * in order to access all channels.
9377 */
9478 uint8_t **extended_data;
79+ int linesize[8]; ///< number of bytes per line
80+
81+ /** private data to be used by a custom free function */
82+ void *priv;
83+ /**
84+ * A pointer to the function to deallocate this buffer if the default
85+ * function is not sufficient. This could, for example, add the memory
86+ * back into a memory pool to be reused later without the overhead of
87+ * reallocating it from scratch.
88+ */
89+ void (*free)(struct AVFilterBuffer *buf);
90+
91+ int format; ///< media format
92+ int w, h; ///< width and height of the allocated buffer
93+ unsigned refcount; ///< number of references to this buffer
9594 } AVFilterBuffer;
9695
9796 #define AV_PERM_READ 0x01 ///< can read from the buffer
@@ -141,23 +140,6 @@ typedef struct AVFilterBufferRefVideoProps { · 43 unmodified lines
141140 typedef struct AVFilterBufferRef {
142141 AVFilterBuffer *buf; ///< the buffer that this is a reference to
143142 uint8_t *data[8]; ///< picture/audio data for each plane
144− int linesize[8]; ///< number of bytes per line
145− int format; ///< media format
146−
147− /**
148− * presentation timestamp. The time unit may change during
149− * filtering, as it is specified in the link and the filter code
150− * may need to rescale the PTS accordingly.
151− */
152− int64_t pts;
153− int64_t pos; ///< byte position in stream, -1 if unknown
154−
155− int perms; ///< permissions, see the AV_PERM_* flags
156−
157− enum AVMediaType type; ///< media type of buffer data
158− AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
159− AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
160−
161143 /**
162144 * pointers to the data planes/channels.
163145 *
@@ -173,6 +155,24 @@ typedef struct AVFilterBufferRef { · 9 unmodified lines
173155 * in order to access all channels.
174156 */
175157 uint8_t **extended_data;
158+ int linesize[8]; ///< number of bytes per line
159+
160+ AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
161+ AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
162+
163+ /**
164+ * presentation timestamp. The time unit may change during
165+ * filtering, as it is specified in the link and the filter code
166+ * may need to rescale the PTS accordingly.
167+ */
168+ int64_t pts;
169+ int64_t pos; ///< byte position in stream, -1 if unknown
170+
171+ int format; ///< media format
172+
173+ int perms; ///< permissions, see the AV_PERM_* flags
174+
175+ enum AVMediaType type; ///< media type of buffer data
176176 } AVFilterBufferRef;
177177
178178 /**
@@ -388,7 +388,22 @@ void avfilter_default_end_frame(AVFilterLink *link); · 209 unmodified lines
388388 typedef struct AVFilter {
389389 const char *name; ///< filter name
390390
391− int priv_size; ///< size of private data to allocate for the filter
391+ /**
392+ * A description for the filter. You should use the
393+ * NULL_IF_CONFIG_SMALL() macro to define it.
394+ */
395+ const char *description;
396+
397+ const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none
398+ const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none
399+
400+ /*****************************************************************
401+ * All fields below this line are not part of the public API. They
402+ * may not be used outside of libavfilter and can be changed and
403+ * removed at will.
404+ * New public fields should be added right above.
405+ *****************************************************************
406+ */
392407
393408 /**
394409 * Filter initialization function. Args contains the user-supplied
@@ -413,14 +428,7 @@ typedef struct AVFilter { · 18 unmodified lines
413428 */
414429 int (*query_formats)(AVFilterContext *);
415430
416− const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none
417− const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none
418−
419− /**
420− * A description for the filter. You should use the
421− * NULL_IF_CONFIG_SMALL() macro to define it.
422− */
423− const char *description;
431+ int priv_size; ///< size of private data to allocate for the filter
424432
425433 /**
426434 * Make the filter instance process a command.
@@ -445,23 +453,22 @@ struct AVFilterContext { · 18 unmodified lines
445453
446454 char *name; ///< name of this filter instance
447455
456+ AVFilterPad *input_pads; ///< array of input pads
457+ AVFilterLink **inputs; ///< array of pointers to input links
448458 #if FF_API_FOO_COUNT
449459 unsigned input_count; ///< @deprecated use nb_inputs
450460 #endif
451− AVFilterPad *input_pads; ///< array of input pads
452− AVFilterLink **inputs; ///< array of pointers to input links
461+ unsigned nb_inputs; ///< number of input pads
453462
463+ AVFilterPad *output_pads; ///< array of output pads
464+ AVFilterLink **outputs; ///< array of pointers to output links
454465 #if FF_API_FOO_COUNT
455466 unsigned output_count; ///< @deprecated use nb_outputs
456467 #endif
457− AVFilterPad *output_pads; ///< array of output pads
458− AVFilterLink **outputs; ///< array of pointers to output links
468+ unsigned nb_outputs; ///< number of output pads
459469
460470 void *priv; ///< private data for use by the filter
461471
462− unsigned nb_inputs; ///< number of input pads
463− unsigned nb_outputs; ///< number of output pads
464−
465472 struct AVFilterCommand *command_queue;
466473 };
467474
@@ -479,13 +486,6 @@ struct AVFilterLink { · 11 unmodified lines
479486 AVFilterContext *dst; ///< dest filter
480487 AVFilterPad *dstpad; ///< input pad on the dest filter
481488
482− /** stage of the initialization of the link properties (dimensions, etc) */
483− enum {
484− AVLINK_UNINIT = 0, ///< not started
485− AVLINK_STARTINIT, ///< started, but incomplete
486− AVLINK_INIT ///< complete
487− } init_state;
488−
489489 enum AVMediaType type; ///< filter media type
490490
491491 /* These parameters apply only to video */
@@ -498,28 +498,6 @@ struct AVFilterLink { · 6 unmodified lines
498498
499499 int format; ///< agreed upon media format
500500
501− /**
502− * Lists of formats and channel layouts supported by the input and output
503− * filters respectively. These lists are used for negotiating the format
504− * to actually be used, which will be loaded into the format and
505− * channel_layout members, above, when chosen.
506− *
507− */
508− AVFilterFormats *in_formats;
509− AVFilterFormats *out_formats;
510−
511− /**
512− * The buffer reference currently being sent across the link by the source
513− * filter. This is used internally by the filter system to allow
514− * automatic copying of buffers which do not have sufficient permissions
515− * for the destination. This should not be accessed directly by the
516− * filters.
517− */
518− AVFilterBufferRef *src_buf;
519−
520− AVFilterBufferRef *cur_buf;
521− AVFilterBufferRef *out_buf;
522−
523501 /**
524502 * Define the time base used by the PTS of the frames/samples
525503 * which will pass through this link.
@@ -536,6 +514,16 @@ struct AVFilterLink { · 10 unmodified lines
536514 * New public fields should be added right above.
537515 *****************************************************************
538516 */
517+ /**
518+ * Lists of formats and channel layouts supported by the input and output
519+ * filters respectively. These lists are used for negotiating the format
520+ * to actually be used, which will be loaded into the format and
521+ * channel_layout members, above, when chosen.
522+ *
523+ */
524+ AVFilterFormats *in_formats;
525+ AVFilterFormats *out_formats;
526+
539527 /**
540528 * Lists of channel layouts and sample rates used for automatic
541529 * negotiation.
@@ -554,6 +542,25 @@ struct AVFilterLink { · 12 unmodified lines
554542 */
555543 int request_samples;
556544
545+ /** stage of the initialization of the link properties (dimensions, etc) */
546+ enum {
547+ AVLINK_UNINIT = 0, ///< not started
548+ AVLINK_STARTINIT, ///< started, but incomplete
549+ AVLINK_INIT ///< complete
550+ } init_state;
551+
552+ /**
553+ * The buffer reference currently being sent across the link by the source
554+ * filter. This is used internally by the filter system to allow
555+ * automatic copying of buffers which do not have sufficient permissions
556+ * for the destination. This should not be accessed directly by the
557+ * filters.
558+ */
559+ AVFilterBufferRef *src_buf;
560+
561+ AVFilterBufferRef *cur_buf;
562+ AVFilterBufferRef *out_buf;
563+
557564 struct AVFilterPool *pool;
558565
559566 /**
libavfilter/avfiltergraph.c+3−1
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333 #include "internal.h"
3434
3535 #include "libavutil/audioconvert.h"
36+#include "libavutil/avassert.h"
3637 #include "libavutil/log.h"
3738
3839 static const AVClass filtergraph_class = {
@@ -648,7 +649,7 @@ static void swap_sample_fmts_on_filter(AVFilterContext *filter) · 609 unmodified lines
648649
649650 for (i = 0; i < filter->nb_outputs; i++) {
650651 AVFilterLink *outlink = filter->outputs[i];
651− int best_idx, best_score = INT_MIN;
652+ int best_idx = -1, best_score = INT_MIN;
652653
653654 if (outlink->type != AVMEDIA_TYPE_AUDIO ||
654655 outlink->in_formats->format_count < 2)
@@ -681,6 +682,7 @@ static void swap_sample_fmts_on_filter(AVFilterContext *filter) · 26 unmodified lines
681682 best_idx = j;
682683 }
683684 }
685+ av_assert0(best_idx >= 0);
684686 FFSWAP(int, outlink->in_formats->formats[0],
685687 outlink->in_formats->formats[best_idx]);
686688 }
libavfilter/fifo.c+0−1
@@ -55,7 +55,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 54 unmodified lines
5555 FifoContext *fifo = ctx->priv;
5656 fifo->last = &fifo->root;
5757
58− av_log(ctx, AV_LOG_INFO, "\n");
5958 return 0;
6059 }
6160
libavfilter/src_movie.c+1−1
@@ -167,7 +167,7 @@ static av_cold int movie_common_init(AVFilterContext *ctx, const char *args, · 166 unmodified lines
167167 return ret;
168168 }
169169
170− av_log(ctx, AV_LOG_INFO, "seek_point:%"PRIi64" format_name:%s file_name:%s stream_index:%d\n",
170+ av_log(ctx, AV_LOG_VERBOSE, "seek_point:%"PRIi64" format_name:%s file_name:%s stream_index:%d\n",
171171 movie->seek_point, movie->format_name, movie->file_name,
172172 movie->stream_index);
173173
libavfilter/vf_aspect.c+2−2
@@ -47,7 +47,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 46 unmodified lines
4747 }
4848 }
4949
50− av_log(ctx, AV_LOG_INFO, "a:%d/%d\n", aspect->ratio.num, aspect->ratio.den);
50+ av_log(ctx, AV_LOG_VERBOSE, "a:%d/%d\n", aspect->ratio.num, aspect->ratio.den);
5151 return 0;
5252 }
5353
@@ -69,7 +69,7 @@ static int setdar_config_props(AVFilterLink *inlink) · 15 unmodified lines
6969 aspect->ratio.num * inlink->h,
7070 aspect->ratio.den * inlink->w, 100);
7171
72− av_log(inlink->dst, AV_LOG_INFO, "w:%d h:%d -> dar:%d/%d sar:%d/%d\n",
72+ av_log(inlink->dst, AV_LOG_VERBOSE, "w:%d h:%d -> dar:%d/%d sar:%d/%d\n",
7373 inlink->w, inlink->h, dar.num, dar.den, aspect->ratio.num, aspect->ratio.den);
7474
7575 inlink->sample_aspect_ratio = aspect->ratio;
libavfilter/vf_blackframe.c+1−1
@@ -66,7 +66,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 65 unmodified lines
6666 if (args)
6767 sscanf(args, "%u:%u", &blackframe->bamount, &blackframe->bthresh);
6868
69− av_log(ctx, AV_LOG_INFO, "bamount:%u bthresh:%u\n",
69+ av_log(ctx, AV_LOG_VERBOSE, "bamount:%u bthresh:%u\n",
7070 blackframe->bamount, blackframe->bthresh);
7171
7272 if (blackframe->bamount > 100 || blackframe->bthresh > 255) {
libavfilter/vf_crop.c+1−1
@@ -224,7 +224,7 @@ static int config_input(AVFilterLink *link) · 223 unmodified lines
224224 } else
225225 crop->out_sar = link->sample_aspect_ratio;
226226
227− av_log(ctx, AV_LOG_INFO, "w:%d h:%d sar:%d/%d -> w:%d h:%d sar:%d/%d\n",
227+ av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d sar:%d/%d -> w:%d h:%d sar:%d/%d\n",
228228 link->w, link->h, link->sample_aspect_ratio.num, link->sample_aspect_ratio.den,
229229 crop->w, crop->h, crop->out_sar.num, crop->out_sar.den);
230230
libavfilter/vf_cropdetect.c+1−1
@@ -92,7 +92,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 91 unmodified lines
9292 if (args)
9393 sscanf(args, "%d:%d:%d", &cd->limit, &cd->round, &cd->reset_count);
9494
95− av_log(ctx, AV_LOG_INFO, "limit:%d round:%d reset_count:%d\n",
95+ av_log(ctx, AV_LOG_VERBOSE, "limit:%d round:%d reset_count:%d\n",
9696 cd->limit, cd->round, cd->reset_count);
9797
9898 return 0;
libavfilter/vf_drawbox.c+1−1
@@ -87,7 +87,7 @@ static int config_input(AVFilterLink *inlink) · 86 unmodified lines
8787 if (drawbox->w == 0) drawbox->w = inlink->w;
8888 if (drawbox->h == 0) drawbox->h = inlink->h;
8989
90− av_log(inlink->dst, AV_LOG_INFO, "x:%d y:%d w:%d h:%d color:0x%02X%02X%02X%02X\n",
90+ av_log(inlink->dst, AV_LOG_VERBOSE, "x:%d y:%d w:%d h:%d color:0x%02X%02X%02X%02X\n",
9191 drawbox->x, drawbox->y, drawbox->w, drawbox->h,
9292 drawbox->yuv_color[Y], drawbox->yuv_color[U], drawbox->yuv_color[V], drawbox->yuv_color[A]);
9393
libavfilter/vf_fade.c+1−1
@@ -126,7 +126,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 125 unmodified lines
126126 }
127127 fade->stop_frame = fade->start_frame + fade->nb_frames;
128128
129− av_log(ctx, AV_LOG_INFO,
129+ av_log(ctx, AV_LOG_VERBOSE,
130130 "type:%s start_frame:%d nb_frames:%d alpha:%d\n",
131131 fade->type, fade->start_frame, fade->nb_frames, fade->alpha);
132132
libavfilter/vf_fieldorder.c+1−1
@@ -58,7 +58,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 57 unmodified lines
5858 return AVERROR(EINVAL);
5959 }
6060
61− av_log(ctx, AV_LOG_INFO, "output field order: %s\n",
61+ av_log(ctx, AV_LOG_VERBOSE, "output field order: %s\n",
6262 fieldorder->dst_tff ? tff : bff);
6363
6464 return 0;
libavfilter/vf_frei0r.c+9−9
@@ -146,7 +146,7 @@ static int set_params(AVFilterContext *ctx, const char *params) · 145 unmodified lines
146146 return ret;
147147 }
148148
149− av_log(ctx, AV_LOG_INFO,
149+ av_log(ctx, AV_LOG_VERBOSE,
150150 "idx:%d name:'%s' type:%s explanation:'%s' ",
151151 i, info.name,
152152 info.type == F0R_PARAM_BOOL ? "bool" :
@@ -157,7 +157,7 @@ static int set_params(AVFilterContext *ctx, const char *params) · 4 unmodified lines
157157 info.explanation);
158158
159159 #ifdef DEBUG
160− av_log(ctx, AV_LOG_INFO, "value:");
160+ av_log(ctx, AV_LOG_DEBUG, "value:");
161161 switch (info.type) {
162162 void *v;
163163 double d;
@@ -168,31 +168,31 @@ static int set_params(AVFilterContext *ctx, const char *params) · 4 unmodified lines
168168 case F0R_PARAM_BOOL:
169169 v = &d;
170170 frei0r->get_param_value(frei0r->instance, v, i);
171− av_log(ctx, AV_LOG_INFO, "%s", d >= 0.5 && d <= 1.0 ? "y" : "n");
171+ av_log(ctx, AV_LOG_DEBUG, "%s", d >= 0.5 && d <= 1.0 ? "y" : "n");
172172 break;
173173 case F0R_PARAM_DOUBLE:
174174 v = &d;
175175 frei0r->get_param_value(frei0r->instance, v, i);
176− av_log(ctx, AV_LOG_INFO, "%f", d);
176+ av_log(ctx, AV_LOG_DEBUG, "%f", d);
177177 break;
178178 case F0R_PARAM_COLOR:
179179 v = &col;
180180 frei0r->get_param_value(frei0r->instance, v, i);
181− av_log(ctx, AV_LOG_INFO, "%f/%f/%f", col.r, col.g, col.b);
181+ av_log(ctx, AV_LOG_DEBUG, "%f/%f/%f", col.r, col.g, col.b);
182182 break;
183183 case F0R_PARAM_POSITION:
184184 v = &pos;
185185 frei0r->get_param_value(frei0r->instance, v, i);
186− av_log(ctx, AV_LOG_INFO, "%lf/%lf", pos.x, pos.y);
186+ av_log(ctx, AV_LOG_DEBUG, "%lf/%lf", pos.x, pos.y);
187187 break;
188188 default: /* F0R_PARAM_STRING */
189189 v = s;
190190 frei0r->get_param_value(frei0r->instance, v, i);
191− av_log(ctx, AV_LOG_INFO, "'%s'\n", s);
191+ av_log(ctx, AV_LOG_DEBUG, "'%s'\n", s);
192192 break;
193193 }
194194 #endif
195− av_log(ctx, AV_LOG_INFO, "\n");
195+ av_log(ctx, AV_LOG_VERBOSE, "\n");
196196 }
197197
198198 return 0;
@@ -266,7 +266,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, · 67 unmodified lines
266266 return AVERROR(EINVAL);
267267 }
268268
269− av_log(ctx, AV_LOG_INFO,
269+ av_log(ctx, AV_LOG_VERBOSE,
270270 "name:%s author:'%s' explanation:'%s' color_model:%s "
271271 "frei0r_version:%d version:%d.%d num_params:%d\n",
272272 pi->name, pi->author, pi->explanation,
libavfilter/vf_gradfun.c+1−1
@@ -142,7 +142,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 141 unmodified lines
142142 if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2)
143143 gf->blur_line = ff_gradfun_blur_line_sse2;
144144
145− av_log(ctx, AV_LOG_INFO, "threshold:%.2f radius:%d\n", thresh, gf->radius);
145+ av_log(ctx, AV_LOG_VERBOSE, "threshold:%.2f radius:%d\n", thresh, gf->radius);
146146
147147 return 0;
148148 }
libavfilter/vf_hqdn3d.c+1−1
@@ -238,7 +238,7 @@ static int init(AVFilterContext *ctx, const char *args) · 237 unmodified lines
238238 }
239239 }
240240
241− av_log(ctx, AV_LOG_INFO, "ls:%lf cs:%lf lt:%lf ct:%lf\n",
241+ av_log(ctx, AV_LOG_VERBOSE, "ls:%lf cs:%lf lt:%lf ct:%lf\n",
242242 LumSpac, ChromSpac, LumTmp, ChromTmp);
243243 if (LumSpac < 0 || ChromSpac < 0 || isnan(ChromTmp)) {
244244 av_log(ctx, AV_LOG_ERROR,
libavfilter/vf_libopencv.c+3−3
@@ -121,7 +121,7 @@ static av_cold int smooth_init(AVFilterContext *ctx, const char *args) · 120 unmodified lines
121121 return AVERROR(EINVAL);
122122 }
123123
124− av_log(ctx, AV_LOG_INFO, "type:%s param1:%d param2:%d param3:%f param4:%f\n",
124+ av_log(ctx, AV_LOG_VERBOSE, "type:%s param1:%d param2:%d param3:%f param4:%f\n",
125125 type_str, smooth->param1, smooth->param2, smooth->param3, smooth->param4);
126126 return 0;
127127 }
@@ -239,7 +239,7 @@ static int parse_iplconvkernel(IplConvKernel **kernel, char *buf, void *log_ctx) · 111 unmodified lines
239239 if (!*kernel)
240240 return AVERROR(ENOMEM);
241241
242− av_log(log_ctx, AV_LOG_INFO, "Structuring element: w:%d h:%d x:%d y:%d shape:%s\n",
242+ av_log(log_ctx, AV_LOG_VERBOSE, "Structuring element: w:%d h:%d x:%d y:%d shape:%s\n",
243243 rows, cols, anchor_x, anchor_y, shape_str);
244244 return 0;
245245 }
@@ -269,7 +269,7 @@ static av_cold int dilate_init(AVFilterContext *ctx, const char *args) · 23 unmodified lines
269269 av_free(kernel_str);
270270
271271 sscanf(buf, ":%d", &dilate->nb_iterations);
272− av_log(ctx, AV_LOG_INFO, "iterations_nb:%d\n", dilate->nb_iterations);
272+ av_log(ctx, AV_LOG_VERBOSE, "iterations_nb:%d\n", dilate->nb_iterations);
273273 if (dilate->nb_iterations <= 0) {
274274 av_log(ctx, AV_LOG_ERROR, "Invalid non-positive value '%d' for nb_iterations\n",
275275 dilate->nb_iterations);
libavfilter/vf_overlay.c+2−2
@@ -245,7 +245,7 @@ static int config_input_overlay(AVFilterLink *inlink) · 244 unmodified lines
245245 ff_fill_rgba_map(over->overlay_rgba_map, inlink->format) >= 0;
246246 over->overlay_has_alpha = ff_fmt_is_in(inlink->format, alpha_pix_fmts);
247247
248− av_log(ctx, AV_LOG_INFO,
248+ av_log(ctx, AV_LOG_VERBOSE,
249249 "main w:%d h:%d fmt:%s overlay x:%d y:%d w:%d h:%d fmt:%s\n",
250250 ctx->inputs[MAIN]->w, ctx->inputs[MAIN]->h,
251251 av_pix_fmt_descriptors[ctx->inputs[MAIN]->format].name,
@@ -284,7 +284,7 @@ static int config_output(AVFilterLink *outlink) · 32 unmodified lines
284284 av_gcd((int64_t)tb1.num * tb2.den,
285285 (int64_t)tb2.num * tb1.den),
286286 (int64_t)tb1.den * tb2.den, INT_MAX);
287− av_log(ctx, AV_LOG_INFO,
287+ av_log(ctx, AV_LOG_VERBOSE,
288288 "main_tb:%d/%d overlay_tb:%d/%d -> tb:%d/%d exact:%d\n",
289289 tb1.num, tb1.den, tb2.num, tb2.den, tb->num, tb->den, exact);
290290 if (!exact)
libavfilter/vf_pad.c+1−1
@@ -184,7 +184,7 @@ static int config_input(AVFilterLink *inlink) · 183 unmodified lines
184184 pad->in_w = ff_draw_round_to_sub(&pad->draw, 0, -1, inlink->w);
185185 pad->in_h = ff_draw_round_to_sub(&pad->draw, 1, -1, inlink->h);
186186
187− 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",
187+ 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",
188188 inlink->w, inlink->h, pad->w, pad->h, pad->x, pad->y,
189189 pad->rgba_color[0], pad->rgba_color[1], pad->rgba_color[2], pad->rgba_color[3]);
190190
libavfilter/vf_setpts.c+1−1
@@ -85,7 +85,7 @@ static int config_input(AVFilterLink *inlink) · 84 unmodified lines
8585
8686 setpts->var_values[VAR_TB] = av_q2d(inlink->time_base);
8787
88− av_log(inlink->src, AV_LOG_INFO, "TB:%f\n", setpts->var_values[VAR_TB]);
88+ av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f\n", setpts->var_values[VAR_TB]);
8989 return 0;
9090 }
9191
libavfilter/vf_settb.c+1−1
@@ -88,7 +88,7 @@ static int config_output_props(AVFilterLink *outlink) · 87 unmodified lines
8888 }
8989
9090 outlink->time_base = time_base;
91− av_log(outlink->src, AV_LOG_INFO, "tb:%d/%d -> tb:%d/%d\n",
91+ av_log(outlink->src, AV_LOG_VERBOSE, "tb:%d/%d -> tb:%d/%d\n",
9292 inlink ->time_base.num, inlink ->time_base.den,
9393 outlink->time_base.num, outlink->time_base.den);
9494
libavfilter/vf_transpose.c+1−1
@@ -107,7 +107,7 @@ static int config_props_output(AVFilterLink *outlink) · 106 unmodified lines
107107 } else
108108 outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
109109
110− av_log(ctx, AV_LOG_INFO, "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n",
110+ av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n",
111111 inlink->w, inlink->h, trans->dir, outlink->w, outlink->h,
112112 trans->dir == 1 || trans->dir == 3 ? "clockwise" : "counterclockwise",
113113 trans->dir == 0 || trans->dir == 3);
libavfilter/vf_unsharp.c+1−1
@@ -177,7 +177,7 @@ static void init_filter_param(AVFilterContext *ctx, FilterParam *fp, const char · 176 unmodified lines
177177
178178 effect = fp->amount == 0 ? "none" : fp->amount < 0 ? "blur" : "sharpen";
179179
180− av_log(ctx, AV_LOG_INFO, "effect:%s type:%s msize_x:%d msize_y:%d amount:%0.2f\n",
180+ av_log(ctx, AV_LOG_VERBOSE, "effect:%s type:%s msize_x:%d msize_y:%d amount:%0.2f\n",
181181 effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 65535.0);
182182
183183 for (z = 0; z < 2 * fp->steps_y; z++)
libavfilter/vf_yadif.c+1−1
@@ -417,7 +417,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 416 unmodified lines
417417 else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX)
418418 yadif->filter_line = ff_yadif_filter_line_mmx;
419419
420− av_log(ctx, AV_LOG_INFO, "mode:%d parity:%d auto_enable:%d\n", yadif->mode, yadif->parity, yadif->auto_enable);
420+ av_log(ctx, AV_LOG_VERBOSE, "mode:%d parity:%d auto_enable:%d\n", yadif->mode, yadif->parity, yadif->auto_enable);
421421
422422 return 0;
423423 }
libavfilter/vsrc_color.c+1−1
@@ -135,7 +135,7 @@ static int color_config_props(AVFilterLink *inlink) · 134 unmodified lines
135135 if (av_image_check_size(color->w, color->h, 0, ctx) < 0)
136136 return AVERROR(EINVAL);
137137
138− av_log(ctx, AV_LOG_INFO, "w:%d h:%d r:%d/%d color:0x%02x%02x%02x%02x\n",
138+ av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d r:%d/%d color:0x%02x%02x%02x%02x\n",
139139 color->w, color->h, color->time_base.den, color->time_base.num,
140140 color->color_rgba[0], color->color_rgba[1], color->color_rgba[2], color->color_rgba[3]);
141141 inlink->w = color->w;
libavformat/Makefile+1−1
@@ -169,7 +169,7 @@ OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o id3v2enc.o · 168 unmodified lines
169169 OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o
170170 OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o
171171 OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o
172−OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o
172+OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o apetag.o
173173 OBJS-$(CONFIG_MPEG1SYSTEM_MUXER) += mpegenc.o
174174 OBJS-$(CONFIG_MPEG1VCD_MUXER) += mpegenc.o
175175 OBJS-$(CONFIG_MPEG2DVD_MUXER) += mpegenc.o
libavformat/mpc8.c+7−0
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121
2222 #include "libavcodec/get_bits.h"
2323 #include "libavcodec/unary.h"
24+#include "apetag.h"
2425 #include "avformat.h"
2526 #include "internal.h"
2627 #include "avio_internal.h"
@@ -242,6 +243,12 @@ static int mpc8_read_header(AVFormatContext *s) · 215 unmodified lines
242243 if (size > 0)
243244 avio_skip(pb, size);
244245
246+ if (pb->seekable) {
247+ int64_t pos = avio_tell(s->pb);
248+ ff_ape_parse_tag(s);
249+ avio_seek(s->pb, pos, SEEK_SET);
250+ }
251+
245252 return 0;
246253 }
247254
libavformat/network.c+8−0
@@ -165,6 +165,14 @@ int ff_neterrno(void) · 164 unmodified lines
165165 return AVERROR(EAGAIN);
166166 case WSAEINTR:
167167 return AVERROR(EINTR);
168+ case WSAEPROTONOSUPPORT:
169+ return AVERROR(EPROTONOSUPPORT);
170+ case WSAETIMEDOUT:
171+ return AVERROR(ETIMEDOUT);
172+ case WSAECONNREFUSED:
173+ return AVERROR(ECONNREFUSED);
174+ case WSAEINPROGRESS:
175+ return AVERROR(EINPROGRESS);
168176 }
169177 return -err;
170178 }
libavformat/network.h+10−9
@@ -27,26 +27,27 @@ · 26 unmodified lines
2727 #include "libavutil/error.h"
2828 #include "os_support.h"
2929
30+#if HAVE_UNISTD_H
31+#include <unistd.h>
32+#endif
33+
3034 #if HAVE_WINSOCK2_H
3135 #include <winsock2.h>
3236 #include <ws2tcpip.h>
3337
34−#ifdef EPROTONOSUPPORT
35−# undef EPROTONOSUPPORT
36−#endif
38+#ifndef EPROTONOSUPPORT
3739 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
38−#ifdef ETIMEDOUT
39−# undef ETIMEDOUT
4040 #endif
41+#ifndef ETIMEDOUT
4142 #define ETIMEDOUT WSAETIMEDOUT
42−#ifdef ECONNREFUSED
43−# undef ECONNREFUSED
4443 #endif
44+#ifndef ECONNREFUSED
4545 #define ECONNREFUSED WSAECONNREFUSED
46−#ifdef EINPROGRESS
47−# undef EINPROGRESS
4846 #endif
47+#ifndef EINPROGRESS
4948 #define EINPROGRESS WSAEINPROGRESS
49+#endif
50+
5051 #define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e)
5152 #define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e)
5253
libavformat/os_support.c+2−0
@@ -59,7 +59,9 @@ int ff_win32_open(const char *filename_utf8, int oflag, int pmode) · 58 unmodified lines
5959 #if CONFIG_NETWORK
6060 #include <fcntl.h>
6161 #if !HAVE_POLL_H
62+#if HAVE_SYS_TIME_H
6263 #include <sys/time.h>
64+#endif
6365 #if HAVE_WINSOCK2_H
6466 #include <winsock2.h>
6567 #elif HAVE_SYS_SELECT_H
libavformat/sctp.c+0−1
@@ -39,7 +39,6 @@ · 38 unmodified lines
3939
4040 #include <netinet/in.h>
4141 #include <netinet/sctp.h>
42−#include <unistd.h>
4342
4443 #include "config.h"
4544
libavformat/tcp.c+0−1
@@ -20,7 +20,6 @@ · 19 unmodified lines
2020 */
2121 #include "avformat.h"
2222 #include "libavutil/parseutils.h"
23−#include <unistd.h>
2423 #include "internal.h"
2524 #include "network.h"
2625 #include "os_support.h"
libavformat/udp.c+0−1
@@ -32,7 +32,6 @@ · 31 unmodified lines
3232 #include "libavutil/fifo.h"
3333 #include "libavutil/intreadwrite.h"
3434 #include "libavutil/avstring.h"
35−#include <unistd.h>
3635 #include "internal.h"
3736 #include "network.h"
3837 #include "os_support.h"
libavresample/x86/audio_convert_init.c+6−3
@@ -38,9 +38,12 @@ extern void ff_conv_flt_to_s16_sse2(int16_t *dst, const float *src, int len); · 37 unmodified lines
3838 extern void ff_conv_flt_to_s32_sse2(int32_t *dst, const float *src, int len);
3939 extern void ff_conv_flt_to_s32_avx (int32_t *dst, const float *src, int len);
4040
41−extern void ff_conv_fltp_to_flt_6ch_mmx (float *dst, float *const *src, int len);
42−extern void ff_conv_fltp_to_flt_6ch_sse4(float *dst, float *const *src, int len);
43−extern void ff_conv_fltp_to_flt_6ch_avx (float *dst, float *const *src, int len);
41+extern void ff_conv_fltp_to_flt_6ch_mmx (float *dst, float *const *src, int len,
42+ int channels);
43+extern void ff_conv_fltp_to_flt_6ch_sse4(float *dst, float *const *src, int len,
44+ int channels);
45+extern void ff_conv_fltp_to_flt_6ch_avx (float *dst, float *const *src, int len,
46+ int channels);
4447
4548 av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
4649 {
libavutil/libm.h+5−3
@@ -33,9 +33,11 @@ · 32 unmodified lines
3333 #endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM*/
3434
3535 #if !HAVE_CBRTF
36−#undef cbrtf
37−#define cbrtf(x) powf(x, 1.0/3.0)
38−#endif /* HAVE_CBRTF */
36+static av_always_inline float cbrtf(float x)
37+{
38+ return x < 0 ? -powf(-x, 1.0 / 3.0) : powf(x, 1.0 / 3.0);
39+}
40+#endif
3941
4042 #if !HAVE_EXP2
4143 #undef exp2

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