summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-07-21 02:21:14 +0100
committerMans Rullgard <mans@mansr.com>2011-07-21 09:26:26 +0100
commita82beafd64529cba8c20bd24f63d6af7dccffb7d (patch)
tree05755e81c72e24c455596af305b9a639d24061ce /libavcodec
parent42c27f2ecae38abd7d6b75070998fb2f98089389 (diff)
dsputil: allow 9/10-bit functions for non-h264 codecs
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dsputil.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index fa9b591fad..4008389a9d 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -3192,21 +3192,18 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
dspfunc2(avg_h264_qpel, 1, 8, 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) {
- case 9:
- BIT_DEPTH_FUNCS(9)
- break;
- case 10:
- BIT_DEPTH_FUNCS(10)
- break;
- default:
- av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", avctx->bits_per_raw_sample);
- BIT_DEPTH_FUNCS(8)
- break;
- }
+ switch (avctx->bits_per_raw_sample) {
+ case 9:
+ BIT_DEPTH_FUNCS(9);
+ break;
+ case 10:
+ BIT_DEPTH_FUNCS(10);
+ break;
+ default:
+ av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", avctx->bits_per_raw_sample);
+ case 8:
+ BIT_DEPTH_FUNCS(8);
+ break;
}