diff --git a/configure b/configure index a4d2d69053..85c2a86507 100755 --- a/configure +++ b/configure @@ -2458,6 +2458,8 @@ suncc_flags(){ prescott|nocona) echo -xarch=sse3 -xchip=pentium4 ;; *-sse3) echo -xarch=sse3 ;; core2) echo -xarch=ssse3 -xchip=core2 ;; + corei7) echo -xarch=sse4_2 -xchip=nehalem ;; + corei7-avx) echo -xarch=avx -xchip=sandybridge ;; amdfam10|barcelona|bdver*) echo -xarch=sse4_1 ;; athlon-4|athlon-[mx]p) echo -xarch=ssea ;; k8|opteron|athlon64|athlon-fx) @@ -2955,7 +2957,7 @@ elif enabled x86; then disable cmov ;; # targets that do support conditional mov (cmov) - i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx|core2|amdfam10|barcelona|atom|bdver*) + i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx|core2|corei7*|amdfam10|barcelona|atom|bdver*) cpuflags="-march=$cpu" enable cmov enable fast_cmov diff --git a/doc/avtools-common-opts.texi b/doc/avtools-common-opts.texi index d43ff6e015..bce5220274 100644 --- a/doc/avtools-common-opts.texi +++ b/doc/avtools-common-opts.texi @@ -1,10 +1,11 @@ All the numerical options, if not specified otherwise, accept in input a string representing a number, which may contain one of the -International System number postfixes, for example 'K', 'M', 'G'. -If 'i' is appended after the postfix, powers of 2 are used instead of -powers of 10. The 'B' postfix multiplies the value for 8, and can be -appended after another postfix or used alone. This allows using for -example 'KB', 'MiB', 'G' and 'B' as postfix. +SI unit prefixes, for example 'K', 'M', 'G'. +If 'i' is appended after the prefix, binary prefixes are used, +which are based on powers of 1024 instead of powers of 1000. +The 'B' postfix multiplies the value by 8, and can be +appended after a unit prefix or used alone. This allows using for +example 'KB', 'MiB', 'G' and 'B' as number postfix. Options which do not take arguments are boolean options, and set the corresponding value to true. They can be set to false by prefixing diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 09b4aaf361..612bdc65fb 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -456,9 +456,9 @@ 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);\ case 's':\ - break;\ + break; /* handled separately below */ \ + default: av_assert0(0);\ }\ SET_DICT(type_in, meta_in, ic, idx_in); diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm index ee6c4123dd..7f5be7521f 100644 --- a/libavcodec/x86/h264_chromamc.asm +++ b/libavcodec/x86/h264_chromamc.asm @@ -89,7 +89,7 @@ SECTION .text jne .next4rows %endmacro -%macro chroma_mc8_mmx_func 3 +%macro chroma_mc8_mmx_func 2-3 %ifidn %2, rv40 %ifdef PIC %define rnd_1d_rv40 r8 @@ -103,9 +103,9 @@ SECTION .text %else %define extra_regs 0 %endif ; rv40 -; put/avg_h264_chroma_mc8_mmx_*(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/, -; int stride, int h, int mx, int my) -cglobal %1_%2_chroma_mc8_%3, 6, 7 + extra_regs, 0 +; put/avg_h264_chroma_mc8_*(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/, +; int stride, int h, int mx, int my) +cglobal %1_%2_chroma_mc8%3, 6, 7 + extra_regs, 0 %if ARCH_X86_64 movsxd r2, r2d %endif @@ -282,14 +282,14 @@ cglobal %1_%2_chroma_mc8_%3, 6, 7 + extra_regs, 0 RET %endmacro -%macro chroma_mc4_mmx_func 3 +%macro chroma_mc4_mmx_func 2 %define extra_regs 0 %ifidn %2, rv40 %ifdef PIC %define extra_regs 1 %endif ; PIC %endif ; rv40 -cglobal %1_%2_chroma_mc4_%3, 6, 6 + extra_regs, 0 +cglobal %1_%2_chroma_mc4, 6, 6 + extra_regs, 0 %if ARCH_X86_64 movsxd r2, r2d %endif @@ -373,8 +373,8 @@ cglobal %1_%2_chroma_mc4_%3, 6, 6 + extra_regs, 0 REP_RET %endmacro -%macro chroma_mc2_mmx_func 3 -cglobal %1_%2_chroma_mc2_%3, 6, 7, 0 +%macro chroma_mc2_mmx_func 2 +cglobal %1_%2_chroma_mc2, 6, 7, 0 %if ARCH_X86_64 movsxd r2, r2d %endif @@ -434,35 +434,38 @@ cglobal %1_%2_chroma_mc2_%3, 6, 7, 0 PAVG %1, %2 %endmacro -INIT_MMX +INIT_MMX mmx %define CHROMAMC_AVG NOTHING %define CHROMAMC_AVG4 NOTHING -chroma_mc8_mmx_func put, h264, rnd_mmx -chroma_mc8_mmx_func put, vc1, nornd_mmx -chroma_mc8_mmx_func put, rv40, mmx -chroma_mc4_mmx_func put, h264, mmx -chroma_mc4_mmx_func put, rv40, mmx -chroma_mc2_mmx_func put, h264, mmxext +chroma_mc8_mmx_func put, h264, _rnd +chroma_mc8_mmx_func put, vc1, _nornd +chroma_mc8_mmx_func put, rv40 +chroma_mc4_mmx_func put, h264 +chroma_mc4_mmx_func put, rv40 + +INIT_MMX mmxext +chroma_mc2_mmx_func put, h264 %define CHROMAMC_AVG DIRECT_AVG %define CHROMAMC_AVG4 COPY_AVG %define PAVG pavgb -chroma_mc8_mmx_func avg, h264, rnd_mmxext -chroma_mc8_mmx_func avg, vc1, nornd_mmxext -chroma_mc8_mmx_func avg, rv40, mmxext -chroma_mc4_mmx_func avg, h264, mmxext -chroma_mc4_mmx_func avg, rv40, mmxext -chroma_mc2_mmx_func avg, h264, mmxext +chroma_mc8_mmx_func avg, h264, _rnd +chroma_mc8_mmx_func avg, vc1, _nornd +chroma_mc8_mmx_func avg, rv40 +chroma_mc4_mmx_func avg, h264 +chroma_mc4_mmx_func avg, rv40 +chroma_mc2_mmx_func avg, h264 %define PAVG pavgusb -chroma_mc8_mmx_func avg, h264, rnd_3dnow -chroma_mc8_mmx_func avg, vc1, nornd_3dnow -chroma_mc8_mmx_func avg, rv40, 3dnow -chroma_mc4_mmx_func avg, h264, 3dnow -chroma_mc4_mmx_func avg, rv40, 3dnow +INIT_MMX 3dnow +chroma_mc8_mmx_func avg, h264, _rnd +chroma_mc8_mmx_func avg, vc1, _nornd +chroma_mc8_mmx_func avg, rv40 +chroma_mc4_mmx_func avg, h264 +chroma_mc4_mmx_func avg, rv40 -%macro chroma_mc8_ssse3_func 3 -cglobal %1_%2_chroma_mc8_%3, 6, 7, 8 +%macro chroma_mc8_ssse3_func 2-3 +cglobal %1_%2_chroma_mc8%3, 6, 7, 8 %if ARCH_X86_64 movsxd r2, r2d %endif @@ -609,8 +612,8 @@ cglobal %1_%2_chroma_mc8_%3, 6, 7, 8 REP_RET %endmacro -%macro chroma_mc4_ssse3_func 3 -cglobal %1_%2_chroma_mc4_%3, 6, 7, 0 +%macro chroma_mc4_ssse3_func 2 +cglobal %1_%2_chroma_mc4, 6, 7, 0 %if ARCH_X86_64 movsxd r2, r2d %endif @@ -663,16 +666,16 @@ cglobal %1_%2_chroma_mc4_%3, 6, 7, 0 %endmacro %define CHROMAMC_AVG NOTHING -INIT_XMM -chroma_mc8_ssse3_func put, h264, rnd_ssse3 -chroma_mc8_ssse3_func put, vc1, nornd_ssse3 -INIT_MMX -chroma_mc4_ssse3_func put, h264, ssse3 +INIT_XMM ssse3 +chroma_mc8_ssse3_func put, h264, _rnd +chroma_mc8_ssse3_func put, vc1, _nornd +INIT_MMX ssse3 +chroma_mc4_ssse3_func put, h264 %define CHROMAMC_AVG DIRECT_AVG %define PAVG pavgb -INIT_XMM -chroma_mc8_ssse3_func avg, h264, rnd_ssse3 -chroma_mc8_ssse3_func avg, vc1, nornd_ssse3 -INIT_MMX -chroma_mc4_ssse3_func avg, h264, ssse3 +INIT_XMM ssse3 +chroma_mc8_ssse3_func avg, h264, _rnd +chroma_mc8_ssse3_func avg, vc1, _nornd +INIT_MMX ssse3 +chroma_mc4_ssse3_func avg, h264 diff --git a/libavformat/riff.c b/libavformat/riff.c index bae7f8aea0..0cb1694d88 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -417,13 +417,6 @@ const AVMetadataConv ff_riff_info_conv[] = { { 0 }, }; -const char ff_riff_tags[][5] = { - "IARL", "IART", "ICMS", "ICMT", "ICOP", "ICRD", "ICRP", "IDIM", "IDPI", - "IENG", "IGNR", "IKEY", "ILGT", "ILNG", "IMED", "INAM", "IPLT", "IPRD", - "IPRT", "ISBJ", "ISFT", "ISHP", "ISMP", "ISRC", "ISRF", "ITCH", - {0} -}; - #if CONFIG_MUXERS int64_t ff_start_tag(AVIOContext *pb, const char *tag) { @@ -640,12 +633,19 @@ void ff_riff_write_info_tag(AVIOContext *pb, const char *tag, const char *str) } } +static const char riff_tags[][5] = { + "IARL", "IART", "ICMS", "ICMT", "ICOP", "ICRD", "ICRP", "IDIM", "IDPI", + "IENG", "IGNR", "IKEY", "ILGT", "ILNG", "IMED", "INAM", "IPLT", "IPRD", + "IPRT", "ISBJ", "ISFT", "ISHP", "ISMP", "ISRC", "ISRF", "ITCH", + {0} +}; + static int riff_has_valid_tags(AVFormatContext *s) { int i; - for (i = 0; *ff_riff_tags[i]; i++) { - if (av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE)) + for (i = 0; *riff_tags[i]; i++) { + if (av_dict_get(s->metadata, riff_tags[i], NULL, AV_DICT_MATCH_CASE)) return 1; } @@ -667,8 +667,8 @@ void ff_riff_write_info(AVFormatContext *s) list_pos = ff_start_tag(pb, "LIST"); ffio_wfourcc(pb, "INFO"); - for (i = 0; *ff_riff_tags[i]; i++) { - if ((t = av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE))) + for (i = 0; *riff_tags[i]; i++) { + if ((t = av_dict_get(s->metadata, riff_tags[i], NULL, AV_DICT_MATCH_CASE))) ff_riff_write_info_tag(s->pb, t->key, t->value); } ff_end_tag(pb, list_pos);