Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2010-06-17 02:13:00 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2010-06-17 02:13:00 +0400
commit8062ee962652db6c9d2a6a314893632ae3b2bae9 (patch)
tree9c3f06e7d5e7042c881d04abcd62ba6720221b73 /src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86
parentc5ec9f4e4c88fcef7874556888e4bd413f864723 (diff)
updated ffmpeg
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2053 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86')
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx.c12
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx_avg_template.c81
2 files changed, 93 insertions, 0 deletions
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx.c
index efb9651bb..b75601fd0 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx.c
@@ -2621,6 +2621,12 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
c->vp3_idct_dc_add = ff_vp3_idct_dc_add_mmx2;
}
+ if (CONFIG_VP3_DECODER
+ && (avctx->codec_id == CODEC_ID_VP3 || avctx->codec_id == CODEC_ID_THEORA)) {
+ c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_mmx2;
+ c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_mmx2;
+ }
+
#define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU) \
c->PFX ## _pixels_tab[IDX][ 0] = PFX ## SIZE ## _mc00_ ## CPU; \
c->PFX ## _pixels_tab[IDX][ 1] = PFX ## SIZE ## _mc10_ ## CPU; \
@@ -2709,6 +2715,12 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
c->avg_pixels_tab[1][3] = avg_pixels8_xy2_3dnow;
}
+ if (CONFIG_VP3_DECODER
+ && (avctx->codec_id == CODEC_ID_VP3 || avctx->codec_id == CODEC_ID_THEORA)) {
+ c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_3dnow;
+ c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_3dnow;
+ }
+
SET_QPEL_FUNCS(put_qpel, 0, 16, 3dnow);
SET_QPEL_FUNCS(put_qpel, 1, 8, 3dnow);
SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, 3dnow);
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx_avg_template.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx_avg_template.c
index 218d5995a..d78e8cabd 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx_avg_template.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/x86/dsputil_mmx_avg_template.c
@@ -586,6 +586,49 @@ static void DEF(put_no_rnd_pixels8_x2)(uint8_t *block, const uint8_t *pixels, in
:"%"REG_a, "memory");
}
+static void DEF(put_no_rnd_pixels8_x2_exact)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+{
+ __asm__ volatile (
+ "pcmpeqb %%mm6, %%mm6 \n\t"
+ "1: \n\t"
+ "movq (%1), %%mm0 \n\t"
+ "movq (%1, %3), %%mm2 \n\t"
+ "movq 1(%1), %%mm1 \n\t"
+ "movq 1(%1, %3), %%mm3 \n\t"
+ "pxor %%mm6, %%mm0 \n\t"
+ "pxor %%mm6, %%mm2 \n\t"
+ "pxor %%mm6, %%mm1 \n\t"
+ "pxor %%mm6, %%mm3 \n\t"
+ PAVGB" %%mm1, %%mm0 \n\t"
+ PAVGB" %%mm3, %%mm2 \n\t"
+ "pxor %%mm6, %%mm0 \n\t"
+ "pxor %%mm6, %%mm2 \n\t"
+ "movq %%mm0, (%2) \n\t"
+ "movq %%mm2, (%2, %3) \n\t"
+ "movq (%1, %3,2), %%mm0 \n\t"
+ "movq 1(%1, %3,2), %%mm1 \n\t"
+ "movq (%1, %4), %%mm2 \n\t"
+ "movq 1(%1, %4), %%mm3 \n\t"
+ "pxor %%mm6, %%mm0 \n\t"
+ "pxor %%mm6, %%mm1 \n\t"
+ "pxor %%mm6, %%mm2 \n\t"
+ "pxor %%mm6, %%mm3 \n\t"
+ PAVGB" %%mm1, %%mm0 \n\t"
+ PAVGB" %%mm3, %%mm2 \n\t"
+ "pxor %%mm6, %%mm0 \n\t"
+ "pxor %%mm6, %%mm2 \n\t"
+ "movq %%mm0, (%2, %3,2) \n\t"
+ "movq %%mm2, (%2, %4) \n\t"
+ "lea (%1, %3,4), %1 \n\t"
+ "lea (%2, %3,4), %2 \n\t"
+ "subl $4, %0 \n\t"
+ "jg 1b \n\t"
+ : "+g"(h), "+r"(pixels), "+r"(block)
+ : "r" ((x86_reg)line_size), "r"((x86_reg)3*line_size)
+ : "memory"
+ );
+}
+
static void DEF(put_pixels8_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{
__asm__ volatile(
@@ -650,6 +693,44 @@ static void DEF(put_no_rnd_pixels8_y2)(uint8_t *block, const uint8_t *pixels, in
:"%"REG_a, "memory");
}
+static void DEF(put_no_rnd_pixels8_y2_exact)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+{
+ __asm__ volatile (
+ "movq (%1), %%mm0 \n\t"
+ "pcmpeqb %%mm6, %%mm6 \n\t"
+ "add %3, %1 \n\t"
+ "pxor %%mm6, %%mm0 \n\t"
+ "1: \n\t"
+ "movq (%1), %%mm1 \n\t"
+ "movq (%1, %3), %%mm2 \n\t"
+ "pxor %%mm6, %%mm1 \n\t"
+ "pxor %%mm6, %%mm2 \n\t"
+ PAVGB" %%mm1, %%mm0 \n\t"
+ PAVGB" %%mm2, %%mm1 \n\t"
+ "pxor %%mm6, %%mm0 \n\t"
+ "pxor %%mm6, %%mm1 \n\t"
+ "movq %%mm0, (%2) \n\t"
+ "movq %%mm1, (%2, %3) \n\t"
+ "movq (%1, %3,2), %%mm1 \n\t"
+ "movq (%1, %4), %%mm0 \n\t"
+ "pxor %%mm6, %%mm1 \n\t"
+ "pxor %%mm6, %%mm0 \n\t"
+ PAVGB" %%mm1, %%mm2 \n\t"
+ PAVGB" %%mm0, %%mm1 \n\t"
+ "pxor %%mm6, %%mm2 \n\t"
+ "pxor %%mm6, %%mm1 \n\t"
+ "movq %%mm2, (%2, %3,2) \n\t"
+ "movq %%mm1, (%2, %4) \n\t"
+ "lea (%1, %3,4), %1 \n\t"
+ "lea (%2, %3,4), %2 \n\t"
+ "subl $4, %0 \n\t"
+ "jg 1b \n\t"
+ :"+g"(h), "+r"(pixels), "+r" (block)
+ :"r" ((x86_reg)line_size), "r"((x86_reg)3*line_size)
+ :"memory"
+ );
+}
+
static void DEF(avg_pixels8)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{
__asm__ volatile(