History

lavfi/vf_vpp_qsv: scale_mode can be applied to color conversion

Haihao Xiang committed 3 years ago

Commit 0ae45911 parent 7a856581 file · +4 −4Browse files

Unified · Split

libavfilter/vf_vpp_qsv.c+4−4
@@ -133,7 +133,7 @@ static const AVOption options[] = { · 132 unmodified lines
133133 { "height", "Output video height", OFFSET(oh), AV_OPT_TYPE_STRING, { .str="w*ch/cw" }, 0, 255, .flags = FLAGS },
134134 { "format", "Output pixel format", OFFSET(output_format_str), AV_OPT_TYPE_STRING, { .str = "same" }, .flags = FLAGS },
135135 { "async_depth", "Internal parallelization depth, the higher the value the higher the latency.", OFFSET(async_depth), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = FLAGS },
136− { "scale_mode", "scale mode: 0=auto, 1=low power, 2=high quality", OFFSET(scale_mode), AV_OPT_TYPE_INT, { .i64 = MFX_SCALING_MODE_DEFAULT }, MFX_SCALING_MODE_DEFAULT, MFX_SCALING_MODE_QUALITY, .flags = FLAGS, "scale mode" },
136+ { "scale_mode", "scale & format conversion mode: 0=auto, 1=low power, 2=high quality", OFFSET(scale_mode), AV_OPT_TYPE_INT, { .i64 = MFX_SCALING_MODE_DEFAULT }, MFX_SCALING_MODE_DEFAULT, MFX_SCALING_MODE_QUALITY, .flags = FLAGS, "scale mode" },
137137 { NULL }
138138 };
139139
@@ -492,7 +492,7 @@ static int config_output(AVFilterLink *outlink) · 352 unmodified lines
492492 }
493493 }
494494
495− if (inlink->w != outlink->w || inlink->h != outlink->h) {
495+ if (inlink->w != outlink->w || inlink->h != outlink->h || in_format != vpp->out_format) {
496496 if (QSV_RUNTIME_VERSION_ATLEAST(mfx_version, 1, 19)) {
497497 memset(&vpp->scale_conf, 0, sizeof(mfxExtVPPScaling));
498498 vpp->scale_conf.Header.BufferId = MFX_EXTBUFF_VPP_SCALING;
@@ -501,8 +501,8 @@ static int config_output(AVFilterLink *outlink) · 2 unmodified lines
501501
502502 param.ext_buf[param.num_ext_buf++] = (mfxExtBuffer*)&vpp->scale_conf;
503503 } else
504− av_log(ctx, AV_LOG_WARNING, "The QSV VPP Scale option is "
505− "not supported with this MSDK version.\n");
504+ av_log(ctx, AV_LOG_WARNING, "The QSV VPP Scale & format conversion "
505+ "option is not supported with this MSDK version.\n");
506506 }
507507
508508 if (vpp->use_frc || vpp->use_crop || vpp->deinterlace || vpp->denoise ||

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t