Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer authored on 2011/10/15 02:30:10... | ... |
@@ -70,7 +70,7 @@ static av_cold int decode_init(AVCodecContext *avctx) |
70 | 70 |
avctx->bits_per_raw_sample = 10; |
71 | 71 |
|
72 | 72 |
dsputil_init(&ctx->dsp, avctx); |
73 |
- ff_proresdsp_init(&ctx->prodsp); |
|
73 |
+ ff_proresdsp_init(&ctx->prodsp, avctx); |
|
74 | 74 |
|
75 | 75 |
avctx->coded_frame = &ctx->frame; |
76 | 76 |
ctx->frame.type = FF_I_TYPE; |
... | ... |
@@ -107,7 +107,7 @@ static av_cold int decode_init(AVCodecContext *avctx) |
107 | 107 |
avctx->pix_fmt = PIX_FMT_YUV422P10; // set default pixel format |
108 | 108 |
|
109 | 109 |
avctx->bits_per_raw_sample = PRORES_BITS_PER_SAMPLE; |
110 |
- ff_proresdsp_init(&ctx->dsp); |
|
110 |
+ ff_proresdsp_init(&ctx->dsp, avctx); |
|
111 | 111 |
|
112 | 112 |
avctx->coded_frame = &ctx->picture; |
113 | 113 |
avcodec_get_frame_defaults(&ctx->picture); |
... | ... |
@@ -51,12 +51,12 @@ static void prores_idct_put_c(uint16_t *out, int linesize, DCTELEM *block, const |
51 | 51 |
put_pixels(out, linesize >> 1, block); |
52 | 52 |
} |
53 | 53 |
|
54 |
-void ff_proresdsp_init(ProresDSPContext *dsp) |
|
54 |
+void ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx) |
|
55 | 55 |
{ |
56 | 56 |
dsp->idct_put = prores_idct_put_c; |
57 | 57 |
dsp->idct_permutation_type = FF_NO_IDCT_PERM; |
58 | 58 |
|
59 |
- if (HAVE_MMX) ff_proresdsp_x86_init(dsp); |
|
59 |
+ if (HAVE_MMX) ff_proresdsp_x86_init(dsp, avctx); |
|
60 | 60 |
|
61 | 61 |
ff_init_scantable_permutation(dsp->idct_permutation, |
62 | 62 |
dsp->idct_permutation_type); |
... | ... |
@@ -33,8 +33,8 @@ typedef struct { |
33 | 33 |
void (* idct_put) (uint16_t *out, int linesize, DCTELEM *block, const int16_t *qmat); |
34 | 34 |
} ProresDSPContext; |
35 | 35 |
|
36 |
-void ff_proresdsp_init(ProresDSPContext *dsp); |
|
36 |
+void ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx); |
|
37 | 37 |
|
38 |
-void ff_proresdsp_x86_init(ProresDSPContext *dsp); |
|
38 |
+void ff_proresdsp_x86_init(ProresDSPContext *dsp, AVCodecContext *avctx); |
|
39 | 39 |
|
40 | 40 |
#endif /* AVCODEC_PRORESDSP_H */ |
... | ... |
@@ -29,11 +29,14 @@ void ff_prores_idct_put_10_sse4(uint16_t *dst, int linesize, |
29 | 29 |
void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize, |
30 | 30 |
DCTELEM *block); |
31 | 31 |
|
32 |
-void ff_proresdsp_x86_init(ProresDSPContext *dsp) |
|
32 |
+void ff_proresdsp_x86_init(ProresDSPContext *dsp, AVCodecContext *avctx) |
|
33 | 33 |
{ |
34 | 34 |
#if ARCH_X86_64 && HAVE_YASM |
35 | 35 |
int flags = av_get_cpu_flags(); |
36 | 36 |
|
37 |
+ if(avctx->flags & CODEC_FLAG_BITEXACT) |
|
38 |
+ return; |
|
39 |
+ |
|
37 | 40 |
if (flags & AV_CPU_FLAG_SSE2) { |
38 | 41 |
dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
39 | 42 |
dsp->idct_put = ff_prores_idct_put_10_sse2; |
... | ... |
@@ -7,9 +7,9 @@ FATE_PRORES = fate-prores-422 \ |
7 | 7 |
FATE_TESTS += $(FATE_PRORES) |
8 | 8 |
fate-prores: $(FATE_PRORES) |
9 | 9 |
|
10 |
-fate-prores-422: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422.mov |
|
11 |
-fate-prores-422_hq: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_HQ.mov |
|
12 |
-fate-prores-422_lt: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov |
|
13 |
-fate-prores-422_proxy: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov |
|
14 |
-fate-prores-alpha: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov |
|
10 |
+fate-prores-422: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422.mov |
|
11 |
+fate-prores-422_hq: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_HQ.mov |
|
12 |
+fate-prores-422_lt: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov |
|
13 |
+fate-prores-422_proxy: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov |
|
14 |
+fate-prores-alpha: CMD = framecrc -flags +bitexact -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov |
|
15 | 15 |
|