aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-07-21 12:39:41 +0100
committerMans Rullgard <mans@mansr.com>2011-07-21 18:10:58 +0100
commit5cc2600964c72dad995efb18c918a63e0965f8db (patch)
tree8b0c518a870efbcb4e2cd275a6d96d1ceabd1453 /libavcodec/h264.c
parent0a72533e9854aa615bb6d1569dd5f0c4cd031429 (diff)
downloadffmpeg-5cc2600964c72dad995efb18c918a63e0965f8db.tar.gz
dsputil: create 16/32-bit dctcoef versions of some functions
High bitdepth H.264 needs 32-bit transform coefficients, whereas dnxhd does not. This creates a conflict with the templated functions operating on DCTELEM data. This patch adds a field allowing the caller to choose the element size in dsputil_init() and adds the required functions. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 5adce242ce..928a96ab35 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3702,6 +3702,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma);
ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma);
+ s->dsp.dct_bits = h->sps.bit_depth_luma > 8 ? 32 : 16;
dsputil_init(&s->dsp, s->avctx);
} else {
av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);