+ ctx->component_size = 4;
+ } else if (avctx->codec_tag == MKTAG('R', 'S', 'C', 'C')) {
+ ctx->component_size = avctx->bits_per_coded_sample / 8;
+ switch (avctx->bits_per_coded_sample) {
+ case 8:
+ avpriv_report_missing_feature(avctx, "8 bits per pixel");
+ return AVERROR_PATCHWELCOME;
+ case 16:
+ avctx->pix_fmt = AV_PIX_FMT_RGB555LE;
+ break;
+ case 24:
+ avctx->pix_fmt = AV_PIX_FMT_BGR24;
+ break;
+ case 32:
+ avctx->pix_fmt = AV_PIX_FMT_BGRA;
+ break;
+ default:
+ av_log(avctx, AV_LOG_ERROR, "Invalid bits per pixel value (%d)\n",
+ avctx->bits_per_coded_sample);
+ return AVERROR_INVALIDDATA;
+ }