if(index <= 6) put_bits(pb, level_tab[index][1], level_tab[index][0]);
else{
put_bits(pb, level_tab[3][1], level_tab[3][0]);
- put_bits(pb, 8, level&0xFF);
+ put_sbits(pb, 8, level);
}
}
return (get_bits_count(&a->gb)+31)/32*4;
}
-#ifdef CONFIG_ENCODERS
+#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
ASV1Context * const a = avctx->priv_data;
AVFrame *pict = data;
return size*4;
}
-#endif /* CONFIG_ENCODERS */
+#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
static av_cold void common_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
return 0;
}
-#ifdef CONFIG_ENCODERS
+#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
static av_cold int encode_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
int i;
return 0;
}
-#endif
+#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
static av_cold int decode_end(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
decode_end,
decode_frame,
CODEC_CAP_DR1,
+ .long_name= NULL_IF_CONFIG_SMALL("ASUS V1"),
};
AVCodec asv2_decoder = {
decode_end,
decode_frame,
CODEC_CAP_DR1,
+ .long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
};
-#ifdef CONFIG_ENCODERS
-
+#ifdef CONFIG_ASV1_ENCODER
AVCodec asv1_encoder = {
"asv1",
CODEC_TYPE_VIDEO,
encode_init,
encode_frame,
//encode_end,
- .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1},
+ .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
+ .long_name= NULL_IF_CONFIG_SMALL("ASUS V1"),
};
+#endif
+#ifdef CONFIG_ASV2_ENCODER
AVCodec asv2_encoder = {
"asv2",
CODEC_TYPE_VIDEO,
encode_init,
encode_frame,
//encode_end,
- .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1},
+ .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
+ .long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
};
-
-#endif //CONFIG_ENCODERS
+#endif