Browse Source

Merge commit '6860b4081d046558c44b1b42f22022ea341a2a73'

* commit '6860b4081d046558c44b1b42f22022ea341a2a73':
  x86: include x86inc.asm in x86util.asm
  cng: Reindent some incorrectly indented lines
  cngdec: Allow flushing the decoder
  cngdec: Make the dbov variable have the right unit
  cngdec: Fix the memset size to cover the full array
  cngdec: Update the LPC coefficients after averaging the reflection coefficients
  configure: fix print_config() with broke awks

Conflicts:
	libavcodec/x86/ac3dsp.asm
	libavcodec/x86/dct32.asm
	libavcodec/x86/deinterlace.asm
	libavcodec/x86/dsputil.asm
	libavcodec/x86/dsputilenc.asm
	libavcodec/x86/fft.asm
	libavcodec/x86/fmtconvert.asm
	libavcodec/x86/h264_chromamc.asm
	libavcodec/x86/h264_deblock.asm
	libavcodec/x86/h264_deblock_10bit.asm
	libavcodec/x86/h264_idct.asm
	libavcodec/x86/h264_idct_10bit.asm
	libavcodec/x86/h264_intrapred.asm
	libavcodec/x86/h264_intrapred_10bit.asm
	libavcodec/x86/h264_weight.asm
	libavcodec/x86/vc1dsp.asm
	libavcodec/x86/vp3dsp.asm
	libavcodec/x86/vp56dsp.asm
	libavcodec/x86/vp8dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
3174616f59
44 changed files with 31 additions and 51 deletions
  1. +22
    -8
      libavcodec/cngdec.c
  2. +1
    -1
      libavcodec/cngenc.c
  3. +0
    -1
      libavcodec/x86/ac3dsp.asm
  4. +0
    -1
      libavcodec/x86/dct32.asm
  5. +0
    -1
      libavcodec/x86/deinterlace.asm
  6. +1
    -1
      libavcodec/x86/diracdsp_yasm.asm
  7. +1
    -2
      libavcodec/x86/dsputil.asm
  8. +0
    -1
      libavcodec/x86/dsputilenc.asm
  9. +1
    -1
      libavcodec/x86/dwt_yasm.asm
  10. +0
    -1
      libavcodec/x86/fft.asm
  11. +0
    -1
      libavcodec/x86/fmtconvert.asm
  12. +0
    -1
      libavcodec/x86/h264_chromamc.asm
  13. +0
    -1
      libavcodec/x86/h264_chromamc_10bit.asm
  14. +0
    -1
      libavcodec/x86/h264_deblock.asm
  15. +0
    -1
      libavcodec/x86/h264_deblock_10bit.asm
  16. +0
    -1
      libavcodec/x86/h264_idct.asm
  17. +0
    -1
      libavcodec/x86/h264_idct_10bit.asm
  18. +0
    -1
      libavcodec/x86/h264_intrapred.asm
  19. +0
    -1
      libavcodec/x86/h264_intrapred_10bit.asm
  20. +0
    -1
      libavcodec/x86/h264_qpel_10bit.asm
  21. +1
    -1
      libavcodec/x86/h264_weight.asm
  22. +0
    -1
      libavcodec/x86/h264_weight_10bit.asm
  23. +0
    -1
      libavcodec/x86/imdct36.asm
  24. +0
    -1
      libavcodec/x86/pngdsp.asm
  25. +0
    -1
      libavcodec/x86/proresdsp.asm
  26. +0
    -1
      libavcodec/x86/rv34dsp.asm
  27. +0
    -1
      libavcodec/x86/rv40dsp.asm
  28. +0
    -1
      libavcodec/x86/sbrdsp.asm
  29. +0
    -1
      libavcodec/x86/v210.asm
  30. +0
    -1
      libavcodec/x86/vc1dsp.asm
  31. +0
    -1
      libavcodec/x86/vp3dsp.asm
  32. +0
    -1
      libavcodec/x86/vp56dsp.asm
  33. +0
    -1
      libavcodec/x86/vp8dsp.asm
  34. +1
    -1
      libavfilter/x86/hqdn3d.asm
  35. +0
    -1
      libavresample/x86/audio_convert.asm
  36. +0
    -1
      libavresample/x86/audio_mix.asm
  37. +1
    -1
      libavutil/x86/cpuid.asm
  38. +0
    -1
      libavutil/x86/float_dsp.asm
  39. +2
    -0
      libavutil/x86/x86util.asm
  40. +0
    -1
      libswresample/x86/audio_convert.asm
  41. +0
    -1
      libswresample/x86/rematrix.asm
  42. +0
    -1
      libswscale/x86/input.asm
  43. +0
    -1
      libswscale/x86/output.asm
  44. +0
    -1
      libswscale/x86/scale.asm

+ 22
- 8
libavcodec/cngdec.c View File

@@ -32,6 +32,7 @@ typedef struct CNGContext {
float *lpc_coef;
int order;
int energy, target_energy;
int inited;
float *filter_out;
float *excitation;
AVLFG lfg;
@@ -94,8 +95,14 @@ static void make_lpc_coefs(float *lpc, const float *refl, int order)
memcpy(lpc, cur, sizeof(*lpc) * order);
}

static void cng_decode_flush(AVCodecContext *avctx)
{
CNGContext *p = avctx->priv_data;
p->inited = 0;
}

static int cng_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
int *got_frame_ptr, AVPacket *avpkt)
{

CNGContext *p = avctx->priv_data;
@@ -106,18 +113,24 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
float scaling;

if (avpkt->size) {
float dbov = -avpkt->data[0] / 10.0;
p->target_energy = 1081109975 * pow(10, dbov) * 0.75;
memset(p->target_refl_coef, 0, sizeof(p->refl_coef));
int dbov = -avpkt->data[0];
p->target_energy = 1081109975 * pow(10, dbov / 10.0) * 0.75;
memset(p->target_refl_coef, 0, p->order * sizeof(*p->target_refl_coef));
for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) {
p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0;
}
make_lpc_coefs(p->lpc_coef, p->refl_coef, p->order);
}

p->energy = p->energy / 2 + p->target_energy / 2;
for (i = 0; i < p->order; i++)
p->refl_coef[i] = 0.6 *p->refl_coef[i] + 0.4 * p->target_refl_coef[i];
if (p->inited) {
p->energy = p->energy / 2 + p->target_energy / 2;
for (i = 0; i < p->order; i++)
p->refl_coef[i] = 0.6 *p->refl_coef[i] + 0.4 * p->target_refl_coef[i];
} else {
p->energy = p->target_energy;
memcpy(p->refl_coef, p->target_refl_coef, p->order * sizeof(*p->refl_coef));
p->inited = 1;
}
make_lpc_coefs(p->lpc_coef, p->refl_coef, p->order);

for (i = 0; i < p->order; i++)
e *= 1.0 - p->refl_coef[i]*p->refl_coef[i];
@@ -154,6 +167,7 @@ AVCodec ff_comfortnoise_decoder = {
.priv_data_size = sizeof(CNGContext),
.init = cng_decode_init,
.decode = cng_decode_frame,
.flush = cng_decode_flush,
.close = cng_decode_close,
.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,


+ 1
- 1
libavcodec/cngenc.c View File

@@ -67,7 +67,7 @@ static av_cold int cng_encode_init(AVCodecContext *avctx)
}

static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
const AVFrame *frame, int *got_packet_ptr)
{
CNGContext *p = avctx->priv_data;
int ret, i;


+ 0
- 1
libavcodec/x86/ac3dsp.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/dct32.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA 32


+ 0
- 1
libavcodec/x86/deinterlace.asm View File

@@ -20,7 +20,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 1
- 1
libavcodec/x86/diracdsp_yasm.asm View File

@@ -18,7 +18,7 @@
;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA
pw_3: times 8 dw 3


+ 1
- 2
libavcodec/x86/dsputil.asm View File

@@ -19,8 +19,7 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "x86util.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA
pb_f: times 16 db 15


+ 0
- 1
libavcodec/x86/dsputilenc.asm View File

@@ -21,7 +21,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;*****************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION .text


+ 1
- 1
libavcodec/x86/dwt_yasm.asm View File

@@ -19,7 +19,7 @@
;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA
pw_1: times 8 dw 1


+ 0
- 1
libavcodec/x86/fft.asm View File

@@ -28,7 +28,6 @@
; in blocks as conventient to the vector size.
; i.e. {4x real, 4x imaginary, 4x real, ...} (or 2x respectively)

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

%if ARCH_X86_64


+ 0
- 1
libavcodec/x86/fmtconvert.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_TEXT


+ 0
- 1
libavcodec/x86/h264_chromamc.asm View File

@@ -20,7 +20,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/h264_chromamc_10bit.asm View File

@@ -22,7 +22,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/h264_deblock.asm View File

@@ -24,7 +24,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/h264_deblock_10bit.asm View File

@@ -24,7 +24,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/h264_idct.asm View File

@@ -26,7 +26,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;*****************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/h264_idct_10bit.asm View File

@@ -22,7 +22,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/h264_intrapred.asm View File

@@ -22,7 +22,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/h264_intrapred_10bit.asm View File

@@ -22,7 +22,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/h264_qpel_10bit.asm View File

@@ -22,7 +22,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA 32


+ 1
- 1
libavcodec/x86/h264_weight.asm View File

@@ -21,7 +21,7 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION .text



+ 0
- 1
libavcodec/x86/h264_weight_10bit.asm View File

@@ -22,7 +22,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA 32


+ 0
- 1
libavcodec/x86/imdct36.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/pngdsp.asm View File

@@ -21,7 +21,6 @@
;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/proresdsp.asm View File

@@ -22,7 +22,6 @@
;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

%define W1sh2 22725 ; W1 = 90901 = 22725<<2 + 1


+ 0
- 1
libavcodec/x86/rv34dsp.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/rv40dsp.asm View File

@@ -21,7 +21,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/sbrdsp.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

;SECTION_RODATA


+ 0
- 1
libavcodec/x86/v210.asm View File

@@ -20,7 +20,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libavcodec/x86/vc1dsp.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

cextern pw_4


+ 0
- 1
libavcodec/x86/vp3dsp.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

; MMX-optimized functions cribbed from the original VP3 source code.


+ 0
- 1
libavcodec/x86/vp56dsp.asm View File

@@ -20,7 +20,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

cextern pw_64


+ 0
- 1
libavcodec/x86/vp8dsp.asm View File

@@ -20,7 +20,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 1
- 1
libavfilter/x86/hqdn3d.asm View File

@@ -18,7 +18,7 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION .text



+ 0
- 1
libavresample/x86/audio_convert.asm View File

@@ -20,7 +20,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"
%include "util.asm"



+ 0
- 1
libavresample/x86/audio_mix.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"
%include "util.asm"



+ 1
- 1
libavutil/x86/cpuid.asm View File

@@ -21,7 +21,7 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION .text



+ 0
- 1
libavutil/x86/float_dsp.asm View File

@@ -20,7 +20,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION .text


+ 2
- 0
libavutil/x86/x86util.asm View File

@@ -23,6 +23,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"

%macro SBUTTERFLY 4
%if avx_enabled == 0
mova m%4, m%2


+ 0
- 1
libswresample/x86/audio_convert.asm View File

@@ -18,7 +18,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"

SECTION_RODATA


+ 0
- 1
libswresample/x86/rematrix.asm View File

@@ -18,7 +18,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"




+ 0
- 1
libswscale/x86/input.asm View File

@@ -21,7 +21,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA


+ 0
- 1
libswscale/x86/output.asm View File

@@ -20,7 +20,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA


+ 0
- 1
libswscale/x86/scale.asm View File

@@ -19,7 +19,6 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA


Loading…
Cancel
Save