aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-04-05 21:02:56 +0200
committerAnton Khirnov <anton@khirnov.net>2015-04-05 21:02:56 +0200
commit249796e2560c2cce1add722c3e873de96b17be74 (patch)
tree749845bb9d1072b3136a8cbd1e2163536e2f7876 /libavcodec
parent5637ff01218a44fcc1fff9b4382a15a6470abcc9 (diff)
downloadffmpeg-249796e2560c2cce1add722c3e873de96b17be74.tar.gz
svq3: initialize some required H264Context fields.
They are no longer initialized in ff_h264_decode_init() since 43fd3dd, so svq3 needs to initialize the manually. Fixes svq3 decoding, broken since 43fd3dd.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/svq3.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 00e7c89e8f..6c877bddea 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -887,6 +887,18 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
if (ff_h264_decode_init(avctx) < 0)
return -1;
+ ff_h264dsp_init(&h->h264dsp, 8, 1);
+ ff_h264chroma_init(&h->h264chroma, 8);
+ ff_h264qpel_init(&h->h264qpel, 8);
+ ff_h264_pred_init(&h->hpc, AV_CODEC_ID_SVQ3, 8, 1);
+ ff_videodsp_init(&h->vdsp, 8);
+
+ memset(h->pps.scaling_matrix4, 16, 6 * 16 * sizeof(uint8_t));
+ memset(h->pps.scaling_matrix8, 16, 2 * 64 * sizeof(uint8_t));
+
+ h->sps.bit_depth_luma = 8;
+ h->chroma_format_idc = 1;
+
ff_hpeldsp_init(&s->hdsp, avctx->flags);
ff_tpeldsp_init(&s->tdsp);