diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-10-04 22:13:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-05 00:07:39 +0200 |
commit | a51fbb56bb9352476affaef1fc6773c8b059db91 (patch) | |
tree | 5ff1d211a4672f8675c8ba8d3adae65973c60bc7 | |
parent | 751a4efd4d754b15ebc6027b09051f27860bb1e8 (diff) | |
download | ffmpeg-a51fbb56bb9352476affaef1fc6773c8b059db91.tar.gz |
h254: explicitly initialize bit depth/chroma idc
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 07e61efb05..718b12832c 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -992,13 +992,19 @@ static av_cold void common_init(H264Context *h){ s->height = s->avctx->height; s->codec_id= s->avctx->codec->id; - ff_h264dsp_init(&h->h264dsp, 8, 1); - ff_h264_pred_init(&h->hpc, s->codec_id, 8, 1); + s->avctx->bits_per_raw_sample = 8; + h->cur_chroma_format_idc = 1; + + ff_h264dsp_init(&h->h264dsp, + s->avctx->bits_per_raw_sample, h->cur_chroma_format_idc); + ff_h264_pred_init(&h->hpc, s->codec_id, + s->avctx->bits_per_raw_sample, h->cur_chroma_format_idc); h->dequant_coeff_pps= -1; s->unrestricted_mv=1; s->decode=1; //FIXME + s->dsp.dct_bits = 16; dsputil_init(&s->dsp, s->avctx); // needed so that idct permutation is known early memset(h->pps.scaling_matrix4, 16, 6*16*sizeof(uint8_t)); |