PixblockDSPContext pdsp;
ff_pixblockdsp_init(&pdsp, avctx);
COPY(pdsp, get_pixels);
+ COPY(pdsp, get_pixels_unaligned);
}
#endif
ptrdiff_t line_size);
int bits_per_sample;
+
+ void (*get_pixels_unaligned)(int16_t *block /* align 16 */,
+ const uint8_t *pixels,
+ ptrdiff_t line_size);
} AVDCT;
/**
case 10:
case 12:
case 14:
+ c->get_pixels_unaligned =
c->get_pixels = get_pixels_16_c;
break;
default:
if (avctx->bits_per_raw_sample<=8 || avctx->codec_type != AVMEDIA_TYPE_VIDEO) {
+ c->get_pixels_unaligned =
c->get_pixels = get_pixels_8_c;
}
break;
void (*get_pixels)(int16_t *av_restrict block /* align 16 */,
const uint8_t *pixels /* align 8 */,
ptrdiff_t stride);
+ void (*get_pixels_unaligned)(int16_t *av_restrict block /* align 16 */,
+ const uint8_t *pixels,
+ ptrdiff_t stride);
void (*diff_pixels)(int16_t *av_restrict block /* align 16 */,
const uint8_t *s1 /* align 8 */,
const uint8_t *s2 /* align 8 */,
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(cpu_flags)) {
- if (!high_bit_depth)
+ if (!high_bit_depth) {
+ c->get_pixels_unaligned =
c->get_pixels = ff_get_pixels_mmx;
+ }
c->diff_pixels_unaligned =
c->diff_pixels = ff_diff_pixels_mmx;
}
if (EXTERNAL_SSE2(cpu_flags)) {
- if (!high_bit_depth)
+ if (!high_bit_depth) {
+ c->get_pixels_unaligned =
c->get_pixels = ff_get_pixels_sse2;
+ }
c->diff_pixels_unaligned =
c->diff_pixels = ff_diff_pixels_sse2;
}
const int x1 = x + offset[i + count - 1][0];
const int y1 = y + offset[i + count - 1][1];
const int index = x1 + y1*linesize;
- p->dct->get_pixels(block, p->src + sample_bytes*index, sample_bytes*linesize);
+ p->dct->get_pixels_unaligned(block, p->src + sample_bytes*index, sample_bytes*linesize);
p->dct->fdct(block);
p->requantize(block2, block, qp, p->dct->idct_permutation);
p->dct->idct(block2);