summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-15 11:12:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-15 11:12:25 +0100
commit4d941eac1655b21af33c6e4d52b7bfd7f9e5b990 (patch)
tree54fb5dafa6b702dc50fe5bd3691ec44679acf055
parent62006b539ddda23594febf0fcb2f21c03de60457 (diff)
parent3b4296f41473a5b39e84d7a49d480624c9c60040 (diff)
downloadffmpeg-4d941eac1655b21af33c6e4d52b7bfd7f9e5b990.tar.gz
Merge commit '3b4296f41473a5b39e84d7a49d480624c9c60040'
* commit '3b4296f41473a5b39e84d7a49d480624c9c60040': avformat: clarify stream id for muxing fate: Add dependencies for aac, alac, amrnb, amrwb, atrac tests ppc: do not pass redundant compiler flags avutil: change GET_UTF8 to not use av_log2() segment: fix NULL pointer dereference in seg_write_header() Conflicts: tests/fate/aac.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure10
-rw-r--r--libavformat/avformat.h2
-rw-r--r--libavutil/common.h9
-rw-r--r--tests/fate/aac.mak11
-rw-r--r--tests/fate/alac.mak2
-rw-r--r--tests/fate/amrnb.mak2
-rw-r--r--tests/fate/amrwb.mak2
-rw-r--r--tests/fate/atrac.mak8
8 files changed, 27 insertions, 19 deletions
diff --git a/configure b/configure
index 1a0ab6eafe..e89815967d 100755
--- a/configure
+++ b/configure
@@ -2778,20 +2778,20 @@ elif enabled ppc; then
disable altivec
;;
g3|75*|ppc75*|powerpc75*)
- cpuflags="-mcpu=750 -mpowerpc-gfxopt"
+ cpuflags="-mcpu=750"
disable altivec
;;
g4|745*|ppc745*|powerpc745*)
- cpuflags="-mcpu=7450 -mpowerpc-gfxopt"
+ cpuflags="-mcpu=7450"
;;
74*|ppc74*|powerpc74*)
- cpuflags="-mcpu=7400 -mpowerpc-gfxopt"
+ cpuflags="-mcpu=7400"
;;
g5|970|ppc970|powerpc970)
- cpuflags="-mcpu=970 -mpowerpc-gfxopt -mpowerpc64"
+ cpuflags="-mcpu=970"
;;
power[3-7]*)
- cpuflags="-mcpu=$cpu -mpowerpc-gfxopt -mpowerpc64"
+ cpuflags="-mcpu=$cpu"
;;
cell)
cpuflags="-mcpu=cell"
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 61bc4a6327..dd9df4ed3d 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -641,7 +641,7 @@ typedef struct AVStream {
/**
* Format-specific stream ID.
* decoding: set by libavformat
- * encoding: set by the user
+ * encoding: set by the user, replaced by libavformat if left unset
*/
int id;
/**
diff --git a/libavutil/common.h b/libavutil/common.h
index 03a2354db4..0f36309fa9 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -271,16 +271,17 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x)
#define GET_UTF8(val, GET_BYTE, ERROR)\
val= GET_BYTE;\
{\
- int ones= 7 - av_log2(val ^ 255);\
- if(ones==1)\
+ uint32_t top = (val & 128) >> 1;\
+ if ((val & 0xc0) == 0x80)\
ERROR\
- val&= 127>>ones;\
- while(--ones > 0){\
+ while (val & top) {\
int tmp= GET_BYTE - 128;\
if(tmp>>6)\
ERROR\
val= (val<<6) + tmp;\
+ top <<= 5;\
}\
+ val &= (top << 1) - 1;\
}
/**
diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 2fdf74f18c..c5c47e6e72 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -53,9 +53,10 @@ fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16
fate-aac-ct%: CMD = pcm -i $(SAMPLES)/aac/CT_DecoderCheck/$(@:fate-aac-ct-%=%)
fate-aac-ct%: REF = $(SAMPLES)/aac/CT_DecoderCheck/aacPlusv2.wav
+FATE_AAC_CT_RAW = fate-aac-ct-sbr_i-ps_i.aac
+
FATE_AAC_CT = sbr_bc-ps_i.3gp \
sbr_bic-ps_i.3gp \
- sbr_i-ps_i.aac \
sbr_bc-ps_bc.mp4 \
sbr_bc-ps_i.mp4 \
sbr_i-ps_bic.mp4 \
@@ -88,7 +89,11 @@ FATE_AAC_LATM += fate-aac-latm_stereo_to_51
fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1
fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16
-FATE_AAC_ALL = $(FATE_AAC) $(FATE_AAC_LATM)
+FATE_AAC-$(call DEMDEC, AAC, AAC) += $(FATE_AAC_CT_RAW)
+FATE_AAC-$(call DEMDEC, MOV, AAC) += $(FATE_AAC)
+FATE_AAC_LATM-$(call DEMDEC, MPEGTS, AAC_LATM) += $(FATE_AAC_LATM)
+
+FATE_AAC_ALL = $(FATE_AAC-yes) $(FATE_AAC_LATM-yes)
$(FATE_AAC_ALL): CMP = oneoff
$(FATE_AAC_ALL): FUZZ = 2
@@ -96,4 +101,4 @@ $(FATE_AAC_ALL): FUZZ = 2
FATE_SAMPLES_FFMPEG += $(FATE_AAC_ALL) $(FATE_AAC_ENCODE)
fate-aac: $(FATE_AAC_ALL) $(FATE_AAC_ENCODE)
-fate-aac-latm: $(FATE_AAC_LATM)
+fate-aac-latm: $(FATE_AAC_LATM-yes)
diff --git a/tests/fate/alac.mak b/tests/fate/alac.mak
index b55b5949b6..814a5b7c11 100644
--- a/tests/fate/alac.mak
+++ b/tests/fate/alac.mak
@@ -11,5 +11,5 @@ fate-alac-%: CMD = enc_dec_pcm mov wav s16le $(REF) -c alac $(OPTS)
fate-alac-%: CMP = oneoff
fate-alac-%: FUZZ = 0
-FATE_SAMPLES_AVCONV += $(FATE_ALAC)
+FATE_SAMPLES_AVCONV-$(call ENCDEC, ALAC, MOV) += $(FATE_ALAC)
fate-alac: $(FATE_ALAC)
diff --git a/tests/fate/amrnb.mak b/tests/fate/amrnb.mak
index 6e3f2a4b62..6dbba58771 100644
--- a/tests/fate/amrnb.mak
+++ b/tests/fate/amrnb.mak
@@ -32,5 +32,5 @@ fate-amrnb-12k2: REF = $(SAMPLES)/amrnb/12.2k.pcm
$(FATE_AMRNB): CMP = stddev
-FATE_SAMPLES_AVCONV += $(FATE_AMRNB)
+FATE_SAMPLES_AVCONV-$(call DEMDEC, AMR, AMRNB) += $(FATE_AMRNB)
fate-amrnb: $(FATE_AMRNB)
diff --git a/tests/fate/amrwb.mak b/tests/fate/amrwb.mak
index 0b7be7216d..99c27376a2 100644
--- a/tests/fate/amrwb.mak
+++ b/tests/fate/amrwb.mak
@@ -43,5 +43,5 @@ fate-amrwb-23k85-2: REF = $(SAMPLES)/amrwb/deus-23k85.pcm
$(FATE_AMRWB): CMP = stddev
-FATE_SAMPLES_AVCONV += $(FATE_AMRWB)
+FATE_SAMPLES_AVCONV-$(call DEMDEC, AMR, AMRWB) += $(FATE_AMRWB)
fate-amrwb: $(FATE_AMRWB)
diff --git a/tests/fate/atrac.mak b/tests/fate/atrac.mak
index 39b788a1ca..3ac5553685 100644
--- a/tests/fate/atrac.mak
+++ b/tests/fate/atrac.mak
@@ -1,4 +1,4 @@
-FATE_ATRAC1 += fate-atrac1
+FATE_ATRAC1-$(call DEMDEC, AEA, ATRAC1) += fate-atrac1
fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea
fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm
@@ -14,11 +14,13 @@ FATE_ATRAC3 += fate-atrac3-3
fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav
fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm
-FATE_ATRAC_ALL = $(FATE_ATRAC1) $(FATE_ATRAC3)
+FATE_ATRAC3-$(call DEMDEC, WAV, ATRAC3) += $(FATE_ATRAC3)
+
+FATE_ATRAC_ALL = $(FATE_ATRAC1-yes) $(FATE_ATRAC3-yes)
$(FATE_ATRAC_ALL): CMP = oneoff
FATE_SAMPLES_AVCONV += $(FATE_ATRAC_ALL)
fate-atrac: $(FATE_ATRAC_ALL)
-fate-atrac3: $(FATE_ATRAC3)
+fate-atrac3: $(FATE_ATRAC3-yes)