-static av_cold int decode_close(AVCodecContext *avctx)
-{
- AVFrame *pic = avctx->coded_frame;
- if (pic->data[0])
- avctx->release_buffer(avctx, pic);
- av_freep(&avctx->coded_frame);
-
- return 0;
-}
-
-AVCodec r210_decoder = {
- "r210",
- CODEC_TYPE_VIDEO,
- CODEC_ID_R210,
- 0,
- decode_init,
- NULL,
- decode_close,
- decode_frame,
- CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
+#if CONFIG_R210_DECODER
+AVCodec ff_r210_decoder = {
+ .name = "r210",
+ .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_R210,
+ .init = decode_init,
+ .decode = decode_frame,
+ .capabilities = AV_CODEC_CAP_DR1,
+};
+#endif
+#if CONFIG_R10K_DECODER
+AVCodec ff_r10k_decoder = {
+ .name = "r10k",
+ .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_R10K,
+ .init = decode_init,
+ .decode = decode_frame,
+ .capabilities = AV_CODEC_CAP_DR1,