diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-22 05:16:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-22 05:16:40 +0200 |
commit | 043d2affbbc124c6d802fe2989d9b1ed73825368 (patch) | |
tree | 5cf6ebba7a816fe0475cee59e9e946d726940607 /libavcodec/x86/h264dsp_mmx.c | |
parent | 86824c1dcb3eaffc2b143de452e8082dc3c59822 (diff) | |
parent | 67e7dc54049d9b51a0c2168c8265145a9aef7780 (diff) | |
download | ffmpeg-043d2affbbc124c6d802fe2989d9b1ed73825368.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
rawdec: Fix decoding of QT WRAW files.
configure: report optimization for size separately
mov: Support Digital Voodoo SD 8 Bit and DTS codec identifiers.
mov: Support R10g codec identifier.
riff/img2: Add JPEG 2000 codec IDs.
riff: Add DAVC fourcc.
riff: Add M263, XVIX, MMJP, CDV5 fourccs.
rawvideo: Support auv2 fourcc.
swscale: Remove unused variable from ff_bfin_get_unscaled_swscale().
h264: Fix assert that failed to compile with -DDEBUG.
h264: Add x86 assembly for 10-bit weight/biweight H.264 functions.
fate: remove output redirections from old regtest scripts
Conflicts:
configure
libavcodec/rawdec.c
libavformat/isom.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/h264dsp_mmx.c')
-rw-r--r-- | libavcodec/x86/h264dsp_mmx.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libavcodec/x86/h264dsp_mmx.c b/libavcodec/x86/h264dsp_mmx.c index 6c1b0a5619..0cb6b6fb33 100644 --- a/libavcodec/x86/h264dsp_mmx.c +++ b/libavcodec/x86/h264dsp_mmx.c @@ -326,6 +326,30 @@ H264_BIWEIGHT_MMX ( 4, 8) H264_BIWEIGHT_MMX ( 4, 4) H264_BIWEIGHT_MMX ( 4, 2) +#define H264_WEIGHT_10(W, H, DEPTH, OPT) \ +void ff_h264_weight_ ## W ## x ## H ## _ ## DEPTH ## _ ## OPT(uint8_t *dst, \ + int stride, int log2_denom, int weight, int offset); + +#define H264_BIWEIGHT_10(W, H, DEPTH, OPT) \ +void ff_h264_biweight_ ## W ## x ## H ## _ ## DEPTH ## _ ## OPT \ + (uint8_t *dst, uint8_t *src, int stride, int log2_denom, \ + int weightd, int weights, int offset); + +#define H264_BIWEIGHT_10_SSE(W, H, DEPTH) \ +H264_WEIGHT_10 (W, H, DEPTH, sse2) \ +H264_WEIGHT_10 (W, H, DEPTH, sse4) \ +H264_BIWEIGHT_10(W, H, DEPTH, sse2) \ +H264_BIWEIGHT_10(W, H, DEPTH, sse4) + +H264_BIWEIGHT_10_SSE(16, 16, 10) +H264_BIWEIGHT_10_SSE(16, 8, 10) +H264_BIWEIGHT_10_SSE( 8, 16, 10) +H264_BIWEIGHT_10_SSE( 8, 8, 10) +H264_BIWEIGHT_10_SSE( 8, 4, 10) +H264_BIWEIGHT_10_SSE( 4, 8, 10) +H264_BIWEIGHT_10_SSE( 4, 4, 10) +H264_BIWEIGHT_10_SSE( 4, 2, 10) + void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth) { int mm_flags = av_get_cpu_flags(); @@ -454,6 +478,24 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth) c->h264_idct8_add4 = ff_h264_idct8_add4_10_sse2; #endif + c->weight_h264_pixels_tab[0] = ff_h264_weight_16x16_10_sse2; + c->weight_h264_pixels_tab[1] = ff_h264_weight_16x8_10_sse2; + c->weight_h264_pixels_tab[2] = ff_h264_weight_8x16_10_sse2; + c->weight_h264_pixels_tab[3] = ff_h264_weight_8x8_10_sse2; + c->weight_h264_pixels_tab[4] = ff_h264_weight_8x4_10_sse2; + c->weight_h264_pixels_tab[5] = ff_h264_weight_4x8_10_sse2; + c->weight_h264_pixels_tab[6] = ff_h264_weight_4x4_10_sse2; + c->weight_h264_pixels_tab[7] = ff_h264_weight_4x2_10_sse2; + + c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16x16_10_sse2; + c->biweight_h264_pixels_tab[1] = ff_h264_biweight_16x8_10_sse2; + c->biweight_h264_pixels_tab[2] = ff_h264_biweight_8x16_10_sse2; + c->biweight_h264_pixels_tab[3] = ff_h264_biweight_8x8_10_sse2; + c->biweight_h264_pixels_tab[4] = ff_h264_biweight_8x4_10_sse2; + c->biweight_h264_pixels_tab[5] = ff_h264_biweight_4x8_10_sse2; + c->biweight_h264_pixels_tab[6] = ff_h264_biweight_4x4_10_sse2; + c->biweight_h264_pixels_tab[7] = ff_h264_biweight_4x2_10_sse2; + c->h264_v_loop_filter_chroma= ff_deblock_v_chroma_10_sse2; c->h264_v_loop_filter_chroma_intra= ff_deblock_v_chroma_intra_10_sse2; #if HAVE_ALIGNED_STACK @@ -463,6 +505,25 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth) c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_sse2; #endif } + if (mm_flags&AV_CPU_FLAG_SSE4) { + c->weight_h264_pixels_tab[0] = ff_h264_weight_16x16_10_sse4; + c->weight_h264_pixels_tab[1] = ff_h264_weight_16x8_10_sse4; + c->weight_h264_pixels_tab[2] = ff_h264_weight_8x16_10_sse4; + c->weight_h264_pixels_tab[3] = ff_h264_weight_8x8_10_sse4; + c->weight_h264_pixels_tab[4] = ff_h264_weight_8x4_10_sse4; + c->weight_h264_pixels_tab[5] = ff_h264_weight_4x8_10_sse4; + c->weight_h264_pixels_tab[6] = ff_h264_weight_4x4_10_sse4; + c->weight_h264_pixels_tab[7] = ff_h264_weight_4x2_10_sse4; + + c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16x16_10_sse4; + c->biweight_h264_pixels_tab[1] = ff_h264_biweight_16x8_10_sse4; + c->biweight_h264_pixels_tab[2] = ff_h264_biweight_8x16_10_sse4; + c->biweight_h264_pixels_tab[3] = ff_h264_biweight_8x8_10_sse4; + c->biweight_h264_pixels_tab[4] = ff_h264_biweight_8x4_10_sse4; + c->biweight_h264_pixels_tab[5] = ff_h264_biweight_4x8_10_sse4; + c->biweight_h264_pixels_tab[6] = ff_h264_biweight_4x4_10_sse4; + c->biweight_h264_pixels_tab[7] = ff_h264_biweight_4x2_10_sse4; + } #if HAVE_AVX if (mm_flags&AV_CPU_FLAG_AVX) { c->h264_idct_dc_add = |