MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / decode_init

Function decode_init

libavcodec/4xm.c:805–821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803}
804
805static av_cold int decode_init(AVCodecContext *avctx){
806 FourXContext * const f = avctx->priv_data;
807
808 if(avctx->extradata_size != 4 || !avctx->extradata) {
809 av_log(avctx, AV_LOG_ERROR, "extradata wrong or missing\n");
810 return 1;
811 }
812
813 f->version= AV_RL32(avctx->extradata)>>16;
814 common_init(avctx);
815 init_vlcs(f);
816
817 if(f->version>2) avctx->pix_fmt= PIX_FMT_RGB565;
818 else avctx->pix_fmt= PIX_FMT_BGR555;
819
820 return 0;
821}
822
823
824static av_cold int decode_end(AVCodecContext *avctx){

Callers

nothing calls this directly

Calls 4

av_logFunction · 0.85
common_initFunction · 0.70
init_vlcsFunction · 0.70
AV_RL32Function · 0.50

Tested by

no test coverage detected