Browse Source

prores: use C idct for fate as the SSE code is not matching the SSE* code down at the bits

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Michael Niedermayer 14 years ago
parent
commit
337496980e
11 changed files with 25 additions and 22 deletions
  1. +1
    -1
      libavcodec/proresdec.c
  2. +1
    -1
      libavcodec/proresdec_lgpl.c
  3. +2
    -2
      libavcodec/proresdsp.c
  4. +2
    -2
      libavcodec/proresdsp.h
  5. +4
    -1
      libavcodec/x86/proresdsp-init.c
  6. +5
    -5
      tests/fate/prores.mak
  7. +2
    -2
      tests/ref/fate/prores-422
  8. +2
    -2
      tests/ref/fate/prores-422_hq
  9. +2
    -2
      tests/ref/fate/prores-422_lt
  10. +2
    -2
      tests/ref/fate/prores-422_proxy
  11. +2
    -2
      tests/ref/fate/prores-alpha

+ 1
- 1
libavcodec/proresdec.c View File

@@ -70,7 +70,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->bits_per_raw_sample = 10; avctx->bits_per_raw_sample = 10;


dsputil_init(&ctx->dsp, avctx); dsputil_init(&ctx->dsp, avctx);
ff_proresdsp_init(&ctx->prodsp);
ff_proresdsp_init(&ctx->prodsp, avctx);


avctx->coded_frame = &ctx->frame; avctx->coded_frame = &ctx->frame;
ctx->frame.type = FF_I_TYPE; ctx->frame.type = FF_I_TYPE;


+ 1
- 1
libavcodec/proresdec_lgpl.c View File

@@ -107,7 +107,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->pix_fmt = PIX_FMT_YUV422P10; // set default pixel format avctx->pix_fmt = PIX_FMT_YUV422P10; // set default pixel format


avctx->bits_per_raw_sample = PRORES_BITS_PER_SAMPLE; avctx->bits_per_raw_sample = PRORES_BITS_PER_SAMPLE;
ff_proresdsp_init(&ctx->dsp);
ff_proresdsp_init(&ctx->dsp, avctx);


avctx->coded_frame = &ctx->picture; avctx->coded_frame = &ctx->picture;
avcodec_get_frame_defaults(&ctx->picture); avcodec_get_frame_defaults(&ctx->picture);


+ 2
- 2
libavcodec/proresdsp.c View File

@@ -51,12 +51,12 @@ static void prores_idct_put_c(uint16_t *out, int linesize, DCTELEM *block, const
put_pixels(out, linesize >> 1, block); put_pixels(out, linesize >> 1, block);
} }


void ff_proresdsp_init(ProresDSPContext *dsp)
void ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx)
{ {
dsp->idct_put = prores_idct_put_c; dsp->idct_put = prores_idct_put_c;
dsp->idct_permutation_type = FF_NO_IDCT_PERM; dsp->idct_permutation_type = FF_NO_IDCT_PERM;


if (HAVE_MMX) ff_proresdsp_x86_init(dsp);
if (HAVE_MMX) ff_proresdsp_x86_init(dsp, avctx);


ff_init_scantable_permutation(dsp->idct_permutation, ff_init_scantable_permutation(dsp->idct_permutation,
dsp->idct_permutation_type); dsp->idct_permutation_type);


+ 2
- 2
libavcodec/proresdsp.h View File

@@ -33,8 +33,8 @@ typedef struct {
void (* idct_put) (uint16_t *out, int linesize, DCTELEM *block, const int16_t *qmat); void (* idct_put) (uint16_t *out, int linesize, DCTELEM *block, const int16_t *qmat);
} ProresDSPContext; } ProresDSPContext;


void ff_proresdsp_init(ProresDSPContext *dsp);
void ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx);


void ff_proresdsp_x86_init(ProresDSPContext *dsp);
void ff_proresdsp_x86_init(ProresDSPContext *dsp, AVCodecContext *avctx);


#endif /* AVCODEC_PRORESDSP_H */ #endif /* AVCODEC_PRORESDSP_H */

+ 4
- 1
libavcodec/x86/proresdsp-init.c View File

@@ -29,11 +29,14 @@ void ff_prores_idct_put_10_sse4(uint16_t *dst, int linesize,
void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize, void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize,
DCTELEM *block); DCTELEM *block);


void ff_proresdsp_x86_init(ProresDSPContext *dsp)
void ff_proresdsp_x86_init(ProresDSPContext *dsp, AVCodecContext *avctx)
{ {
#if ARCH_X86_64 && HAVE_YASM #if ARCH_X86_64 && HAVE_YASM
int flags = av_get_cpu_flags(); int flags = av_get_cpu_flags();


if(avctx->flags & CODEC_FLAG_BITEXACT)
return;

if (flags & AV_CPU_FLAG_SSE2) { if (flags & AV_CPU_FLAG_SSE2) {
dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
dsp->idct_put = ff_prores_idct_put_10_sse2; dsp->idct_put = ff_prores_idct_put_10_sse2;


+ 5
- 5
tests/fate/prores.mak View File

@@ -7,9 +7,9 @@ FATE_PRORES = fate-prores-422 \
FATE_TESTS += $(FATE_PRORES) FATE_TESTS += $(FATE_PRORES)
fate-prores: $(FATE_PRORES) fate-prores: $(FATE_PRORES)


fate-prores-422: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422.mov
fate-prores-422_hq: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_HQ.mov
fate-prores-422_lt: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov
fate-prores-422_proxy: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov
fate-prores-alpha: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov
fate-prores-422: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422.mov
fate-prores-422_hq: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_HQ.mov
fate-prores-422_lt: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov
fate-prores-422_proxy: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov
fate-prores-alpha: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov



+ 2
- 2
tests/ref/fate/prores-422 View File

@@ -1,2 +1,2 @@
0, 0, 8294400, 0x57127dd9
0, 3003, 8294400, 0x57127dd9
0, 0, 8294400, 0xe8e9d448
0, 3003, 8294400, 0xe8e9d448

+ 2
- 2
tests/ref/fate/prores-422_hq View File

@@ -1,2 +1,2 @@
0, 0, 8294400, 0x978851f4
0, 3003, 8294400, 0x978851f4
0, 0, 8294400, 0x817063b0
0, 3003, 8294400, 0x817063b0

+ 2
- 2
tests/ref/fate/prores-422_lt View File

@@ -1,2 +1,2 @@
0, 0, 8294400, 0x4ca110c7
0, 3003, 8294400, 0x4ca110c7
0, 0, 8294400, 0xcd4ccde1
0, 3003, 8294400, 0xcd4ccde1

+ 2
- 2
tests/ref/fate/prores-422_proxy View File

@@ -1,2 +1,2 @@
0, 0, 8294400, 0x007ba770
0, 3003, 8294400, 0x007ba770
0, 0, 8294400, 0x3099e361
0, 3003, 8294400, 0x3099e361

+ 2
- 2
tests/ref/fate/prores-alpha View File

@@ -1,2 +1,2 @@
0, 0, 12441600, 0xf11685dd
0, 3003, 12441600, 0xf11685dd
0, 0, 12441600, 0x254d8f95
0, 3003, 12441600, 0x254d8f95

Loading…
Cancel
Save