Commit 7a1d6ddd authored by Pascal Massimino's avatar Pascal Massimino Committed by Diego Biurrun

xvid: Add C IDCT

Thanks to Pascal Massimino and Michael Militzer for relicensing as LGPL.
Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
parent 95c0cec0
......@@ -42,6 +42,7 @@
#include "dct.h"
#include "idctdsp.h"
#include "simple_idct.h"
#include "xvididct.h"
#include "aandcttab.h"
#include "faandct.h"
#include "faanidct.h"
......@@ -62,11 +63,14 @@ static const struct algo fdct_tab[4] = {
{ "IJG-LLM-INT", ff_jpeg_fdct_islow_8, FF_IDCT_PERM_NONE },
};
static const struct algo idct_tab[4] = {
static const struct algo idct_tab[] = {
{ "FAANI", ff_faanidct, FF_IDCT_PERM_NONE },
{ "REF-DBL", ff_ref_idct, FF_IDCT_PERM_NONE },
{ "INT", ff_j_rev_dct, FF_IDCT_PERM_LIBMPEG2 },
{ "SIMPLE-C", ff_simple_idct_8, FF_IDCT_PERM_NONE },
#if CONFIG_MPEG4_DECODER
{ "XVID", ff_xvid_idct, FF_IDCT_PERM_NONE, 0, 1 },
#endif /* CONFIG_MPEG4_DECODER */
};
#if ARCH_ARM
......
......@@ -26,10 +26,16 @@
#include "idctdsp.h"
#include "xvididct.h"
av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c)
av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)
{
int cpu_flags = av_get_cpu_flags();
if (high_bit_depth ||
!(avctx->idct_algo == FF_IDCT_AUTO ||
avctx->idct_algo == FF_IDCT_XVID))
return;
if (INLINE_MMX(cpu_flags)) {
c->idct_put = ff_xvid_idct_mmx_put;
c->idct_add = ff_xvid_idct_mmx_add;
......
This diff is collapsed.
......@@ -19,11 +19,16 @@
#ifndef AVCODEC_XVIDIDCT_H
#define AVCODEC_XVIDIDCT_H
#include <stdint.h>
#include "avcodec.h"
#include "idctdsp.h"
void ff_xvid_idct(int16_t *const in);
void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx);
void ff_xvid_idct_init_x86(IDCTDSPContext *c);
void ff_xvid_idct_init_x86(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth);
#endif /* AVCODEC_XVIDIDCT_H */
fate-xvid-custom-matrix: CMD = framemd5 -flags +bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg4/xvid_vlc_trac7411.h263
fate-xvid-idctmmx: CMD = framemd5 -flags +bitexact -cpuflags all -i $(TARGET_SAMPLES)/mpeg4/xvid_vlc_trac7411.h263
fate-xvid-idct: CMD = framemd5 -flags +bitexact -cpuflags all -i $(TARGET_SAMPLES)/mpeg4/xvid_vlc_trac7411.h263
FATE_XVID-$(call DEMDEC, M4V, MPEG4) += fate-xvid-custom-matrix
FATE_XVID-$(filter $(HAVE_MMX_INLINE), $(call DEMDEC, M4V, MPEG4)) += fate-xvid-idctmmx
FATE_XVID-$(call DEMDEC, M4V, MPEG4) += fate-xvid-custom-matrix fate-xvid-idct
FATE_SAMPLES_AVCONV += $(FATE_XVID-yes)
......
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