[FFmpeg-devel] [PATCH 04/23] vp3: use hpeldsp instead of dsputil for half-pel functions.
Michael Niedermayer
michaelni at gmx.at
Tue Mar 12 23:35:55 CET 2013
On Tue, Mar 12, 2013 at 07:28:14AM -0700, Ronald S. Bultje wrote:
> From: "Ronald S. Bultje" <rsbultje at gmail.com>
>
> This makes vp3 independent of dsputil.
[...]
> @@ -1694,7 +1695,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
> if (avctx->codec_id != AV_CODEC_ID_THEORA)
> avctx->pix_fmt = AV_PIX_FMT_YUV420P;
> avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
> - ff_dsputil_init(&s->dsp, avctx);
> + ff_hpeldsp_init(&s->hdsp, avctx->flags | CODEC_FLAG_BITEXACT);
why is CODEC_FLAG_BITEXACT added here ?
> ff_videodsp_init(&s->vdsp, 8);
> ff_vp3dsp_init(&s->vp3dsp, avctx->flags);
>
> diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
> index 46c283a..0ee721e 100644
> --- a/libavcodec/x86/dsputil_mmx.c
> +++ b/libavcodec/x86/dsputil_mmx.c
> @@ -52,10 +52,7 @@ DECLARE_ALIGNED(8, const uint64_t, ff_pw_255) = 0x00ff00ff00ff00ffULL;
> DECLARE_ALIGNED(16, const xmm_reg, ff_pw_512) = { 0x0200020002000200ULL, 0x0200020002000200ULL };
> DECLARE_ALIGNED(16, const xmm_reg, ff_pw_1019) = { 0x03FB03FB03FB03FBULL, 0x03FB03FB03FB03FBULL };
>
> -DECLARE_ALIGNED(8, const uint64_t, ff_pb_7) = 0x0707070707070707ULL;
> -DECLARE_ALIGNED(8, const uint64_t, ff_pb_1F) = 0x1F1F1F1F1F1F1F1FULL;
> DECLARE_ALIGNED(8, const uint64_t, ff_pb_3F) = 0x3F3F3F3F3F3F3F3FULL;
> -DECLARE_ALIGNED(8, const uint64_t, ff_pb_81) = 0x8181818181818181ULL;
> DECLARE_ALIGNED(8, const uint64_t, ff_pb_FC) = 0xFCFCFCFCFCFCFCFCULL;
>
> DECLARE_ALIGNED(16, const double, ff_pd_1)[2] = { 1.0, 1.0 };
> diff --git a/libavcodec/x86/dsputil_mmx.h b/libavcodec/x86/dsputil_mmx.h
> index 4b7a1fd..1e62c53 100644
> --- a/libavcodec/x86/dsputil_mmx.h
> +++ b/libavcodec/x86/dsputil_mmx.h
> @@ -49,10 +49,7 @@ extern const uint64_t ff_pw_255;
>
> extern const xmm_reg ff_pb_1;
> extern const xmm_reg ff_pb_3;
> -extern const uint64_t ff_pb_7;
> -extern const uint64_t ff_pb_1F;
> extern const uint64_t ff_pb_3F;
> -extern const uint64_t ff_pb_81;
> extern const xmm_reg ff_pb_F8;
> extern const uint64_t ff_pb_FC;
>
> diff --git a/libavcodec/x86/vp3dsp.asm b/libavcodec/x86/vp3dsp.asm
> index 423866c..a47b8f2 100644
> --- a/libavcodec/x86/vp3dsp.asm
> +++ b/libavcodec/x86/vp3dsp.asm
> @@ -33,12 +33,13 @@ vp3_idct_data: times 8 dw 64277
> times 8 dw 25080
> times 8 dw 12785
>
> +pb_7: times 8 db 7
this is also in
libavcodec/x86/dsputil.asm:pb_7: times 8 db 7
not sure its worth sharing though
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130312/1db57373/attachment.asc>
More information about the ffmpeg-devel
mailing list