+static av_cold int encode_init(AVCodecContext *avctx)
+{
+ int aligned_width = FFALIGN(avctx->width,
+ avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64);
+
+ avctx->bits_per_coded_sample = 32;
+ if (avctx->width > 0)
+ avctx->bit_rate = ff_guess_coded_bitrate(avctx) * aligned_width / avctx->width;
+
+ return 0;
+}
+