mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ppc: fix usage of dsp_mask
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
30ba924bc8
commit
8045af65d4
@ -146,6 +146,14 @@ static void prefetch_ppc(void *mem, int stride, int h)
|
||||
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
|
||||
{
|
||||
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
|
||||
int mm_flags = av_get_cpu_flags();
|
||||
|
||||
if (avctx->dsp_mask) {
|
||||
if (avctx->dsp_mask & AV_CPU_FLAG_FORCE)
|
||||
mm_flags |= (avctx->dsp_mask & 0xffff);
|
||||
else
|
||||
mm_flags &= ~(avctx->dsp_mask & 0xffff);
|
||||
}
|
||||
|
||||
// Common optimizations whether AltiVec is available or not
|
||||
c->prefetch = prefetch_ppc;
|
||||
@ -165,7 +173,7 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
|
||||
#if HAVE_ALTIVEC
|
||||
if(CONFIG_H264_DECODER) dsputil_h264_init_ppc(c, avctx);
|
||||
|
||||
if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
|
||||
if (mm_flags & AV_CPU_FLAG_ALTIVEC) {
|
||||
dsputil_init_altivec(c, avctx);
|
||||
float_init_altivec(c, avctx);
|
||||
int_init_altivec(c, avctx);
|
||||
|
Loading…
Reference in New Issue
Block a user