+ switch (asset->interlace_mode) {
+ case ILACE_MODE_TOP_FIRST:
+ if (ctx->codec->id == AV_CODEC_ID_MJPEG)
+ av_dict_set(&sopts, "field_order", "tt", 0);
+ else
+ av_dict_set(&sopts, "field_order", "tb", 0);
+ if (ctx->codec_id != AV_CODEC_ID_MJPEG)
+ av_dict_set(&sopts, "flags", "+ilme+ildct", 0);
+ break;
+ case ILACE_MODE_BOTTOM_FIRST:
+ if (ctx->codec->id == AV_CODEC_ID_MJPEG)
+ av_dict_set(&sopts, "field_order", "bb", 0);
+ else
+ av_dict_set(&sopts, "field_order", "bt", 0);
+ if (ctx->codec_id != AV_CODEC_ID_MJPEG)
+ av_dict_set(&sopts, "flags", "+ilme+ildct", 0);
+ break;
+ case ILACE_MODE_NOTINTERLACED: av_dict_set(&sopts, "field_order", "progressive", 0); break;
+ }