Skip to content
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

vaapi_encode_av1: Fix build error C2099: initializer is not a constant #209

Closed
wants to merge 3 commits into from

Conversation

sivileri
Copy link
Contributor

@sivileri sivileri commented Jan 5, 2023

When intel-media-ci/ffmpeg#619 lands, we'll have ffmpeg/vaapi support on Windows.

A C2099 build error is found when applying https://github.com/intel-media-ci/cartwheel-ffmpeg/blob/master/patches/0071-lavc-vaapi-support-av1-encode.patch . This patch fixes the build issue by replacing the non constant av_log2(64) with a constant value 6 (2^6 = 64).

cc @xuguangxin @xhaihao @feiwan1 @wenbinc-Bin @galinart

@uartie
Copy link
Contributor

uartie commented Jan 5, 2023

Patch fails to apply to submodule

@uartie
Copy link
Contributor

uartie commented Jan 5, 2023

Does this depend on #208?

@xhaihao
Copy link
Contributor

xhaihao commented Jan 6, 2023

Does this depend on #208?

Seems this doesn't depend on #208.

@sivileri When we submit patches to FFmpeg ML, we should make sure each patch is compilable and runnable. Could you please update the original patch ?

@intel-media-ci
Copy link
Contributor

No updates/response to reviews in last week. Closing to minimize CI resource use. Feel free to reopen when your reviews have been addressed and updates applied.

@sivileri
Copy link
Contributor Author

@uartie @xhaihao apologies for the delay I just came back to office. Looks like I should update the original patch file https://github.com/intel-media-ci/cartwheel-ffmpeg/blob/master/patches/0071-lavc-vaapi-support-av1-encode.patch like #208 does instead of creating a new patch on top of it, correct?

The way I'm doing it is:

  1. git clone https://github.com/intel/cartwheel-ffmpeg --recursive
  2. cd cartwheel-ffmpeg
  3. git submodule update --init --recursive
  4. cd ffmpeg
  5. git checkout -b fix_msvc_av1_error
  6. git am (dir ..\patches*.patch)
  7. Modify the code with the changes in this PR to avoid the build error

After step (7), previously I created a new local commit and did git show mycommitSHA > patch-file.patch which I posted in this PR.

Could you please advise how to instead generate the changes into directly into https://github.com/intel-media-ci/cartwheel-ffmpeg/blob/master/patches/0071-lavc-vaapi-support-av1-encode.patch ? Thanks!

@uartie
Copy link
Contributor

uartie commented Jan 26, 2023

You'll want to squash your changes into the original commit that is applied to your working branch (e.g. git rebase -i ...). Then use git format-patch .... Finally, copy the targeted patch into the patches directory, replacing the original. Maybe @xhaihao knows a more efficient way, but that is how I do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants