* 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
Unified · Split
| @@ -1275,6 +1275,7 @@ HAVE_LIST=" · 1274 unmodified lines | ||
| 1275 | 1275 | sys_resource_h |
| 1276 | 1276 | sys_select_h |
| 1277 | 1277 | sys_soundcard_h |
| 1278 | + sys_time_h | |
| 1278 | 1279 | sys_videoio_h |
| 1279 | 1280 | termios_h |
| 1280 | 1281 | threads |
| @@ -3187,6 +3188,7 @@ check_header sys/mman.h · 1906 unmodified lines | ||
| 3187 | 3188 | check_header sys/param.h |
| 3188 | 3189 | check_header sys/resource.h |
| 3189 | 3190 | check_header sys/select.h |
| 3191 | +check_header sys/time.h | |
| 3190 | 3192 | check_header termios.h |
| 3191 | 3193 | check_header unistd.h |
| 3192 | 3194 | check_header vdpau/vdpau.h |
| @@ -760,6 +760,8 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) · 759 unmodified lines | ||
| 760 | 760 | exit_program(1); |
| 761 | 761 | } |
| 762 | 762 | } |
| 763 | + av_assert0(ist); | |
| 764 | + | |
| 763 | 765 | ist->discard = 0; |
| 764 | 766 | ist->decoding_needed = 1; |
| 765 | 767 | ist->st->discard = AVDISCARD_NONE; |
| @@ -4023,6 +4025,7 @@ static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFor · 3257 unmodified lines | ||
| 4023 | 4025 | METADATA_CHECK_INDEX(index, context->nb_programs, "program")\ |
| 4024 | 4026 | meta = &context->programs[index]->metadata;\ |
| 4025 | 4027 | break;\ |
| 4028 | + default: av_assert0(0);\ | |
| 4026 | 4029 | }\ |
| 4027 | 4030 | |
| 4028 | 4031 | SET_DICT(type_in, meta_in, ic, idx_in); |
| @@ -255,7 +255,7 @@ static int config_output(AVFilterLink *outlink) · 254 unmodified lines | ||
| 255 | 255 | av_get_channel_layout_string(buf, sizeof(buf), -1, outlink->channel_layout); |
| 256 | 256 | |
| 257 | 257 | 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, | |
| 259 | 259 | av_get_sample_fmt_name(outlink->format), outlink->sample_rate, buf); |
| 260 | 260 | |
| 261 | 261 | return 0; |
| @@ -419,7 +419,7 @@ static int join_request_frame(AVFilterLink *outlink) · 418 unmodified lines | ||
| 419 | 419 | JoinBufferPriv *priv; |
| 420 | 420 | int linesize = INT_MAX; |
| 421 | 421 | int perms = ~0; |
| 422 | − int nb_samples; | |
| 422 | + int nb_samples = 0; | |
| 423 | 423 | int i, j, ret; |
| 424 | 424 | |
| 425 | 425 | /* get a frame on each input */ |
| @@ -448,6 +448,7 @@ static int join_request_frame(AVFilterLink *outlink) · 22 unmodified lines | ||
| 448 | 448 | perms &= cur_buf->perms; |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | + av_assert0(nb_samples > 0); | |
| 451 | 452 | buf = avfilter_get_audio_buffer_ref_from_arrays(s->data, linesize, perms, |
| 452 | 453 | nb_samples, outlink->format, |
| 453 | 454 | outlink->channel_layout); |
| @@ -91,7 +91,7 @@ static int config_props(AVFilterLink *outlink) · 90 unmodified lines | ||
| 91 | 91 | |
| 92 | 92 | chans_nb = av_get_channel_layout_nb_channels(null->channel_layout); |
| 93 | 93 | 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, | |
| 95 | 95 | "sample_rate:%d channel_layout:'%s' nb_samples:%d\n", |
| 96 | 96 | null->sample_rate, buf, null->nb_samples); |
| 97 | 97 | |
| @@ -163,7 +163,7 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 162 unmodified lines | ||
| 163 | 163 | int ret; |
| 164 | 164 | unsigned dstpad_idx = link->dstpad - link->dst->input_pads; |
| 165 | 165 | |
| 166 | − av_log(link->dst, AV_LOG_INFO, "auto-inserting filter '%s' " | |
| 166 | + av_log(link->dst, AV_LOG_VERBOSE, "auto-inserting filter '%s' " | |
| 167 | 167 | "between the filter '%s' and the filter '%s'\n", |
| 168 | 168 | filt->name, link->src->name, link->dst->name); |
| 169 | 169 | |
| @@ -60,22 +60,6 @@ typedef struct AVFilterFormats AVFilterFormats; · 59 unmodified lines | ||
| 60 | 60 | */ |
| 61 | 61 | typedef struct AVFilterBuffer { |
| 62 | 62 | 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 | |
| 79 | 63 | |
| 80 | 64 | /** |
| 81 | 65 | * pointers to the data planes/channels. |
| @@ -92,6 +76,21 @@ typedef struct AVFilterBuffer { · 10 unmodified lines | ||
| 92 | 76 | * in order to access all channels. |
| 93 | 77 | */ |
| 94 | 78 | 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 | |
| 95 | 94 | } AVFilterBuffer; |
| 96 | 95 | |
| 97 | 96 | #define AV_PERM_READ 0x01 ///< can read from the buffer |
| @@ -141,23 +140,6 @@ typedef struct AVFilterBufferRefVideoProps { · 43 unmodified lines | ||
| 141 | 140 | typedef struct AVFilterBufferRef { |
| 142 | 141 | AVFilterBuffer *buf; ///< the buffer that this is a reference to |
| 143 | 142 | 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 | − | |
| 161 | 143 | /** |
| 162 | 144 | * pointers to the data planes/channels. |
| 163 | 145 | * |
| @@ -173,6 +155,24 @@ typedef struct AVFilterBufferRef { · 9 unmodified lines | ||
| 173 | 155 | * in order to access all channels. |
| 174 | 156 | */ |
| 175 | 157 | 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 | |
| 176 | 176 | } AVFilterBufferRef; |
| 177 | 177 | |
| 178 | 178 | /** |
| @@ -388,7 +388,22 @@ void avfilter_default_end_frame(AVFilterLink *link); · 209 unmodified lines | ||
| 388 | 388 | typedef struct AVFilter { |
| 389 | 389 | const char *name; ///< filter name |
| 390 | 390 | |
| 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 | + */ | |
| 392 | 407 | |
| 393 | 408 | /** |
| 394 | 409 | * Filter initialization function. Args contains the user-supplied |
| @@ -413,14 +428,7 @@ typedef struct AVFilter { · 18 unmodified lines | ||
| 413 | 428 | */ |
| 414 | 429 | int (*query_formats)(AVFilterContext *); |
| 415 | 430 | |
| 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 | |
| 424 | 432 | |
| 425 | 433 | /** |
| 426 | 434 | * Make the filter instance process a command. |
| @@ -445,23 +453,22 @@ struct AVFilterContext { · 18 unmodified lines | ||
| 445 | 453 | |
| 446 | 454 | char *name; ///< name of this filter instance |
| 447 | 455 | |
| 456 | + AVFilterPad *input_pads; ///< array of input pads | |
| 457 | + AVFilterLink **inputs; ///< array of pointers to input links | |
| 448 | 458 | #if FF_API_FOO_COUNT |
| 449 | 459 | unsigned input_count; ///< @deprecated use nb_inputs |
| 450 | 460 | #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 | |
| 453 | 462 | |
| 463 | + AVFilterPad *output_pads; ///< array of output pads | |
| 464 | + AVFilterLink **outputs; ///< array of pointers to output links | |
| 454 | 465 | #if FF_API_FOO_COUNT |
| 455 | 466 | unsigned output_count; ///< @deprecated use nb_outputs |
| 456 | 467 | #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 | |
| 459 | 469 | |
| 460 | 470 | void *priv; ///< private data for use by the filter |
| 461 | 471 | |
| 462 | − unsigned nb_inputs; ///< number of input pads | |
| 463 | − unsigned nb_outputs; ///< number of output pads | |
| 464 | − | |
| 465 | 472 | struct AVFilterCommand *command_queue; |
| 466 | 473 | }; |
| 467 | 474 | |
| @@ -479,13 +486,6 @@ struct AVFilterLink { · 11 unmodified lines | ||
| 479 | 486 | AVFilterContext *dst; ///< dest filter |
| 480 | 487 | AVFilterPad *dstpad; ///< input pad on the dest filter |
| 481 | 488 | |
| 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 | − | |
| 489 | 489 | enum AVMediaType type; ///< filter media type |
| 490 | 490 | |
| 491 | 491 | /* These parameters apply only to video */ |
| @@ -498,28 +498,6 @@ struct AVFilterLink { · 6 unmodified lines | ||
| 498 | 498 | |
| 499 | 499 | int format; ///< agreed upon media format |
| 500 | 500 | |
| 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 | − | |
| 523 | 501 | /** |
| 524 | 502 | * Define the time base used by the PTS of the frames/samples |
| 525 | 503 | * which will pass through this link. |
| @@ -536,6 +514,16 @@ struct AVFilterLink { · 10 unmodified lines | ||
| 536 | 514 | * New public fields should be added right above. |
| 537 | 515 | ***************************************************************** |
| 538 | 516 | */ |
| 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 | + | |
| 539 | 527 | /** |
| 540 | 528 | * Lists of channel layouts and sample rates used for automatic |
| 541 | 529 | * negotiation. |
| @@ -554,6 +542,25 @@ struct AVFilterLink { · 12 unmodified lines | ||
| 554 | 542 | */ |
| 555 | 543 | int request_samples; |
| 556 | 544 | |
| 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 | + | |
| 557 | 564 | struct AVFilterPool *pool; |
| 558 | 565 | |
| 559 | 566 | /** |
| @@ -33,6 +33,7 @@ · 32 unmodified lines | ||
| 33 | 33 | #include "internal.h" |
| 34 | 34 | |
| 35 | 35 | #include "libavutil/audioconvert.h" |
| 36 | +#include "libavutil/avassert.h" | |
| 36 | 37 | #include "libavutil/log.h" |
| 37 | 38 | |
| 38 | 39 | static const AVClass filtergraph_class = { |
| @@ -648,7 +649,7 @@ static void swap_sample_fmts_on_filter(AVFilterContext *filter) · 609 unmodified lines | ||
| 648 | 649 | |
| 649 | 650 | for (i = 0; i < filter->nb_outputs; i++) { |
| 650 | 651 | AVFilterLink *outlink = filter->outputs[i]; |
| 651 | − int best_idx, best_score = INT_MIN; | |
| 652 | + int best_idx = -1, best_score = INT_MIN; | |
| 652 | 653 | |
| 653 | 654 | if (outlink->type != AVMEDIA_TYPE_AUDIO || |
| 654 | 655 | outlink->in_formats->format_count < 2) |
| @@ -681,6 +682,7 @@ static void swap_sample_fmts_on_filter(AVFilterContext *filter) · 26 unmodified lines | ||
| 681 | 682 | best_idx = j; |
| 682 | 683 | } |
| 683 | 684 | } |
| 685 | + av_assert0(best_idx >= 0); | |
| 684 | 686 | FFSWAP(int, outlink->in_formats->formats[0], |
| 685 | 687 | outlink->in_formats->formats[best_idx]); |
| 686 | 688 | } |
| @@ -55,7 +55,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 54 unmodified lines | ||
| 55 | 55 | FifoContext *fifo = ctx->priv; |
| 56 | 56 | fifo->last = &fifo->root; |
| 57 | 57 | |
| 58 | − av_log(ctx, AV_LOG_INFO, "\n"); | |
| 59 | 58 | return 0; |
| 60 | 59 | } |
| 61 | 60 | |
| @@ -167,7 +167,7 @@ static av_cold int movie_common_init(AVFilterContext *ctx, const char *args, · 166 unmodified lines | ||
| 167 | 167 | return ret; |
| 168 | 168 | } |
| 169 | 169 | |
| 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", | |
| 171 | 171 | movie->seek_point, movie->format_name, movie->file_name, |
| 172 | 172 | movie->stream_index); |
| 173 | 173 | |
| @@ -47,7 +47,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 46 unmodified lines | ||
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
| 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); | |
| 51 | 51 | return 0; |
| 52 | 52 | } |
| 53 | 53 | |
| @@ -69,7 +69,7 @@ static int setdar_config_props(AVFilterLink *inlink) · 15 unmodified lines | ||
| 69 | 69 | aspect->ratio.num * inlink->h, |
| 70 | 70 | aspect->ratio.den * inlink->w, 100); |
| 71 | 71 | |
| 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", | |
| 73 | 73 | inlink->w, inlink->h, dar.num, dar.den, aspect->ratio.num, aspect->ratio.den); |
| 74 | 74 | |
| 75 | 75 | inlink->sample_aspect_ratio = aspect->ratio; |
| @@ -66,7 +66,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 65 unmodified lines | ||
| 66 | 66 | if (args) |
| 67 | 67 | sscanf(args, "%u:%u", &blackframe->bamount, &blackframe->bthresh); |
| 68 | 68 | |
| 69 | − av_log(ctx, AV_LOG_INFO, "bamount:%u bthresh:%u\n", | |
| 69 | + av_log(ctx, AV_LOG_VERBOSE, "bamount:%u bthresh:%u\n", | |
| 70 | 70 | blackframe->bamount, blackframe->bthresh); |
| 71 | 71 | |
| 72 | 72 | if (blackframe->bamount > 100 || blackframe->bthresh > 255) { |
| @@ -224,7 +224,7 @@ static int config_input(AVFilterLink *link) · 223 unmodified lines | ||
| 224 | 224 | } else |
| 225 | 225 | crop->out_sar = link->sample_aspect_ratio; |
| 226 | 226 | |
| 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", | |
| 228 | 228 | link->w, link->h, link->sample_aspect_ratio.num, link->sample_aspect_ratio.den, |
| 229 | 229 | crop->w, crop->h, crop->out_sar.num, crop->out_sar.den); |
| 230 | 230 | |
| @@ -92,7 +92,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 91 unmodified lines | ||
| 92 | 92 | if (args) |
| 93 | 93 | sscanf(args, "%d:%d:%d", &cd->limit, &cd->round, &cd->reset_count); |
| 94 | 94 | |
| 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", | |
| 96 | 96 | cd->limit, cd->round, cd->reset_count); |
| 97 | 97 | |
| 98 | 98 | return 0; |
| @@ -87,7 +87,7 @@ static int config_input(AVFilterLink *inlink) · 86 unmodified lines | ||
| 87 | 87 | if (drawbox->w == 0) drawbox->w = inlink->w; |
| 88 | 88 | if (drawbox->h == 0) drawbox->h = inlink->h; |
| 89 | 89 | |
| 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", | |
| 91 | 91 | drawbox->x, drawbox->y, drawbox->w, drawbox->h, |
| 92 | 92 | drawbox->yuv_color[Y], drawbox->yuv_color[U], drawbox->yuv_color[V], drawbox->yuv_color[A]); |
| 93 | 93 | |
| @@ -126,7 +126,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 125 unmodified lines | ||
| 126 | 126 | } |
| 127 | 127 | fade->stop_frame = fade->start_frame + fade->nb_frames; |
| 128 | 128 | |
| 129 | − av_log(ctx, AV_LOG_INFO, | |
| 129 | + av_log(ctx, AV_LOG_VERBOSE, | |
| 130 | 130 | "type:%s start_frame:%d nb_frames:%d alpha:%d\n", |
| 131 | 131 | fade->type, fade->start_frame, fade->nb_frames, fade->alpha); |
| 132 | 132 | |
| @@ -58,7 +58,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 57 unmodified lines | ||
| 58 | 58 | return AVERROR(EINVAL); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | − av_log(ctx, AV_LOG_INFO, "output field order: %s\n", | |
| 61 | + av_log(ctx, AV_LOG_VERBOSE, "output field order: %s\n", | |
| 62 | 62 | fieldorder->dst_tff ? tff : bff); |
| 63 | 63 | |
| 64 | 64 | return 0; |
| @@ -146,7 +146,7 @@ static int set_params(AVFilterContext *ctx, const char *params) · 145 unmodified lines | ||
| 146 | 146 | return ret; |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | − av_log(ctx, AV_LOG_INFO, | |
| 149 | + av_log(ctx, AV_LOG_VERBOSE, | |
| 150 | 150 | "idx:%d name:'%s' type:%s explanation:'%s' ", |
| 151 | 151 | i, info.name, |
| 152 | 152 | info.type == F0R_PARAM_BOOL ? "bool" : |
| @@ -157,7 +157,7 @@ static int set_params(AVFilterContext *ctx, const char *params) · 4 unmodified lines | ||
| 157 | 157 | info.explanation); |
| 158 | 158 | |
| 159 | 159 | #ifdef DEBUG |
| 160 | − av_log(ctx, AV_LOG_INFO, "value:"); | |
| 160 | + av_log(ctx, AV_LOG_DEBUG, "value:"); | |
| 161 | 161 | switch (info.type) { |
| 162 | 162 | void *v; |
| 163 | 163 | double d; |
| @@ -168,31 +168,31 @@ static int set_params(AVFilterContext *ctx, const char *params) · 4 unmodified lines | ||
| 168 | 168 | case F0R_PARAM_BOOL: |
| 169 | 169 | v = &d; |
| 170 | 170 | 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"); | |
| 172 | 172 | break; |
| 173 | 173 | case F0R_PARAM_DOUBLE: |
| 174 | 174 | v = &d; |
| 175 | 175 | 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); | |
| 177 | 177 | break; |
| 178 | 178 | case F0R_PARAM_COLOR: |
| 179 | 179 | v = &col; |
| 180 | 180 | 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); | |
| 182 | 182 | break; |
| 183 | 183 | case F0R_PARAM_POSITION: |
| 184 | 184 | v = &pos; |
| 185 | 185 | 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); | |
| 187 | 187 | break; |
| 188 | 188 | default: /* F0R_PARAM_STRING */ |
| 189 | 189 | v = s; |
| 190 | 190 | 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); | |
| 192 | 192 | break; |
| 193 | 193 | } |
| 194 | 194 | #endif |
| 195 | − av_log(ctx, AV_LOG_INFO, "\n"); | |
| 195 | + av_log(ctx, AV_LOG_VERBOSE, "\n"); | |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | return 0; |
| @@ -266,7 +266,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, · 67 unmodified lines | ||
| 266 | 266 | return AVERROR(EINVAL); |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | − av_log(ctx, AV_LOG_INFO, | |
| 269 | + av_log(ctx, AV_LOG_VERBOSE, | |
| 270 | 270 | "name:%s author:'%s' explanation:'%s' color_model:%s " |
| 271 | 271 | "frei0r_version:%d version:%d.%d num_params:%d\n", |
| 272 | 272 | pi->name, pi->author, pi->explanation, |
| @@ -142,7 +142,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 141 unmodified lines | ||
| 142 | 142 | if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2) |
| 143 | 143 | gf->blur_line = ff_gradfun_blur_line_sse2; |
| 144 | 144 | |
| 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); | |
| 146 | 146 | |
| 147 | 147 | return 0; |
| 148 | 148 | } |
| @@ -238,7 +238,7 @@ static int init(AVFilterContext *ctx, const char *args) · 237 unmodified lines | ||
| 238 | 238 | } |
| 239 | 239 | } |
| 240 | 240 | |
| 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", | |
| 242 | 242 | LumSpac, ChromSpac, LumTmp, ChromTmp); |
| 243 | 243 | if (LumSpac < 0 || ChromSpac < 0 || isnan(ChromTmp)) { |
| 244 | 244 | av_log(ctx, AV_LOG_ERROR, |
| @@ -121,7 +121,7 @@ static av_cold int smooth_init(AVFilterContext *ctx, const char *args) · 120 unmodified lines | ||
| 121 | 121 | return AVERROR(EINVAL); |
| 122 | 122 | } |
| 123 | 123 | |
| 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", | |
| 125 | 125 | type_str, smooth->param1, smooth->param2, smooth->param3, smooth->param4); |
| 126 | 126 | return 0; |
| 127 | 127 | } |
| @@ -239,7 +239,7 @@ static int parse_iplconvkernel(IplConvKernel **kernel, char *buf, void *log_ctx) · 111 unmodified lines | ||
| 239 | 239 | if (!*kernel) |
| 240 | 240 | return AVERROR(ENOMEM); |
| 241 | 241 | |
| 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", | |
| 243 | 243 | rows, cols, anchor_x, anchor_y, shape_str); |
| 244 | 244 | return 0; |
| 245 | 245 | } |
| @@ -269,7 +269,7 @@ static av_cold int dilate_init(AVFilterContext *ctx, const char *args) · 23 unmodified lines | ||
| 269 | 269 | av_free(kernel_str); |
| 270 | 270 | |
| 271 | 271 | 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); | |
| 273 | 273 | if (dilate->nb_iterations <= 0) { |
| 274 | 274 | av_log(ctx, AV_LOG_ERROR, "Invalid non-positive value '%d' for nb_iterations\n", |
| 275 | 275 | dilate->nb_iterations); |
| @@ -245,7 +245,7 @@ static int config_input_overlay(AVFilterLink *inlink) · 244 unmodified lines | ||
| 245 | 245 | ff_fill_rgba_map(over->overlay_rgba_map, inlink->format) >= 0; |
| 246 | 246 | over->overlay_has_alpha = ff_fmt_is_in(inlink->format, alpha_pix_fmts); |
| 247 | 247 | |
| 248 | − av_log(ctx, AV_LOG_INFO, | |
| 248 | + av_log(ctx, AV_LOG_VERBOSE, | |
| 249 | 249 | "main w:%d h:%d fmt:%s overlay x:%d y:%d w:%d h:%d fmt:%s\n", |
| 250 | 250 | ctx->inputs[MAIN]->w, ctx->inputs[MAIN]->h, |
| 251 | 251 | av_pix_fmt_descriptors[ctx->inputs[MAIN]->format].name, |
| @@ -284,7 +284,7 @@ static int config_output(AVFilterLink *outlink) · 32 unmodified lines | ||
| 284 | 284 | av_gcd((int64_t)tb1.num * tb2.den, |
| 285 | 285 | (int64_t)tb2.num * tb1.den), |
| 286 | 286 | (int64_t)tb1.den * tb2.den, INT_MAX); |
| 287 | − av_log(ctx, AV_LOG_INFO, | |
| 287 | + av_log(ctx, AV_LOG_VERBOSE, | |
| 288 | 288 | "main_tb:%d/%d overlay_tb:%d/%d -> tb:%d/%d exact:%d\n", |
| 289 | 289 | tb1.num, tb1.den, tb2.num, tb2.den, tb->num, tb->den, exact); |
| 290 | 290 | if (!exact) |
| @@ -184,7 +184,7 @@ static int config_input(AVFilterLink *inlink) · 183 unmodified lines | ||
| 184 | 184 | pad->in_w = ff_draw_round_to_sub(&pad->draw, 0, -1, inlink->w); |
| 185 | 185 | pad->in_h = ff_draw_round_to_sub(&pad->draw, 1, -1, inlink->h); |
| 186 | 186 | |
| 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", | |
| 188 | 188 | inlink->w, inlink->h, pad->w, pad->h, pad->x, pad->y, |
| 189 | 189 | pad->rgba_color[0], pad->rgba_color[1], pad->rgba_color[2], pad->rgba_color[3]); |
| 190 | 190 | |
| @@ -85,7 +85,7 @@ static int config_input(AVFilterLink *inlink) · 84 unmodified lines | ||
| 85 | 85 | |
| 86 | 86 | setpts->var_values[VAR_TB] = av_q2d(inlink->time_base); |
| 87 | 87 | |
| 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]); | |
| 89 | 89 | return 0; |
| 90 | 90 | } |
| 91 | 91 | |
| @@ -88,7 +88,7 @@ static int config_output_props(AVFilterLink *outlink) · 87 unmodified lines | ||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | 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", | |
| 92 | 92 | inlink ->time_base.num, inlink ->time_base.den, |
| 93 | 93 | outlink->time_base.num, outlink->time_base.den); |
| 94 | 94 | |
| @@ -107,7 +107,7 @@ static int config_props_output(AVFilterLink *outlink) · 106 unmodified lines | ||
| 107 | 107 | } else |
| 108 | 108 | outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; |
| 109 | 109 | |
| 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", | |
| 111 | 111 | inlink->w, inlink->h, trans->dir, outlink->w, outlink->h, |
| 112 | 112 | trans->dir == 1 || trans->dir == 3 ? "clockwise" : "counterclockwise", |
| 113 | 113 | trans->dir == 0 || trans->dir == 3); |
| @@ -177,7 +177,7 @@ static void init_filter_param(AVFilterContext *ctx, FilterParam *fp, const char · 176 unmodified lines | ||
| 177 | 177 | |
| 178 | 178 | effect = fp->amount == 0 ? "none" : fp->amount < 0 ? "blur" : "sharpen"; |
| 179 | 179 | |
| 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", | |
| 181 | 181 | effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 65535.0); |
| 182 | 182 | |
| 183 | 183 | for (z = 0; z < 2 * fp->steps_y; z++) |
| @@ -417,7 +417,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 416 unmodified lines | ||
| 417 | 417 | else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) |
| 418 | 418 | yadif->filter_line = ff_yadif_filter_line_mmx; |
| 419 | 419 | |
| 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); | |
| 421 | 421 | |
| 422 | 422 | return 0; |
| 423 | 423 | } |
| @@ -135,7 +135,7 @@ static int color_config_props(AVFilterLink *inlink) · 134 unmodified lines | ||
| 135 | 135 | if (av_image_check_size(color->w, color->h, 0, ctx) < 0) |
| 136 | 136 | return AVERROR(EINVAL); |
| 137 | 137 | |
| 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", | |
| 139 | 139 | color->w, color->h, color->time_base.den, color->time_base.num, |
| 140 | 140 | color->color_rgba[0], color->color_rgba[1], color->color_rgba[2], color->color_rgba[3]); |
| 141 | 141 | inlink->w = color->w; |
| @@ -169,7 +169,7 @@ OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o id3v2enc.o · 168 unmodified lines | ||
| 169 | 169 | OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o |
| 170 | 170 | OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o |
| 171 | 171 | OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o |
| 172 | −OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o | |
| 172 | +OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o apetag.o | |
| 173 | 173 | OBJS-$(CONFIG_MPEG1SYSTEM_MUXER) += mpegenc.o |
| 174 | 174 | OBJS-$(CONFIG_MPEG1VCD_MUXER) += mpegenc.o |
| 175 | 175 | OBJS-$(CONFIG_MPEG2DVD_MUXER) += mpegenc.o |
| @@ -21,6 +21,7 @@ · 20 unmodified lines | ||
| 21 | 21 | |
| 22 | 22 | #include "libavcodec/get_bits.h" |
| 23 | 23 | #include "libavcodec/unary.h" |
| 24 | +#include "apetag.h" | |
| 24 | 25 | #include "avformat.h" |
| 25 | 26 | #include "internal.h" |
| 26 | 27 | #include "avio_internal.h" |
| @@ -242,6 +243,12 @@ static int mpc8_read_header(AVFormatContext *s) · 215 unmodified lines | ||
| 242 | 243 | if (size > 0) |
| 243 | 244 | avio_skip(pb, size); |
| 244 | 245 | |
| 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 | + | |
| 245 | 252 | return 0; |
| 246 | 253 | } |
| 247 | 254 | |
| @@ -165,6 +165,14 @@ int ff_neterrno(void) · 164 unmodified lines | ||
| 165 | 165 | return AVERROR(EAGAIN); |
| 166 | 166 | case WSAEINTR: |
| 167 | 167 | 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); | |
| 168 | 176 | } |
| 169 | 177 | return -err; |
| 170 | 178 | } |
| @@ -27,26 +27,27 @@ · 26 unmodified lines | ||
| 27 | 27 | #include "libavutil/error.h" |
| 28 | 28 | #include "os_support.h" |
| 29 | 29 | |
| 30 | +#if HAVE_UNISTD_H | |
| 31 | +#include <unistd.h> | |
| 32 | +#endif | |
| 33 | + | |
| 30 | 34 | #if HAVE_WINSOCK2_H |
| 31 | 35 | #include <winsock2.h> |
| 32 | 36 | #include <ws2tcpip.h> |
| 33 | 37 | |
| 34 | −#ifdef EPROTONOSUPPORT | |
| 35 | −# undef EPROTONOSUPPORT | |
| 36 | −#endif | |
| 38 | +#ifndef EPROTONOSUPPORT | |
| 37 | 39 | #define EPROTONOSUPPORT WSAEPROTONOSUPPORT |
| 38 | −#ifdef ETIMEDOUT | |
| 39 | −# undef ETIMEDOUT | |
| 40 | 40 | #endif |
| 41 | +#ifndef ETIMEDOUT | |
| 41 | 42 | #define ETIMEDOUT WSAETIMEDOUT |
| 42 | −#ifdef ECONNREFUSED | |
| 43 | −# undef ECONNREFUSED | |
| 44 | 43 | #endif |
| 44 | +#ifndef ECONNREFUSED | |
| 45 | 45 | #define ECONNREFUSED WSAECONNREFUSED |
| 46 | −#ifdef EINPROGRESS | |
| 47 | −# undef EINPROGRESS | |
| 48 | 46 | #endif |
| 47 | +#ifndef EINPROGRESS | |
| 49 | 48 | #define EINPROGRESS WSAEINPROGRESS |
| 49 | +#endif | |
| 50 | + | |
| 50 | 51 | #define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e) |
| 51 | 52 | #define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e) |
| 52 | 53 | |
| @@ -59,7 +59,9 @@ int ff_win32_open(const char *filename_utf8, int oflag, int pmode) · 58 unmodified lines | ||
| 59 | 59 | #if CONFIG_NETWORK |
| 60 | 60 | #include <fcntl.h> |
| 61 | 61 | #if !HAVE_POLL_H |
| 62 | +#if HAVE_SYS_TIME_H | |
| 62 | 63 | #include <sys/time.h> |
| 64 | +#endif | |
| 63 | 65 | #if HAVE_WINSOCK2_H |
| 64 | 66 | #include <winsock2.h> |
| 65 | 67 | #elif HAVE_SYS_SELECT_H |
| @@ -39,7 +39,6 @@ · 38 unmodified lines | ||
| 39 | 39 | |
| 40 | 40 | #include <netinet/in.h> |
| 41 | 41 | #include <netinet/sctp.h> |
| 42 | −#include <unistd.h> | |
| 43 | 42 | |
| 44 | 43 | #include "config.h" |
| 45 | 44 | |
| @@ -20,7 +20,6 @@ · 19 unmodified lines | ||
| 20 | 20 | */ |
| 21 | 21 | #include "avformat.h" |
| 22 | 22 | #include "libavutil/parseutils.h" |
| 23 | −#include <unistd.h> | |
| 24 | 23 | #include "internal.h" |
| 25 | 24 | #include "network.h" |
| 26 | 25 | #include "os_support.h" |
| @@ -32,7 +32,6 @@ · 31 unmodified lines | ||
| 32 | 32 | #include "libavutil/fifo.h" |
| 33 | 33 | #include "libavutil/intreadwrite.h" |
| 34 | 34 | #include "libavutil/avstring.h" |
| 35 | −#include <unistd.h> | |
| 36 | 35 | #include "internal.h" |
| 37 | 36 | #include "network.h" |
| 38 | 37 | #include "os_support.h" |
| @@ -38,9 +38,12 @@ extern void ff_conv_flt_to_s16_sse2(int16_t *dst, const float *src, int len); · 37 unmodified lines | ||
| 38 | 38 | extern void ff_conv_flt_to_s32_sse2(int32_t *dst, const float *src, int len); |
| 39 | 39 | extern void ff_conv_flt_to_s32_avx (int32_t *dst, const float *src, int len); |
| 40 | 40 | |
| 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); | |
| 44 | 47 | |
| 45 | 48 | av_cold void ff_audio_convert_init_x86(AudioConvert *ac) |
| 46 | 49 | { |
| @@ -33,9 +33,11 @@ · 32 unmodified lines | ||
| 33 | 33 | #endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM*/ |
| 34 | 34 | |
| 35 | 35 | #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 | |
| 39 | 41 | |
| 40 | 42 | #if !HAVE_EXP2 |
| 41 | 43 | #undef exp2 |