On Tue, Nov 19, 2024 at 6:59 PM Terje J. Hanssen
<[email protected]> wrote:
>
>
>
>
> Den 19.11.2024 15:08, skrev Andrew Randrianasulu:
>
>
>
> On Tue, Nov 19, 2024 at 1:56 PM Terje J. Hanssen <[email protected]> 
> wrote:
>>
>>
>>
>>
>> Den 19.11.2024 14:53, skrev Andrew Randrianasulu:
>>
>>
>>
>> On Tue, Nov 19, 2024 at 1:28 PM Terje J. Hanssen <[email protected]> 
>> wrote:
>>>
>>>
>>>
>>>
>>> Den 19.11.2024 06:58, skrev Andrew Randrianasulu:
>>>
>>>
>>>
>>> вт, 19 нояб. 2024 г., 03:47 Terje J. Hanssen <[email protected]>:
>>>>
>>>>
>>>> Den 18.11.2024 10:52, skrev Andrew Randrianasulu:
>>>>
>>>> It may work or break it completely ...
>>>>
>>>> apply by normal patch command  from inside thirdparty/ffmpeg (may be "cat 
>>>> pathname | patch  -p1", may be "cat  patchname | patch -p0") or edit 
>>>> libavcodec/qsvenc.c by hand.
>>>>
>>>> rebuild ffmpeg, do not do make clean,
>>>> cd ../../
>>>>  so you again in main directory with ./autogen.sh and bin directory with 
>>>> cinelerra.
>>>>
>>>> touch cinelerra/ffmpeg.C
>>>> make
>>>>
>>>> Hopefully this rebuild cin so on next start from bin/cin you will have 
>>>> something to test with tff sources.
>>>>
>>>> Unfortunately, netBSD does not support hardware virtualization on AMD 
>>>> cpus, so for now I do not have my virtual machines. I also forgot type of  
>>>> cable from PSU to disks, so now I can only power up one of two sata drives.
>>>>
>>>> It will be fixed eventually, but for now I hope to live up this netBSD 
>>>> install a bit ...
>>>>
>>>>
>>>>
>>>> To prepare for tomorrow, because else I am stuck:
>>>>
>>>> apply by normal patch command  from inside thirdparty/ffmpeg (may be "cat 
>>>> pathname | patch  -p1", may be "cat  patchname | patch -p0") or edit 
>>>> libavcodec/qsvenc.c by hand.
>>>>
>>>>
>>>> Should here be a patch attached to be able to use "git am patch"?
>>>
>>>
>>> I installed Fedora 40 in qemu on NetBSD (thankfully only booting from iso 
>>> as cdrom was not working on hw virtualization  - 4*3.9 {amd fx4300 } Ghz 
>>> was barely enough for gnome-based (?) installer to just show up) so 
>>> hopefully there will be!
>>>
>>>
>>>>
>>>> cd /Cin/thirdparty/ffmpeg-7.0 ?
>>>>
>>>> may be "cat pathname | patch  -p1", may be "cat  patchname | patch -p0" ?
>>>>
>>>> or edit libavcodec/qsvenc.c by hand. - possibly what to edit there?
>>>>
>>>> cd ../../
>>>> localhost:/Cin #
>>>
>>>
>>> When possible, I need more explanation to my questions above ..,
>>
>>
>>
>> ?  If you are not comfortable applying it by hand to internal ffmpeg I'll 
>> prepare normal git am patch, just wait a bit, ok?
>>
>>
>> Yes, fine and ok. But I didn't even understand what and how to edit 
>> libavcodec/qsvenc.c by hand above ;)
>
>
> Normally you just delete lines marked with "-" at very beginning, and replace 
> them with lines marked with "+" sign in patch. Line numbers and line endings 
> extremely important for patch, so sometimes 'innocent' patch editing resulted 
> in no-working patch :(
>
> for simple patches you can just edit file they normally modify by doing 
> patch's work.
>
>
> Yet, I prefer to wait for the  normal git am patch ;)

try attached ?

>
>
>
>
>
From bd68c2a8832854283a0592a702901fbd091494df Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <[email protected]>
Date: Wed, 20 Nov 2024 05:06:02 +0300
Subject: [PATCH] experimental: add qsv field info to qsv encoder in ffmpeg

---
 cinelerra-5.1/thirdparty/src/ffmpeg-7.0.patchZ3 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 cinelerra-5.1/thirdparty/src/ffmpeg-7.0.patchZ3

diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-7.0.patchZ3 b/cinelerra-5.1/thirdparty/src/ffmpeg-7.0.patchZ3
new file mode 100644
index 00000000..82bb4a54
--- /dev/null
+++ b/cinelerra-5.1/thirdparty/src/ffmpeg-7.0.patchZ3
@@ -0,0 +1,15 @@
+diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
+index 3a8607fca6..e14fee17d1 100644
+--- a/libavcodec/qsvenc.c
++++ b/libavcodec/qsvenc.c
+@@ -850,7 +850,10 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
+         // it is important that PicStruct be setup correctly from the
+         // start--otherwise, encoding doesn't work and results in a bunch
+         // of incompatible video parameter errors
++        if (avctx->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)
+         q->param.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_FIELD_TFF;
++        else
++        q->param.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_FIELD_BFF;
+         // height alignment always must be 32 for interlaced video
+         q->height_align = 32;
+     } else {
-- 
2.44.0

-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to