dsputil: allow 9/10-bit functions for non-h264 codecs
Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
42c27f2eca
commit
a82beafd64
@ -3192,22 +3192,19 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
|||||||
dspfunc2(avg_h264_qpel, 1, 8, depth);\
|
dspfunc2(avg_h264_qpel, 1, 8, depth);\
|
||||||
dspfunc2(avg_h264_qpel, 2, 4, depth);
|
dspfunc2(avg_h264_qpel, 2, 4, depth);
|
||||||
|
|
||||||
if (avctx->codec_id != CODEC_ID_H264 || avctx->bits_per_raw_sample == 8) {
|
|
||||||
BIT_DEPTH_FUNCS(8)
|
|
||||||
} else {
|
|
||||||
switch (avctx->bits_per_raw_sample) {
|
switch (avctx->bits_per_raw_sample) {
|
||||||
case 9:
|
case 9:
|
||||||
BIT_DEPTH_FUNCS(9)
|
BIT_DEPTH_FUNCS(9);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
BIT_DEPTH_FUNCS(10)
|
BIT_DEPTH_FUNCS(10);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", avctx->bits_per_raw_sample);
|
av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", avctx->bits_per_raw_sample);
|
||||||
BIT_DEPTH_FUNCS(8)
|
case 8:
|
||||||
|
BIT_DEPTH_FUNCS(8);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (HAVE_MMX) dsputil_init_mmx (c, avctx);
|
if (HAVE_MMX) dsputil_init_mmx (c, avctx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user