Commit a82beafd authored by Mans Rullgard's avatar Mans Rullgard

dsputil: allow 9/10-bit functions for non-h264 codecs

Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent 42c27f2e
...@@ -3192,21 +3192,18 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) ...@@ -3192,21 +3192,18 @@ 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) { switch (avctx->bits_per_raw_sample) {
BIT_DEPTH_FUNCS(8) case 9:
} else { BIT_DEPTH_FUNCS(9);
switch (avctx->bits_per_raw_sample) { break;
case 9: case 10:
BIT_DEPTH_FUNCS(9) BIT_DEPTH_FUNCS(10);
break; break;
case 10: default:
BIT_DEPTH_FUNCS(10) av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", avctx->bits_per_raw_sample);
break; case 8:
default: BIT_DEPTH_FUNCS(8);
av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", avctx->bits_per_raw_sample); break;
BIT_DEPTH_FUNCS(8)
break;
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment