1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-17 20:17:55 +02:00

Merge commit '28c8e288fa0342fdef532a7522a4707bebf831cc'

* commit '28c8e288fa0342fdef532a7522a4707bebf831cc':
  x86: h264_chromamc: port to cpuflags
  yop: fix typo
  avconv: fix copying per-stream metadata.
  doc: avtools-common-opts: Fix terminology concerning metric prefixes
  configure: suncc: Add compiler arch support for Nehalem & Sandy Bridge
  riff: Make ff_riff_tags static and move under appropriate #ifdef

Conflicts:
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-26 00:43:45 +01:00
commit bf2f93cdbf
5 changed files with 65 additions and 59 deletions

4
configure vendored
View File

@ -2458,6 +2458,8 @@ suncc_flags(){
prescott|nocona) echo -xarch=sse3 -xchip=pentium4 ;; prescott|nocona) echo -xarch=sse3 -xchip=pentium4 ;;
*-sse3) echo -xarch=sse3 ;; *-sse3) echo -xarch=sse3 ;;
core2) echo -xarch=ssse3 -xchip=core2 ;; 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 ;; amdfam10|barcelona|bdver*) echo -xarch=sse4_1 ;;
athlon-4|athlon-[mx]p) echo -xarch=ssea ;; athlon-4|athlon-[mx]p) echo -xarch=ssea ;;
k8|opteron|athlon64|athlon-fx) k8|opteron|athlon64|athlon-fx)
@ -2955,7 +2957,7 @@ elif enabled x86; then
disable cmov disable cmov
;; ;;
# targets that do support conditional mov (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" cpuflags="-march=$cpu"
enable cmov enable cmov
enable fast_cmov enable fast_cmov

View File

@ -1,10 +1,11 @@
All the numerical options, if not specified otherwise, accept in input All the numerical options, if not specified otherwise, accept in input
a string representing a number, which may contain one of the a string representing a number, which may contain one of the
International System number postfixes, for example 'K', 'M', 'G'. SI unit prefixes, for example 'K', 'M', 'G'.
If 'i' is appended after the postfix, powers of 2 are used instead of If 'i' is appended after the prefix, binary prefixes are used,
powers of 10. The 'B' postfix multiplies the value for 8, and can be which are based on powers of 1024 instead of powers of 1000.
appended after another postfix or used alone. This allows using for The 'B' postfix multiplies the value by 8, and can be
example 'KB', 'MiB', 'G' and 'B' as postfix. 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 Options which do not take arguments are boolean options, and set the
corresponding value to true. They can be set to false by prefixing corresponding value to true. They can be set to false by prefixing

View File

@ -456,9 +456,9 @@ static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFor
METADATA_CHECK_INDEX(index, context->nb_programs, "program")\ METADATA_CHECK_INDEX(index, context->nb_programs, "program")\
meta = &context->programs[index]->metadata;\ meta = &context->programs[index]->metadata;\
break;\ break;\
default: av_assert0(0);\
case 's':\ case 's':\
break;\ break; /* handled separately below */ \
default: av_assert0(0);\
}\ }\
SET_DICT(type_in, meta_in, ic, idx_in); SET_DICT(type_in, meta_in, ic, idx_in);

View File

@ -89,7 +89,7 @@ SECTION .text
jne .next4rows jne .next4rows
%endmacro %endmacro
%macro chroma_mc8_mmx_func 3 %macro chroma_mc8_mmx_func 2-3
%ifidn %2, rv40 %ifidn %2, rv40
%ifdef PIC %ifdef PIC
%define rnd_1d_rv40 r8 %define rnd_1d_rv40 r8
@ -103,9 +103,9 @@ SECTION .text
%else %else
%define extra_regs 0 %define extra_regs 0
%endif ; rv40 %endif ; rv40
; put/avg_h264_chroma_mc8_mmx_*(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/, ; put/avg_h264_chroma_mc8_*(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/,
; int stride, int h, int mx, int my) ; int stride, int h, int mx, int my)
cglobal %1_%2_chroma_mc8_%3, 6, 7 + extra_regs, 0 cglobal %1_%2_chroma_mc8%3, 6, 7 + extra_regs, 0
%if ARCH_X86_64 %if ARCH_X86_64
movsxd r2, r2d movsxd r2, r2d
%endif %endif
@ -282,14 +282,14 @@ cglobal %1_%2_chroma_mc8_%3, 6, 7 + extra_regs, 0
RET RET
%endmacro %endmacro
%macro chroma_mc4_mmx_func 3 %macro chroma_mc4_mmx_func 2
%define extra_regs 0 %define extra_regs 0
%ifidn %2, rv40 %ifidn %2, rv40
%ifdef PIC %ifdef PIC
%define extra_regs 1 %define extra_regs 1
%endif ; PIC %endif ; PIC
%endif ; rv40 %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 %if ARCH_X86_64
movsxd r2, r2d movsxd r2, r2d
%endif %endif
@ -373,8 +373,8 @@ cglobal %1_%2_chroma_mc4_%3, 6, 6 + extra_regs, 0
REP_RET REP_RET
%endmacro %endmacro
%macro chroma_mc2_mmx_func 3 %macro chroma_mc2_mmx_func 2
cglobal %1_%2_chroma_mc2_%3, 6, 7, 0 cglobal %1_%2_chroma_mc2, 6, 7, 0
%if ARCH_X86_64 %if ARCH_X86_64
movsxd r2, r2d movsxd r2, r2d
%endif %endif
@ -434,35 +434,38 @@ cglobal %1_%2_chroma_mc2_%3, 6, 7, 0
PAVG %1, %2 PAVG %1, %2
%endmacro %endmacro
INIT_MMX INIT_MMX mmx
%define CHROMAMC_AVG NOTHING %define CHROMAMC_AVG NOTHING
%define CHROMAMC_AVG4 NOTHING %define CHROMAMC_AVG4 NOTHING
chroma_mc8_mmx_func put, h264, rnd_mmx chroma_mc8_mmx_func put, h264, _rnd
chroma_mc8_mmx_func put, vc1, nornd_mmx chroma_mc8_mmx_func put, vc1, _nornd
chroma_mc8_mmx_func put, rv40, mmx chroma_mc8_mmx_func put, rv40
chroma_mc4_mmx_func put, h264, mmx chroma_mc4_mmx_func put, h264
chroma_mc4_mmx_func put, rv40, mmx chroma_mc4_mmx_func put, rv40
chroma_mc2_mmx_func put, h264, mmxext
INIT_MMX mmxext
chroma_mc2_mmx_func put, h264
%define CHROMAMC_AVG DIRECT_AVG %define CHROMAMC_AVG DIRECT_AVG
%define CHROMAMC_AVG4 COPY_AVG %define CHROMAMC_AVG4 COPY_AVG
%define PAVG pavgb %define PAVG pavgb
chroma_mc8_mmx_func avg, h264, rnd_mmxext chroma_mc8_mmx_func avg, h264, _rnd
chroma_mc8_mmx_func avg, vc1, nornd_mmxext chroma_mc8_mmx_func avg, vc1, _nornd
chroma_mc8_mmx_func avg, rv40, mmxext chroma_mc8_mmx_func avg, rv40
chroma_mc4_mmx_func avg, h264, mmxext chroma_mc4_mmx_func avg, h264
chroma_mc4_mmx_func avg, rv40, mmxext chroma_mc4_mmx_func avg, rv40
chroma_mc2_mmx_func avg, h264, mmxext chroma_mc2_mmx_func avg, h264
%define PAVG pavgusb %define PAVG pavgusb
chroma_mc8_mmx_func avg, h264, rnd_3dnow INIT_MMX 3dnow
chroma_mc8_mmx_func avg, vc1, nornd_3dnow chroma_mc8_mmx_func avg, h264, _rnd
chroma_mc8_mmx_func avg, rv40, 3dnow chroma_mc8_mmx_func avg, vc1, _nornd
chroma_mc4_mmx_func avg, h264, 3dnow chroma_mc8_mmx_func avg, rv40
chroma_mc4_mmx_func avg, rv40, 3dnow chroma_mc4_mmx_func avg, h264
chroma_mc4_mmx_func avg, rv40
%macro chroma_mc8_ssse3_func 3 %macro chroma_mc8_ssse3_func 2-3
cglobal %1_%2_chroma_mc8_%3, 6, 7, 8 cglobal %1_%2_chroma_mc8%3, 6, 7, 8
%if ARCH_X86_64 %if ARCH_X86_64
movsxd r2, r2d movsxd r2, r2d
%endif %endif
@ -609,8 +612,8 @@ cglobal %1_%2_chroma_mc8_%3, 6, 7, 8
REP_RET REP_RET
%endmacro %endmacro
%macro chroma_mc4_ssse3_func 3 %macro chroma_mc4_ssse3_func 2
cglobal %1_%2_chroma_mc4_%3, 6, 7, 0 cglobal %1_%2_chroma_mc4, 6, 7, 0
%if ARCH_X86_64 %if ARCH_X86_64
movsxd r2, r2d movsxd r2, r2d
%endif %endif
@ -663,16 +666,16 @@ cglobal %1_%2_chroma_mc4_%3, 6, 7, 0
%endmacro %endmacro
%define CHROMAMC_AVG NOTHING %define CHROMAMC_AVG NOTHING
INIT_XMM INIT_XMM ssse3
chroma_mc8_ssse3_func put, h264, rnd_ssse3 chroma_mc8_ssse3_func put, h264, _rnd
chroma_mc8_ssse3_func put, vc1, nornd_ssse3 chroma_mc8_ssse3_func put, vc1, _nornd
INIT_MMX INIT_MMX ssse3
chroma_mc4_ssse3_func put, h264, ssse3 chroma_mc4_ssse3_func put, h264
%define CHROMAMC_AVG DIRECT_AVG %define CHROMAMC_AVG DIRECT_AVG
%define PAVG pavgb %define PAVG pavgb
INIT_XMM INIT_XMM ssse3
chroma_mc8_ssse3_func avg, h264, rnd_ssse3 chroma_mc8_ssse3_func avg, h264, _rnd
chroma_mc8_ssse3_func avg, vc1, nornd_ssse3 chroma_mc8_ssse3_func avg, vc1, _nornd
INIT_MMX INIT_MMX ssse3
chroma_mc4_ssse3_func avg, h264, ssse3 chroma_mc4_ssse3_func avg, h264

View File

@ -417,13 +417,6 @@ const AVMetadataConv ff_riff_info_conv[] = {
{ 0 }, { 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 #if CONFIG_MUXERS
int64_t ff_start_tag(AVIOContext *pb, const char *tag) 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) static int riff_has_valid_tags(AVFormatContext *s)
{ {
int i; int i;
for (i = 0; *ff_riff_tags[i]; i++) { for (i = 0; *riff_tags[i]; i++) {
if (av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE)) if (av_dict_get(s->metadata, riff_tags[i], NULL, AV_DICT_MATCH_CASE))
return 1; return 1;
} }
@ -667,8 +667,8 @@ void ff_riff_write_info(AVFormatContext *s)
list_pos = ff_start_tag(pb, "LIST"); list_pos = ff_start_tag(pb, "LIST");
ffio_wfourcc(pb, "INFO"); ffio_wfourcc(pb, "INFO");
for (i = 0; *ff_riff_tags[i]; i++) { for (i = 0; *riff_tags[i]; i++) {
if ((t = av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE))) 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_riff_write_info_tag(s->pb, t->key, t->value);
} }
ff_end_tag(pb, list_pos); ff_end_tag(pb, list_pos);