Commit d8c3170c authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master: (22 commits)
  g723.1: do not pass large structs by value
  g723.1: do not bounce intermediate values via memory
  g723.1: declare a variable in the block it is used
  g723.1: avoid saving/restoring excitation
  g723.1: avoid unnecessary memcpy() in residual_interp()
  g723.1: make postfilter write directly to output buffer
  g723.1: drop unnecessary variable buf_ptr in formant_postfilter()
  g723.1: make scale_vector() output to a separate buffer
  g723.1: make autocorr_max() work on an arbitrary buffer
  g723.1: do not needlessly use int64_t
  g723.1: use saturating addition functions
  g723.1: optimise scale_vector()
  g723.1: remove useless uses of MUL64()
  g723.1: remove unnecessary argument 'shift' from dot_product()
  g723.1: deobfuscate "(x << 4) - x" to "15 * x"
  celp: optimise ff_celp_lp_synthesis_filter()
  libavutil: add saturating addition functions
  cllc: Implement ARGB support
  cllc: Add support for QRGB
  cllc: Rename some funcs to represent what they actually do
  ...

Conflicts:
	LICENSE
	libavcodec/g723_1.c
	libavcodec/x86/Makefile
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents bd70a527 69665bd6
FFmpeg: FFmpeg:
-------
Most files in FFmpeg are under the GNU Lesser General Public License version 2.1 Most files in FFmpeg are under the GNU Lesser General Public License version 2.1
or later (LGPL v2.1+). Read the file COPYING.LGPLv2.1 for details. Some other or later (LGPL v2.1+). Read the file COPYING.LGPLv2.1 for details. Some other
...@@ -51,18 +50,29 @@ for you. Read the file COPYING.LGPLv3 or, if you have enabled GPL parts, ...@@ -51,18 +50,29 @@ for you. Read the file COPYING.LGPLv3 or, if you have enabled GPL parts,
COPYING.GPLv3 to learn the exact legal terms that apply in this case. COPYING.GPLv3 to learn the exact legal terms that apply in this case.
external libraries: external libraries
------------------- ==================
Some external libraries, e.g. libx264, are under GPL and can be used in FFmpeg can be combined with a number of external libraries, which sometimes
conjunction with FFmpeg. They require --enable-gpl to be passed to configure affect the licensing of binaries resulting from the combination.
as well.
The OpenCORE external libraries are under the Apache License 2.0. That license compatible libraries
is incompatible with the LGPL v2.1 and the GPL v2, but not with version 3 of --------------------
those licenses. So to combine the OpenCORE libraries with FFmpeg, the license
version needs to be upgraded by passing --enable-version3 to configure.
The nonfree external libraries libfaac and libaacplus can be hooked up in FFmpeg. The libcdio, libx264, libxavs and libxvid libraries are under GPL. When
You need to pass --enable-nonfree to configure to enable it. Employ this option combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by
with care as FFmpeg then becomes nonfree and unredistributable. passing --enable-gpl to configure.
The OpenCORE and VisualOn libraries are under the Apache License 2.0. That
license is incompatible with the LGPL v2.1 and the GPL v2, but not with
version 3 of those licenses. So to combine these libraries with FFmpeg, the
license version needs to be upgraded by passing --enable-version3 to configure.
incompatible libraries
----------------------
The Fraunhofer AAC library, FAAC and aacplus are under licenses incompatible
with all (L)GPL versions. Thus, unfortunately, since both licenses cannot be
satisfied simultaneously, binaries resulting from the combination of FFmpeg
with these libraries are nonfree und unredistributable. If you wish to enable
any of these libraries nonetheless, pass --enable-nonfree to configure.
...@@ -63,17 +63,16 @@ int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs, ...@@ -63,17 +63,16 @@ int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,
int i,n; int i,n;
for (n = 0; n < buffer_length; n++) { for (n = 0; n < buffer_length; n++) {
int sum = rounder; int sum = -rounder, sum1;
for (i = 1; i <= filter_length; i++) for (i = 1; i <= filter_length; i++)
sum -= filter_coeffs[i-1] * out[n-i]; sum += filter_coeffs[i-1] * out[n-i];
sum = ((sum >> 12) + in[n]) >> shift; sum1 = ((-sum >> 12) + in[n]) >> shift;
sum = av_clip_int16(sum1);
if (sum + 0x8000 > 0xFFFFU) { if (stop_on_overflow && sum != sum1)
if (stop_on_overflow)
return 1; return 1;
sum = (sum >> 31) ^ 32767;
}
out[n] = sum; out[n] = sum;
} }
......
This diff is collapsed.
...@@ -41,7 +41,7 @@ YASM-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp.o ...@@ -41,7 +41,7 @@ YASM-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp.o
YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o
YASM-OBJS-$(CONFIG_DCT) += x86/dct32_sse.o YASM-OBJS-$(CONFIG_DCT) += x86/dct32_sse.o
YASM-OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp_mmx.o x86/diracdsp_yasm.o YASM-OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp_mmx.o x86/diracdsp_yasm.o
YASM-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_yasm.o YASM-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc.o
YASM-OBJS-$(CONFIG_FFT) += x86/fft_mmx.o \ YASM-OBJS-$(CONFIG_FFT) += x86/fft_mmx.o \
$(YASM-OBJS-FFT-yes) $(YASM-OBJS-FFT-yes)
...@@ -65,11 +65,11 @@ YASM-OBJS-$(CONFIG_RV30_DECODER) += x86/rv34dsp.o ...@@ -65,11 +65,11 @@ YASM-OBJS-$(CONFIG_RV30_DECODER) += x86/rv34dsp.o
YASM-OBJS-$(CONFIG_RV40_DECODER) += x86/rv34dsp.o \ YASM-OBJS-$(CONFIG_RV40_DECODER) += x86/rv34dsp.o \
x86/rv40dsp.o x86/rv40dsp.o
YASM-OBJS-$(CONFIG_V210_DECODER) += x86/v210.o YASM-OBJS-$(CONFIG_V210_DECODER) += x86/v210.o
YASM-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_yasm.o YASM-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp.o
YASM-OBJS-$(CONFIG_VP3DSP) += x86/vp3dsp.o YASM-OBJS-$(CONFIG_VP3DSP) += x86/vp3dsp.o
YASM-OBJS-$(CONFIG_VP6_DECODER) += x86/vp56dsp.o YASM-OBJS-$(CONFIG_VP6_DECODER) += x86/vp56dsp.o
YASM-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp.o YASM-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp.o
YASM-OBJS += x86/dsputil_yasm.o \ YASM-OBJS += x86/dsputil.o \
x86/deinterlace.o \ x86/deinterlace.o \
x86/fmtconvert.o \ x86/fmtconvert.o \
...@@ -83,6 +83,21 @@ static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p) ...@@ -83,6 +83,21 @@ static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p)
return x; return x;
} }
#define av_sat_add32 av_sat_add32_arm
static av_always_inline int av_sat_add32_arm(int a, int b)
{
int r;
__asm__ ("qadd %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
return r;
}
#define av_sat_dadd32 av_sat_dadd32_arm
static av_always_inline int av_sat_dadd32_arm(int a, int b)
{
int r;
__asm__ ("qdadd %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
return r;
}
#else /* HAVE_ARMV6 */ #else /* HAVE_ARMV6 */
......
...@@ -186,6 +186,30 @@ static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p) ...@@ -186,6 +186,30 @@ static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
else return a; else return a;
} }
/**
* Add two signed 32-bit values with saturation.
*
* @param a one value
* @param b another value
* @return sum with signed saturation
*/
static av_always_inline int av_sat_add32_c(int a, int b)
{
return av_clipl_int32((int64_t)a + b);
}
/**
* Add a doubled value to another value with saturation at both stages.
*
* @param a first value
* @param b value doubled and added to a
* @return sum with signed saturation
*/
static av_always_inline int av_sat_dadd32_c(int a, int b)
{
return av_sat_add32(a, av_sat_add32(b, b));
}
/** /**
* Clip a float value into the amin-amax range. * Clip a float value into the amin-amax range.
* @param a value to clip * @param a value to clip
...@@ -392,6 +416,12 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x) ...@@ -392,6 +416,12 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x)
#ifndef av_clip_uintp2 #ifndef av_clip_uintp2
# define av_clip_uintp2 av_clip_uintp2_c # define av_clip_uintp2 av_clip_uintp2_c
#endif #endif
#ifndef av_sat_add32
# define av_sat_add32 av_sat_add32_c
#endif
#ifndef av_sat_dadd32
# define av_sat_dadd32 av_sat_dadd32_c
#endif
#ifndef av_clipf #ifndef av_clipf
# define av_clipf av_clipf_c # define av_clipf av_clipf_c
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment