| 825 | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size); |
| 826 | |
| 827 | static av_cold void common_init(H264Context *h){ |
| 828 | MpegEncContext * const s = &h->s; |
| 829 | |
| 830 | s->width = s->avctx->width; |
| 831 | s->height = s->avctx->height; |
| 832 | s->codec_id= s->avctx->codec->id; |
| 833 | |
| 834 | ff_h264dsp_init(&h->h264dsp); |
| 835 | ff_h264_pred_init(&h->hpc, s->codec_id); |
| 836 | |
| 837 | h->dequant_coeff_pps= -1; |
| 838 | s->unrestricted_mv=1; |
| 839 | s->decode=1; //FIXME |
| 840 | |
| 841 | dsputil_init(&s->dsp, s->avctx); // needed so that idct permutation is known early |
| 842 | |
| 843 | memset(h->pps.scaling_matrix4, 16, 6*16*sizeof(uint8_t)); |
| 844 | memset(h->pps.scaling_matrix8, 16, 2*64*sizeof(uint8_t)); |
| 845 | } |
| 846 | |
| 847 | av_cold int ff_h264_decode_init(AVCodecContext *avctx){ |
| 848 | H264Context *h= avctx->priv_data; |
no test coverage detected