| 803 | } |
| 804 | |
| 805 | static 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 | |
| 824 | static av_cold int decode_end(AVCodecContext *avctx){ |
nothing calls this directly
no test coverage detected