unsigned int num_fmts, i, j = 0;
bool skip_mode_none, enum_all_formats;
u32 index = f->index & ~V4L2_FMTDESC_FLAG_ENUM_ALL;
+ bool need_postproc = ctx->need_postproc;
/*
* If the V4L2_FMTDESC_FLAG_ENUM_ALL flag is set, we want to enumerate all
enum_all_formats = !!(f->index & V4L2_FMTDESC_FLAG_ENUM_ALL);
f->index = index;
+ if (enum_all_formats)
+ need_postproc = HANTRO_AUTO_POSTPROC;
+
/*
* When dealing with an encoder:
* - on the capture side we want to filter out all MODE_NONE formats.
*/
skip_mode_none = capture == ctx->is_encoder;
- formats = hantro_get_formats(ctx, &num_fmts, HANTRO_AUTO_POSTPROC);
+ formats = hantro_get_formats(ctx, &num_fmts, need_postproc);
for (i = 0; i < num_fmts; i++) {
bool mode_none = formats[i].codec_mode == HANTRO_MODE_NONE;
fmt = &formats[i];