OpenVisualCloud / SVT-HEVC

SVT HEVC encoder. Scalable Video Technology (SVT) is a software-based video coding technology that is highly optimized for Intel® Xeon® processors. Using the open source SVT-HEVC encoder, it is possible to spread video encoding processing across multiple Intel® Xeon® processors to achieve a real advantage of processing efficiency.
Other
518 stars 170 forks source link

ffmpeg_plugin failes to apply with the most recent ffmpeg release #590

Closed akwrobel closed 3 years ago

akwrobel commented 3 years ago

ffmpeg released n4.4 on April 8th - https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4 When attempting to apply the 0001 patch on n4.4 the patch fails noting configuration issues and that the patch does not apply.

/ffmpeg ((n4.4)) $ git am ../SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch error: patch failed: configure:267 error: configure: patch does not apply error: patch failed: libavcodec/Makefile:1008 error: libavcodec/Makefile: patch does not apply error: patch failed: libavcodec/allcodecs.c:720 error: libavcodec/allcodecs.c: patch does not apply hint: Use 'git am --show-current-patch=diff' to see the failed patch Applying: lavc/svt_hevc: add libsvt hevc encoder wrapper Patch failed at 0001 lavc/svt_hevc: add libsvt hevc encoder wrapper
tianjunwork commented 3 years ago

Hi @akwrobel , thank you for reporting the issue. Hi @guojiansheng0925 , could you take a look? Thank you.

guojiansheng0925 commented 3 years ago

Hi @akwrobel , I have tried to apply the current patch to FFmpeg n4.4 and it works well:

gjs@gjs-Z170X-UD5:~/code/svt$ cp -r ffmpeg/ ffmpeg_n4.4
gjs@gjs-Z170X-UD5:~/code/svt$ cd ffmpeg_n4.4/
gjs@gjs-Z170X-UD5:~/code/svt/ffmpeg_n4.4$ git checkout n4.4
Note: checking out 'n4.4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at dc91b91... RELEASE_NOTES: Based on the version from 4.3
gjs@gjs-Z170X-UD5:~/code/svt/ffmpeg_n4.4$ git am ../SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch
Applying: lavc/svt_hevc: add libsvt hevc encoder wrapper
gjs@gjs-Z170X-UD5:~/code/svt/ffmpeg_n4.4$

And the patch will fail to apply when the version of FFmpeg is newer than the commit

commit a247ac640df3da573cd661065bf53f37863e2b46
Author: Andreas Rheinhardt andreas.rheinhardt@gmail.com
Date: Thu Feb 25 10:50:26 2021 +0100

avcodec: Constify AVCodecs

Given that the AVCodec.next pointer has now been removed, most of the
AVCodecs are not modified at all any more and can therefore be made
const (as this patch does); the only exceptions are the very few codecs
for external libraries that have a init_static_data callback.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>

Could you please check the commit message in your FFmpeg code? You can try the new patch for master branch in #591 if your code is newer than a247ac.

Thanks Jiansheng

akwrobel commented 3 years ago

Hi Jiansheng,

The n4.4 release is from a later commit. Please see the link I included in my first message.
The expected commit is: commit dc91b913b6260e85e1304c74ff7bb3c22a8c9fb1

This is the build I am using: ffmpeg ((n4.4)) $ git log commit dc91b913b6260e85e1304c74ff7bb3c22a8c9fb1 (grafted, HEAD, tag: n4.4) Author: Michael Niedermayer michael@niedermayer.cc Date: Fri Nov 2 01:36:21 2018 +0100

RELEASE_NOTES: Based on the version from 4.3

Name suggested by Lynne, Gyan, Reto, Zane, Jan, Derek

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
akwrobel commented 3 years ago

@tianjunwork The updated patch is not in the most recent release. What is the timeline for the release?

tianjunwork commented 3 years ago

Hi @akwrobel , we are good on ffmpeg n4.4 now, right? Minor release is flexible, can be based on request. Does it work for you?

akwrobel commented 3 years ago

@tianjunwork, I've confirmed the new patch applies without error to ffmpeg n.4.4. Our intention was to include this update to ffmpeg in our pending release, so we would very much like to request a minor release. How long will it take for SVT-HEVC to have a released version that is compatible with the latest released version of ffmepeg?

akwrobel commented 3 years ago

@guojiansheng0925 I've confirmed with @tianjunwork and on several systems here that the existing v1.5.0 patch does not apply correctly when pulled from a fresh repo. I've opened a new issue to request a release of the n4.4 supporting patch