-#if 0
-static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
- VCR1Context * const a = avctx->priv_data;
- AVFrame *pict = data;
- AVFrame * const p= (AVFrame*)&a->picture;
- int size;
- int mb_x, mb_y;
-
- *p = *pict;
- p->pict_type= I_TYPE;
- p->key_frame= 1;
-
- emms_c();
-
- align_put_bits(&a->pb);
- while(get_bit_count(&a->pb)&31)
- put_bits(&a->pb, 8, 0);
-
- size= get_bit_count(&a->pb)/32;
-
- return size*4;
-}
-#endif
-
-static void common_init(AVCodecContext *avctx){
- VCR1Context * const a = avctx->priv_data;
-
- avctx->coded_frame= (AVFrame*)&a->picture;
- a->avctx= avctx;
-}
-
-static int decode_init(AVCodecContext *avctx){
-
- common_init(avctx);
-
- avctx->pix_fmt= PIX_FMT_YUV410P;
-
- return 0;
-}
-
-#if 0
-static int encode_init(AVCodecContext *avctx){
-
- common_init(avctx);
-
- return 0;
-}
-#endif
-
-AVCodec vcr1_decoder = {
- "vcr1",
- CODEC_TYPE_VIDEO,
- CODEC_ID_VCR1,
- sizeof(VCR1Context),
- decode_init,
- NULL,
- NULL,
- decode_frame,
- CODEC_CAP_DR1,
+AVCodec ff_vcr1_decoder = {
+ .name = "vcr1",
+ .long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_VCR1,
+ .priv_data_size = sizeof(VCR1Context),
+ .init = vcr1_decode_init,
+ .decode = vcr1_decode_frame,
+ .capabilities = AV_CODEC_CAP_DR1,