| 253 | } |
| 254 | |
| 255 | static av_cold int rv60_decode_init(AVCodecContext * avctx) |
| 256 | { |
| 257 | static AVOnce init_static_once = AV_ONCE_INIT; |
| 258 | RV60Context *s = avctx->priv_data; |
| 259 | |
| 260 | s->avctx = avctx; |
| 261 | |
| 262 | ff_videodsp_init(&s->vdsp, 8); |
| 263 | |
| 264 | avctx->pix_fmt = AV_PIX_FMT_YUV420P; |
| 265 | |
| 266 | for (int i = 0; i < 3; i++) { |
| 267 | s->last_frame[i] = av_frame_alloc(); |
| 268 | if (!s->last_frame[i]) |
| 269 | return AVERROR(ENOMEM); |
| 270 | } |
| 271 | |
| 272 | ff_thread_once(&init_static_once, rv60_init_static_data); |
| 273 | |
| 274 | return 0; |
| 275 | } |
| 276 | |
| 277 | static int update_dimensions_clear_info(RV60Context *s, int width, int height) |
| 278 | { |
nothing calls this directly
no test coverage detected