Permalink
Browse files

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  v410dec: Implement explode mode support
  zerocodec: fix direct rendering.
  wav: init st to NULL to avoid a false-positive warning.
  wavpack: set bits_per_raw_sample for S32 samples to properly identify 24-bit
  h264: refactor NAL decode loop
  RTMPTE protocol support
  RTMPE protocol support
  rtmp: Add ff_rtmp_calc_digest_pos()
  rtmp: Rename rtmp_calc_digest to ff_rtmp_calc_digest and make it global
  swscale: add missing HAVE_INLINE_ASM check.
  lavfi: place x86 inline assembly under HAVE_INLINE_ASM.
  vc1: Add a test for interlaced field pictures
  swscale: Mark all init functions as av_cold
  swscale: x86: Drop pointless _mmx suffix from filenames
  lavf: use conditional notation for default codec in muxer declarations.
  swscale: place inline assembly bilinear scaler under HAVE_INLINE_ASM.
  dsputil: ppc: cosmetics: pretty-print
  dsputil: x86: add SHUFFLE_MASK_W macro
  configure: respect CC_O setting in check_cc

Conflicts:
	Changelog
	configure
	libavcodec/v410dec.c
	libavcodec/zerocodec.c
	libavformat/asfenc.c
	libavformat/version.h
	libswscale/utils.c
	libswscale/x86/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
2 parents 7e15df7 + d04c529 commit 2cb4d516549526b5e17e941f6d2375a2c501ade6 @michaelni michaelni committed Jul 23, 2012
View
@@ -21,21 +21,8 @@ version next:
- Microsoft Expression Encoder Screen decoder
- RTMPS protocol support
- RTMPTS protocol support
-- showwaves filter
-- LucasArts SMUSH playback support
-- SAMI demuxer and decoder
-- RealText demuxer and decoder
-- Heart Of Darkness PAF playback support
-- iec61883 device
-- asettb filter
-- new option: -progress
-- 3GPP Timed Text decoder
-- GeoTIFF decoder support
-- ffmpeg -(no)stdin option
-- Opus decoder using libopus
-- caca output device using libcaca
-- alphaextract and alphamerge filters
-- concat filter
+- RTMPE protocol support
+- RTMPTE protocol support
version 0.11:
View
@@ -667,11 +667,15 @@ check_cmd(){
"$@" >> $logfile 2>&1
}
+cc_o(){
+ eval printf '%s\\n' $CC_O
+}
+
check_cc(){
log check_cc "$@"
cat > $TMPC
log_file $TMPC
- check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c -o $TMPO $TMPC
+ check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c $(cc_o $TMPO) $TMPC
}
check_cxx(){
@@ -1055,6 +1059,7 @@ CONFIG_LIST="
fft
fontconfig
frei0r
+ gcrypt
gnutls
gpl
gray
@@ -1100,6 +1105,7 @@ CONFIG_LIST="
memalign_hack
memory_poisoning
mpegaudiodsp
+ nettle
network
nonfree
openal
@@ -1731,6 +1737,9 @@ x11_grab_device_indev_deps="x11grab"
# protocols
bluray_protocol_deps="libbluray"
+ffrtmpcrypt_protocol_deps="!librtmp_protocol"
+ffrtmpcrypt_protocol_deps_any="gcrypt nettle openssl"
+ffrtmpcrypt_protocol_select="tcp_protocol"
ffrtmphttp_protocol_deps="!librtmp_protocol"
ffrtmphttp_protocol_select="http_protocol"
gopher_protocol_deps="network"
@@ -1748,9 +1757,11 @@ mmsh_protocol_select="http_protocol"
mmst_protocol_deps="network"
rtmp_protocol_deps="!librtmp_protocol"
rtmp_protocol_select="tcp_protocol"
+rtmpe_protocol_select="ffrtmpcrypt_protocol"
rtmps_protocol_deps="!librtmp_protocol"
rtmps_protocol_select="tls_protocol"
rtmpt_protocol_select="ffrtmphttp_protocol"
+rtmpte_protocol_select="ffrtmpcrypt_protocol ffrtmphttp_protocol"
rtmpts_protocol_select="ffrtmphttp_protocol"
rtp_protocol_select="udp_protocol"
sctp_protocol_deps="network netinet_sctp_h"
@@ -2371,12 +2382,10 @@ elif $cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then
elif $cc -version 2>/dev/null | grep -q TMS470; then
cc_type=tms470
cc_ident=$($cc -version | head -n1 | tr -s ' ')
- cc="$cc --gcc --abi=eabi -eo=.o -mc -me"
- CC_O='-fr=$(@D)'
+ cc="$cc --gcc --abi=eabi -me"
+ CC_O='-fe=$@'
as_default="${cross_prefix}gcc"
ld_default="${cross_prefix}gcc"
- TMPO=$(basename $TMPC .c).o
- append TMPFILES $TMPO
add_cflags -D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__=
CC_DEPFLAGS='-ppa -ppd=$(@:.o=.d)'
AS_DEPFLAGS='-MMD'
@@ -3375,6 +3384,11 @@ enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
die "ERROR: openssl not found"; }
+if enabled gnutls; then
+ { check_lib nettle/bignum.h nettle_mpz_get_str_256 -lnettle -lhogweed -lgmp && enable nettle; } ||
+ { check_lib gcrypt.h gcry_mpi_new -lgcrypt && enable gcrypt; }
+fi
+
# libdc1394 check
if enabled libdc1394; then
{ check_lib dc1394/dc1394.h dc1394_new -ldc1394 -lraw1394 &&
View
@@ -904,10 +904,10 @@ performance on systems without hardware floating point support).
@item MMST @tab X
@item pipe @tab X
@item RTMP @tab X
-@item RTMPE @tab E
+@item RTMPE @tab X
@item RTMPS @tab X
@item RTMPT @tab X
-@item RTMPTE @tab E
+@item RTMPTE @tab X
@item RTMPTS @tab X
@item RTP @tab X
@item SCTP @tab X
View
@@ -277,6 +277,15 @@ For example to read with @command{ffplay} a multimedia resource named
ffplay rtmp://myserver/vod/sample
@end example
+@section rtmpe
+
+Encrypted Real-Time Messaging Protocol.
+
+The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
+streaming multimedia content within standard cryptographic primitives,
+consisting of Diffie-Hellman key exchange and HMACSHA256, generating
+a pair of RC4 keys.
+
@section rtmps
Real-Time Messaging Protocol over a secure SSL connection.
@@ -292,6 +301,14 @@ The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
for streaming multimedia content within HTTP requests to traverse
firewalls.
+@section rtmpte
+
+Encrypted Real-Time Messaging Protocol tunneled through HTTP.
+
+The Encrypted Real-Time Messaging Protocol tunneled through HTTP (RTMPTE)
+is used for streaming multimedia content within HTTP requests to traverse
+firewalls.
+
@section rtmpts
Real-Time Messaging Protocol tunneled through HTTPS.
View
@@ -188,42 +188,50 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
src++;
length--;
+#define STARTCODE_TEST \
+ if (i + 2 < length && src[i + 1] == 0 && src[i + 2] <= 3) { \
+ if (src[i + 2] != 3) { \
+ /* startcode, so we must be past the end */ \
+ length = i; \
+ } \
+ break; \
+ }
#if HAVE_FAST_UNALIGNED
+#define FIND_FIRST_ZERO \
+ if (i > 0 && !src[i]) \
+ i--; \
+ while (src[i]) \
+ i++
#if HAVE_FAST_64BIT
-#define RS 7
for (i = 0; i + 1 < length; i += 9) {
if (!((~AV_RN64A(src + i) &
(AV_RN64A(src + i) - 0x0100010001000101ULL)) &
0x8000800080008080ULL))
+ continue;
+ FIND_FIRST_ZERO;
+ STARTCODE_TEST;
+ i -= 7;
+ }
#else
-#define RS 3
for (i = 0; i + 1 < length; i += 5) {
if (!((~AV_RN32A(src + i) &
(AV_RN32A(src + i) - 0x01000101U)) &
0x80008080U))
-#endif
continue;
- if (i > 0 && !src[i])
- i--;
- while (src[i])
- i++;
+ FIND_FIRST_ZERO;
+ STARTCODE_TEST;
+ i -= 3;
+ }
+#endif
#else
-#define RS 0
for (i = 0; i + 1 < length; i += 2) {
if (src[i])
continue;
if (i > 0 && src[i - 1] == 0)
i--;
-#endif
- if (i + 2 < length && src[i + 1] == 0 && src[i + 2] <= 3) {
- if (src[i + 2] != 3) {
- /* startcode, so we must be past the end */
- length = i;
- }
- break;
- }
- i -= RS;
+ STARTCODE_TEST;
}
+#endif
// use second escape buffer for inter data
bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0;
@@ -23,7 +23,8 @@
#include "libavutil/ppc/util_altivec.h"
#include "dsputil_altivec.h"
-static void int32_to_float_fmul_scalar_altivec(float *dst, const int *src, float mul, int len)
+static void int32_to_float_fmul_scalar_altivec(float *dst, const int *src,
+ float mul, int len)
{
union {
vector float v;
@@ -36,7 +37,7 @@ static void int32_to_float_fmul_scalar_altivec(float *dst, const int *src, float
mul_u.s[0] = mul;
mul_v = vec_splat(mul_u.v, 0);
- for(i=0; i<len; i+=8) {
+ for (i = 0; i < len; i += 8) {
src1 = vec_ctf(vec_ld(0, src+i), 0);
src2 = vec_ctf(vec_ld(16, src+i), 0);
dst1 = vec_madd(src1, mul_v, zero);
@@ -47,8 +48,7 @@ static void int32_to_float_fmul_scalar_altivec(float *dst, const int *src, float
}
-static vector signed short
-float_to_int16_one_altivec(const float *src)
+static vector signed short float_to_int16_one_altivec(const float *src)
{
vector float s0 = vec_ld(0, src);
vector float s1 = vec_ld(16, src);
@@ -62,80 +62,82 @@ static void float_to_int16_altivec(int16_t *dst, const float *src, long len)
int i;
vector signed short d0, d1, d;
vector unsigned char align;
- if(((long)dst)&15) //FIXME
- for(i=0; i<len-7; i+=8) {
- d0 = vec_ld(0, dst+i);
- d = float_to_int16_one_altivec(src+i);
- d1 = vec_ld(15, dst+i);
- d1 = vec_perm(d1, d0, vec_lvsl(0,dst+i));
- align = vec_lvsr(0, dst+i);
- d0 = vec_perm(d1, d, align);
- d1 = vec_perm(d, d1, align);
- vec_st(d0, 0, dst+i);
- vec_st(d1,15, dst+i);
- }
- else
- for(i=0; i<len-7; i+=8) {
- d = float_to_int16_one_altivec(src+i);
- vec_st(d, 0, dst+i);
+ if (((long)dst) & 15) { //FIXME
+ for (i = 0; i < len - 7; i += 8) {
+ d0 = vec_ld(0, dst+i);
+ d = float_to_int16_one_altivec(src + i);
+ d1 = vec_ld(15, dst+i);
+ d1 = vec_perm(d1, d0, vec_lvsl(0, dst + i));
+ align = vec_lvsr(0, dst + i);
+ d0 = vec_perm(d1, d, align);
+ d1 = vec_perm(d, d1, align);
+ vec_st(d0, 0, dst + i);
+ vec_st(d1, 15, dst + i);
+ }
+ } else {
+ for (i = 0; i < len - 7; i += 8) {
+ d = float_to_int16_one_altivec(src + i);
+ vec_st(d, 0, dst + i);
+ }
}
}
-static void
-float_to_int16_interleave_altivec(int16_t *dst, const float **src,
- long len, int channels)
+static void float_to_int16_interleave_altivec(int16_t *dst, const float **src,
+ long len, int channels)
{
int i;
vector signed short d0, d1, d2, c0, c1, t0, t1;
vector unsigned char align;
- if(channels == 1)
+
+ if (channels == 1)
float_to_int16_altivec(dst, src[0], len);
- else
+ else {
if (channels == 2) {
- if(((long)dst)&15)
- for(i=0; i<len-7; i+=8) {
- d0 = vec_ld(0, dst + i);
- t0 = float_to_int16_one_altivec(src[0] + i);
- d1 = vec_ld(31, dst + i);
- t1 = float_to_int16_one_altivec(src[1] + i);
- c0 = vec_mergeh(t0, t1);
- c1 = vec_mergel(t0, t1);
- d2 = vec_perm(d1, d0, vec_lvsl(0, dst + i));
- align = vec_lvsr(0, dst + i);
- d0 = vec_perm(d2, c0, align);
- d1 = vec_perm(c0, c1, align);
- vec_st(d0, 0, dst + i);
- d0 = vec_perm(c1, d2, align);
- vec_st(d1, 15, dst + i);
- vec_st(d0, 31, dst + i);
- dst+=8;
- }
- else
- for(i=0; i<len-7; i+=8) {
- t0 = float_to_int16_one_altivec(src[0] + i);
- t1 = float_to_int16_one_altivec(src[1] + i);
- d0 = vec_mergeh(t0, t1);
- d1 = vec_mergel(t0, t1);
- vec_st(d0, 0, dst + i);
- vec_st(d1, 16, dst + i);
- dst+=8;
- }
- } else {
- DECLARE_ALIGNED(16, int16_t, tmp)[len];
- int c, j;
- for (c = 0; c < channels; c++) {
- float_to_int16_altivec(tmp, src[c], len);
- for (i = 0, j = c; i < len; i++, j+=channels) {
- dst[j] = tmp[i];
+ if (((long)dst) & 15) {
+ for (i = 0; i < len - 7; i += 8) {
+ d0 = vec_ld(0, dst + i);
+ t0 = float_to_int16_one_altivec(src[0] + i);
+ d1 = vec_ld(31, dst + i);
+ t1 = float_to_int16_one_altivec(src[1] + i);
+ c0 = vec_mergeh(t0, t1);
+ c1 = vec_mergel(t0, t1);
+ d2 = vec_perm(d1, d0, vec_lvsl(0, dst + i));
+ align = vec_lvsr(0, dst + i);
+ d0 = vec_perm(d2, c0, align);
+ d1 = vec_perm(c0, c1, align);
+ vec_st(d0, 0, dst + i);
+ d0 = vec_perm(c1, d2, align);
+ vec_st(d1, 15, dst + i);
+ vec_st(d0, 31, dst + i);
+ dst += 8;
+ }
+ } else {
+ for (i = 0; i < len - 7; i += 8) {
+ t0 = float_to_int16_one_altivec(src[0] + i);
+ t1 = float_to_int16_one_altivec(src[1] + i);
+ d0 = vec_mergeh(t0, t1);
+ d1 = vec_mergel(t0, t1);
+ vec_st(d0, 0, dst + i);
+ vec_st(d1, 16, dst + i);
+ dst += 8;
+ }
+ }
+ } else {
+ DECLARE_ALIGNED(16, int16_t, tmp)[len];
+ int c, j;
+ for (c = 0; c < channels; c++) {
+ float_to_int16_altivec(tmp, src[c], len);
+ for (i = 0, j = c; i < len; i++, j+=channels)
+ dst[j] = tmp[i];
}
}
- }
+ }
}
void ff_fmt_convert_init_altivec(FmtConvertContext *c, AVCodecContext *avctx)
{
c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_altivec;
- if(!(avctx->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
c->float_to_int16 = float_to_int16_altivec;
c->float_to_int16_interleave = float_to_int16_interleave_altivec;
}
Oops, something went wrong.

0 comments on commit 2cb4d51

Please sign in to comment.