-
Notifications
You must be signed in to change notification settings - Fork 1.5k
filter: add scale_d3d11 support for MF encoders #7115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
{ | ||
hb_dict_set_int(avsettings, "width", width); | ||
hb_dict_set_int(avsettings, "height", height); | ||
hb_dict_set(avfilter, "scale_d3d11", avsettings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can scale_d3d11 convert from one color range to another? If not the output will not be correct if the source color range is not the same as the output one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, scale_d3d11 does not handle color range conversion. Would it be okay to disable the full hardware pipeline in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some seriously broken video out there that can change the color range mid-stream, so in those cases it would still break, but yes we can disable it for now.
8964316
to
7424c76
Compare
libhb/work.c
Outdated
hb_hwaccel_t *hwaccel = hb_get_hwaccel(job->hw_pix_fmt); | ||
|
||
if (hb_video_encoder_pix_fmt_is_supported(job->vcodec, job->input_pix_fmt, job->encoder_profile) == 0 || | ||
(hwaccel && (hwaccel->caps & HB_HWACCEL_CAP_FORMAT_REQUIRED))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should check if job->hw_pix_fmt is not AV_PIX_FMT_NONE too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's actually job->hw_decode i believe. updated above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
job->hw_pix_fmt is the right one to check if the full hw accelerated pipeline is enabled or not.
Here's a sample file that changes resolution many times, to test if the scale filter in decavcodec.c works: https://www.swisstransfer.com/d/ff8e07db-72d3-421c-b214-5ce931217ae3 |
7424c76
to
e5d8b29
Compare
reinit_filters in decavcodec.c seems to be failing with this clip. will fix and update. thanks |
@galad87 After the commit FFmpeg#a7fe27f, the following in hbavfilter.c seems to fail Lines 132 to 133 in cb6439a
Error:
Do you know what might be causing this? |
Maybe the hw frames context needs to be passed at the creation time, it added after the creation right now. |
graph->input is being allocated within avfilter_graph_create_filter Lines 132 to 147 in cb6439a
|
Try to rebase it on #7201, it might or not improve the situation. |
Thanks, lemme try ✅ |
e5d8b29
to
c8b5e84
Compare
c8b5e84
to
8e7f680
Compare
8e7f680
to
59f76a8
Compare
@galad87 rebased to master. could you please review? thanks |
Description of Change:
Adds support for scale_d3d11 hardware scaling filter when using MediaFoundation encoders on Windows ARM64 devices
Patch A38 in contrib/ffmpeg fixes the static pool size exceeded error when using the full Hardware pipleine (#6523)
Tested on: