Permalink
Browse files

Merge commit 'f919cc7df6ab844bc12f89fe7bef4fb915a47725'

* commit 'f919cc7df6ab844bc12f89fe7bef4fb915a47725':
  fate: fix acodec/vsynth tests for make 3.81
  pcm_mpeg: fix number of consumed bytes to include the header.
  avfilter: include required header file avfilter.h in video.h
  x86: Avoid movs on BUTTERFLYPS when in AVX mode
  x86: use new schema for ASM macros
  fate: convert codec-regression.sh to makefile rules
  fate: allow tests to specify unit size for psnr comparison
  fate: teach videogen/rotozoom to output a single raw video stream
  http: Add support for reusing the http socket for subsequent requests
  http: Add support for using persistent connections

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
2 parents 8619362 + f919cc7 commit b0387edd5e766b1032f946d6cdb35b765bb45435 @michaelni michaelni committed May 29, 2012
Showing 366 changed files with 1,218 additions and 880 deletions.
View
@@ -1737,56 +1737,6 @@ test_deps(){
mxf_d10_test_deps="avfilter"
seek_lavf_mxf_d10_test_deps="mxf_d10_test"
-test_deps _encoder _decoder \
- adpcm_ima_qt \
- adpcm_ima_wav \
- adpcm_ms \
- adpcm_swf \
- adpcm_yamaha=adpcm_yam \
- alac \
- asv1 \
- asv2 \
- bmp \
- dnxhd="dnxhd_1080i dnxhd_720p dnxhd_720p_rd" \
- dvvideo="dv dv_411 dv50" \
- ffv1 \
- flac \
- flashsv \
- flv \
- adpcm_g726=g726 \
- gif \
- h261 \
- h263="h263 h263p" \
- huffyuv \
- jpegls \
- mjpeg="jpg mjpeg ljpeg" \
- mp2 \
- mpeg1video="mpeg mpeg1b" \
- mpeg2video="mpeg2 mpeg2_422 mpeg2_idct_int mpeg2_ilace mpeg2_ivlc_qprd" \
- mpeg2video="mpeg2thread mpeg2thread_ilace" \
- mpeg4="mpeg4 mpeg4_adap mpeg4_qpel mpeg4_qprd mpeg4adv mpeg4nr" \
- mpeg4="mpeg4thread error rc" \
- msmpeg4v3=msmpeg4 \
- msmpeg4v2 \
- pbm=pbmpipe \
- pcx \
- pgm="pgm pgmpipe" \
- png \
- ppm="ppm ppmpipe" \
- rawvideo="rgb yuv" \
- roq \
- rv10 \
- rv20 \
- sgi \
- snow="snow snowll" \
- svq1 \
- targa=tga \
- tiff \
- wmav1 \
- wmav2 \
- wmv1 \
- wmv2 \
-
test_deps _muxer _demuxer \
aiff \
pcm_alaw=alaw \
@@ -1812,7 +1762,6 @@ test_deps _muxer _demuxer \
wav \
yuv4mpegpipe=yuv4mpeg \
-ac3_fixed_test_deps="ac3_fixed_encoder ac3_decoder"
colormatrix1_test_deps="colormatrix_filter"
colormatrix2_test_deps="colormatrix_filter"
flashsv2_test_deps="zlib"
@@ -1981,16 +1930,12 @@ find_tests(){
map "echo ${2}\${v}_test" $(ls "$source_path"/tests/ref/$1 | grep -v '[^-a-z0-9_]')
}
-ACODEC_TESTS=$(find_tests acodec)
-VCODEC_TESTS=$(find_tests vsynth1)
LAVF_FATE_TESTS=$(find_tests lavf-fate)
LAVF_TESTS=$(find_tests lavf)
LAVFI_TESTS=$(find_tests lavfi)
SEEK_TESTS=$(find_tests seek seek_)
-ALL_TESTS="$ACODEC_TESTS $VCODEC_TESTS $LAVF_FATE_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS"
-
-pcm_test_deps=$(map 'echo ${v%_*}_decoder $v' $(filter pcm_* $ENCODER_LIST))
+ALL_TESTS="$LAVF_FATE_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS"
for n in $COMPONENT_LIST; do
v=$(toupper ${n%s})_LIST
@@ -3791,8 +3736,6 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST \
$ALL_COMPONENTS \
cat >>config.mak <<EOF
-ACODEC_TESTS=$(print_enabled -n _test $ACODEC_TESTS)
-VCODEC_TESTS=$(print_enabled -n _test $VCODEC_TESTS)
LAVF_FATE_TESTS=$(print_enabled -n _test $LAVF_FATE_TESTS)
LAVF_TESTS=$(print_enabled -n _test $LAVF_TESTS)
LAVFI_TESTS=$(print_enabled -n _test $LAVFI_TESTS)
View
@@ -312,7 +312,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data,
if (avctx->debug & FF_DEBUG_BITSTREAM)
av_dlog(avctx, "pcm_bluray_decode_frame: decoded %d -> %d bytes\n",
retval, buf_size);
- return retval;
+ return retval + 4;
}
AVCodec ff_pcm_bluray_decoder = {
View
@@ -442,7 +442,7 @@ fft16_sse:
%macro FFT48_3DN 0
align 16
-fft4_ %+ cpuname:
+fft4 %+ SUFFIX:
T2_3DN m0, m1, Z(0), Z(1)
mova m2, Z(2)
mova m3, Z(3)
@@ -456,7 +456,7 @@ fft4_ %+ cpuname:
ret
align 16
-fft8_ %+ cpuname:
+fft8 %+ SUFFIX:
T2_3DN m0, m1, Z(0), Z(1)
mova m2, Z(2)
mova m3, Z(3)
@@ -593,12 +593,15 @@ DECL_PASS pass_interleave_3dnow, PASS_BIG 0
call r2
%endmacro ; FFT_DISPATCH
-%macro DECL_FFT 1-2 ; nbits, cpu, suffix
-%xdefine cpusuffix _ %+ cpuname
-%xdefine fullsuffix %2_ %+ cpuname
-%xdefine list_of_fft fft4 %+ cpusuffix SECTION_REL, fft8 %+ cpusuffix SECTION_REL
+%macro DECL_FFT 1-2 ; nbits, suffix
+%ifidn %0, 1
+%xdefine fullsuffix SUFFIX
+%else
+%xdefine fullsuffix %2 %+ SUFFIX
+%endif
+%xdefine list_of_fft fft4 %+ SUFFIX SECTION_REL, fft8 %+ SUFFIX SECTION_REL
%if %1>=5
-%xdefine list_of_fft list_of_fft, fft16 %+ cpusuffix SECTION_REL
+%xdefine list_of_fft list_of_fft, fft16 %+ SUFFIX SECTION_REL
%endif
%if %1>=6
%xdefine list_of_fft list_of_fft, fft32 %+ fullsuffix SECTION_REL
@@ -612,11 +615,11 @@ DECL_PASS pass_interleave_3dnow, PASS_BIG 0
align 16
fft %+ n %+ fullsuffix:
- call fft %+ n2 %+ cpusuffix
+ call fft %+ n2 %+ SUFFIX
add r0, n*4 - (n&(-2<<%1))
- call fft %+ n4 %+ cpusuffix
+ call fft %+ n4 %+ SUFFIX
add r0, n*2 - (n2&(-2<<%1))
- call fft %+ n4 %+ cpusuffix
+ call fft %+ n4 %+ SUFFIX
sub r0, n*6 + (n2&(-2<<%1))
lea r1, [cos_ %+ n]
mov r2d, n4/2
@@ -825,7 +828,7 @@ cglobal imdct_half, 3,12,8; FFTContext *s, FFTSample *output, const FFTSample *i
mov r0, r1
mov r1d, [r5+FFTContext.nbits]
- FFT_DISPATCH _ %+ cpuname, r1
+ FFT_DISPATCH SUFFIX, r1
mov r0d, [r5+FFTContext.mdctsize]
add r6, r0
View
@@ -77,6 +77,6 @@ AVInputFormat ff_g723_1_demuxer = {
.long_name = NULL_IF_CONFIG_SMALL("G.723.1 format"),
.read_header = g723_1_init,
.read_packet = g723_1_read_packet,
- .extensions = "tco,rco",
+ .extensions = "tco,rco,g723_1",
.flags = AVFMT_GENERIC_INDEX
};
View
@@ -54,6 +54,7 @@ typedef struct {
int chunked_post;
int end_chunked_post; /**< A flag which indicates if the end of chunked encoding has been sent. */
int end_header; /**< A flag which indicates we have finished to read POST reply. */
+ int multiple_requests; /**< A flag which indicates if we use persistent connections. */
} HTTPContext;
#define OFFSET(x) offsetof(HTTPContext, x)
@@ -64,6 +65,7 @@ static const AVOption options[] = {
{"chunked_post", "use chunked transfer-encoding for posts", OFFSET(chunked_post), AV_OPT_TYPE_INT, {.dbl = 1}, 0, 1, E },
{"headers", "custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
{"user-agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC},
+{"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, D|E },
{NULL}
};
#define HTTP_CLASS(flavor)\
@@ -140,12 +142,16 @@ static int http_open_cnx(URLContext *h)
}
ff_url_join(buf, sizeof(buf), lower_proto, NULL, hostname, port, NULL);
- err = ffurl_open(&hd, buf, AVIO_FLAG_READ_WRITE,
- &h->interrupt_callback, NULL);
- if (err < 0)
- goto fail;
- s->hd = hd;
+ if (!s->hd) {
+ err = ffurl_open(&hd, buf, AVIO_FLAG_READ_WRITE,
+ &h->interrupt_callback, NULL);
+ if (err < 0)
+ goto fail;
+
+ s->hd = hd;
+ }
+
cur_auth_type = s->auth_state.auth_type;
cur_proxy_auth_type = s->auth_state.auth_type;
if (http_connect(h, path, local_path, hoststr, auth, proxyauth, &location_changed) < 0)
@@ -188,6 +194,16 @@ static int http_open_cnx(URLContext *h)
return AVERROR(EIO);
}
+int ff_http_do_new_request(URLContext *h, const char *uri)
+{
+ HTTPContext *s = h->priv_data;
+
+ s->off = 0;
+ av_strlcpy(s->location, uri, sizeof(s->location));
+
+ return http_open_cnx(h);
+}
+
static int http_open(URLContext *h, const char *uri, int flags)
{
HTTPContext *s = h->priv_data;
@@ -386,9 +402,17 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
if (!has_header(s->headers, "\r\nRange: ") && !post)
len += av_strlcatf(headers + len, sizeof(headers) - len,
"Range: bytes=%"PRId64"-\r\n", s->off);
- if (!has_header(s->headers, "\r\nConnection: "))
- len += av_strlcpy(headers + len, "Connection: close\r\n",
- sizeof(headers)-len);
+
+ if (!has_header(s->headers, "\r\nConnection: ")) {
+ if (s->multiple_requests) {
+ len += av_strlcpy(headers + len, "Connection: keep-alive\r\n",
+ sizeof(headers) - len);
+ } else {
+ len += av_strlcpy(headers + len, "Connection: close\r\n",
+ sizeof(headers) - len);
+ }
+ }
+
if (!has_header(s->headers, "\r\nHost: "))
len += av_strlcatf(headers + len, sizeof(headers) - len,
"Host: %s\r\n", hoststr);
@@ -424,6 +448,7 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
s->filesize = -1;
s->willclose = 0;
s->end_chunked_post = 0;
+ s->end_header = 0;
if (post) {
/* Pretend that it did work. We didn't read any header yet, since
* we've still to send the POST data, but the code calling this
View
@@ -35,4 +35,14 @@
*/
void ff_http_init_auth_state(URLContext *dest, const URLContext *src);
+/**
+ * Send a new HTTP request, reusing the old connection.
+ *
+ * @param h pointer to the ressource
+ * @param uri uri used to perform the request
+ * @return a negative value if an error condition occured, 0
+ * otherwise
+ */
+int ff_http_do_new_request(URLContext *h, const char *uri);
+
#endif /* AVFORMAT_HTTP_H */
View
@@ -84,13 +84,12 @@
%macro TRANSPOSE4x4PS 5
SBUTTERFLYPS %1, %2, %5
SBUTTERFLYPS %3, %4, %5
- movaps m%5, m%1
- movlhps m%1, m%3
- movhlps m%3, m%5
- movaps m%5, m%2
- movlhps m%2, m%4
- movhlps m%4, m%5
- SWAP %2, %3
+ movlhps m%5, m%1, m%3
+ movhlps m%3, m%1
+ SWAP %5, %1
+ movlhps m%5, m%2, m%4
+ movhlps m%4, m%2
+ SWAP %5, %2, %3
%endmacro
%macro TRANSPOSE8x8W 9-11
View
@@ -1,11 +1,9 @@
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
-AREF = fate-acodec-aref
-VREF = fate-vsynth1-vref fate-vsynth2-vref
-REFS = $(AREF) $(VREF)
+VREF = tests/vsynth1/00.pgm
+AREF = tests/data/asynth1.sw
+
-$(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
-$(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw tests/data/asynth-16000-1.wav
$(AREF): CMP=
ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
@@ -15,24 +13,30 @@ ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
@echo
$(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
-OBJDIRS += tests/data tests/vsynth1 tests/vsynth2
+OBJDIRS += tests/data tests/vsynth1
# Required due to missing automatic dependency tracking for HOSTOBJS.
tests/rotozoom.o tests/videogen.o: tests/utils.c
tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF) | tests/vsynth1
$(M)./$< 'tests/vsynth1/'
-tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF) | tests/vsynth2
- $(M)./$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
-
tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF) | tests/data
$(M)./$< $@
tests/data/asynth-%.wav: tests/audiogen$(HOSTEXESUF) | tests/data
$(M)./$< $@ $(subst -, ,$*)
-tests/data/%.sw tests/data/asynth% tests/vsynth%/00.pgm: TAG = GEN
+tests/data/vsynth1.yuv: tests/videogen$(HOSTEXESUF) | tests/data
+ $(M)$< >$@
+
+tests/data/vsynth2.yuv: tests/rotozoom$(HOSTEXESUF) | tests/data
+ $(M)$< $(SRC_PATH)/tests/lena.pnm >$@
+
+tests/data/%.sw tests/data/asynth% tests/data/vsynth%.yuv tests/vsynth%/00.pgm: TAG = GEN
+
+include $(SRC_PATH)/tests/fate/acodec.mak
+include $(SRC_PATH)/tests/fate/vcodec.mak
include $(SRC_PATH)/tests/fate/aac.mak
include $(SRC_PATH)/tests/fate/ac3.mak
@@ -77,18 +81,12 @@ include $(SRC_PATH)/tests/fate/vqf.mak
include $(SRC_PATH)/tests/fate/wavpack.mak
include $(SRC_PATH)/tests/fate/wma.mak
-FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
-FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
-FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
-FATE_VCODEC = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
FATE_LAVF_FATE = $(LAVF_FATE_TESTS:%=fate-lavf-fate-%)
FATE_LAVF = $(LAVF_TESTS:%=fate-lavf-%)
FATE_LAVFI = $(LAVFI_TESTS:%=fate-lavfi-%)
FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%)
-FATE_AVCONV += $(FATE_ACODEC) \
- $(FATE_VCODEC) \
- $(FATE_LAVF) \
+FATE_AVCONV += $(FATE_LAVF) \
$(FATE_LAVFI) \
$(FATE_SEEK) \
@@ -105,24 +103,15 @@ FATE += $(FATE_LIBAVUTIL)
$(FATE_FFMPEG) $(FATE_LAVF_FATE) $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG): ffmpeg$(EXESUF)
-$(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
-$(filter-out %-vref,$(FATE_VSYNTH1)): fate-vsynth1-vref
-$(filter-out %-vref,$(FATE_VSYNTH2)): fate-vsynth2-vref
-$(FATE_LAVF): $(REFS)
-$(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
-$(FATE_SEEK): fate-codec fate-lavf libavformat/seek-test$(EXESUF)
+$(FATE_LAVF): $(AREF) $(VREF)
+$(FATE_LAVFI): $(VREF) tools/lavfi-showfiltfmts$(EXESUF)
+$(FATE_SEEK): fate-acodec fate-vsynth2 fate-lavf libavformat/seek-test$(EXESUF)
-$(FATE_ACODEC): CMD = codectest acodec
-$(FATE_VSYNTH1): CMD = codectest vsynth1
-$(FATE_VSYNTH2): CMD = codectest vsynth2
$(FATE_LAVF_FATE): CMD = lavffatetest
$(FATE_LAVF): CMD = lavftest
$(FATE_LAVFI): CMD = lavfitest
$(FATE_SEEK): CMD = seektest
-fate-codec: fate-acodec fate-vcodec
-fate-acodec: $(FATE_ACODEC)
-fate-vcodec: $(FATE_VCODEC)
fate-lavf-fate: $(FATE_LAVF_FATE)
fate-lavf: $(FATE_LAVF)
fate-lavfi: $(FATE_LAVFI)
@@ -151,7 +140,7 @@ fate:: $(FATE)
$(FATE) $(FATE_TESTS-no): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
@echo "TEST $(@:fate-%=%)"
- $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)'
+ $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)'
fate-list:
@printf '%s\n' $(sort $(FATE))
Oops, something went wrong.

0 comments on commit b0387ed

Please sign in to comment.