It seems to work, at least I observed up to 300+% cpu load on encoding

I made simple openjpeg.mov to put in /usr/share/cin/ffmpeg/video

I can encode into rgba64 lossless, but it takes like 5 minutes for 47 seconds 
long 
700x400 file (but with background render set to EXR/DWAA, and project set to
RGBA-float, and vf_pseudocolor and some fader ...)

playing this file with mplayer in realtime apparently impossible on my machine 
:}

 mplayer -vo x11 /dev/shm/OPENJPEG.mov
MPlayer SVN-r38247-10.0.1 (C) 2000-2021 MPlayer Team
parse error at line 423
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /dev/shm/OPENJPEG.mov.
libavformat version 58.65.101 (internal)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x574c054c]Protocol name not provided, cannot 
determine if input is local or a network protocol, buffers and access patterns 
cannot be configured optimally without knowing the protocol
[lavf] stream 0: video (jpeg2000), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang rus
VIDEO:  [mjp2]  704x400  24bpp  25.000 fps  143587.3 kbps (17527.7 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.119.100 (internal)
[libopenjpeg @ 0x57601cf4]Requested frame threading with a custom get_buffer2() 
implementation which is not marked as thread safe. This is not supported 
anymore, make your callback thread-safe.
Selected video codec: [fflibopenjpeg] vfm: ffmpeg (OpenJPEG MJPEG2000)
==========================================================================
Clip info:
 major_brand: qt
 minor_version: 512
 compatible_brands: qt
 encoder: Lavf58.65.101
Load subtitles in /dev/shm/
==========================================================================
Forced audio codec: mad
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
[aac @ 0x57601cf4]Multiple frames in a packet.
AUDIO: 48000 Hz, 2 ch, floatle, 118.0 kbit/3.84% (ratio: 14754->384000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
[aac @ 0x57601cf4]channel element 0.0 is not allocated
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is 1.76:1 - prescaling to correct movie aspect.
[swscaler @ 0x5773aa54]bicubic scaler, from rgba64le to bgra using MMXEXT
VO: [x11] 704x400 => 704x400 BGRA
[VD_FFMPEG] DRI failure.
Movie-Aspect is 1.76:1 - prescaling to correct movie aspect.
VO: [x11] 704x400 => 704x400 BGRA
A:   0.0 V:   0.0 A-V:  0.000 ct:  0.000   0/  0 ??% ??% ??,?% 0 0
[VD_FFMPEG] DRI failure.
A:   8.7 V:   6.6 A-V:  2.013 ct: -0.019   0/  0 46% 38%  4.9% 50 0


           ************************************************
           **** Your system is too SLOW to play this!  ****
           ************************************************

Possible reasons, problems, workarounds:
- Most common: broken/buggy _audio_ driver
  - Try -ao sdl or use the OSS emulation of ALSA.
  - Experiment with different values for -autosync, 30 is a good start.
- Slow video output
  - Try a different -vo driver (-vo help for a list) or try -framedrop!
- Slow CPU
  - Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts,
    e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.
- Broken file
  - Try various combinations of -nobps -ni -forceidx -mc 0.
- Slow media (NFS/SMB mounts, DVD, VCD etc)
  - Try -cache 8192.
- Are you using -cache to play a non-interleaved AVI file?
  - Try -nocache.
Read DOCS/HTML/en/video.html for tuning/speedup tips.
If none of this helps you, read DOCS/HTML/en/bugreports.html.

A:   9.1 V:   6.8 A-V:  2.269 ct: -0.019   0/  0 51% 38%  5.1% 55 0


file is like 810 mb big :}


Additional patches attached ....
I can't say OpenEXR-2.5-opt.diff
help much (this was optimization they talked about in OpenEXR 2.5.x)

but apparently it still applicaple to 2.4.1, just rename it and put in 
thirdparty/src
if you want to test

FORMAT_brender_exr_added.diff
is basically not very useful (apart from testing?) addition of OpenEXR as 
background render choice

openjpeg-24.patch
Basically you should put Openjpeg-2.4.0 tarball into thirdparty/src
instead of 2.3.1 and apply  this patch for testing ...
internal ffmpeg should be build with this version of openjpeg


Attachment: openjpeg.qt
Description: Binary data

diff --git a/OpenEXR/IlmImf/ImfMisc.cpp b/OpenEXR/IlmImf/ImfMisc.cpp
index b4b66573c..61460393f 100644
--- a/OpenEXR/IlmImf/ImfMisc.cpp
+++ b/OpenEXR/IlmImf/ImfMisc.cpp
@@ -1448,6 +1448,8 @@ copyFromFrameBuffer (char *& writePtr,
                      Compressor::Format format,
 		     PixelType type)
 {
+    char * localWritePtr = writePtr;
+    const char * localReadPtr = readPtr;
     //
     // Copy a horizontal row of pixels from a frame
     // buffer to an output file's line or tile buffer.
@@ -1463,29 +1465,29 @@ copyFromFrameBuffer (char *& writePtr,
         {
           case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT:
 
-            while (readPtr <= endPtr)
+            while (localReadPtr <= endPtr)
             {
-                Xdr::write <CharPtrIO> (writePtr,
-                                        *(const unsigned int *) readPtr);
-                readPtr += xStride;
+                Xdr::write <CharPtrIO> (localWritePtr,
+                                        *(const unsigned int *) localReadPtr);
+                localReadPtr += xStride;
             }
             break;
 
           case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF:
 
-            while (readPtr <= endPtr)
+            while (localReadPtr <= endPtr)
             {
-                Xdr::write <CharPtrIO> (writePtr, *(const half *) readPtr);
-                readPtr += xStride;
+                Xdr::write <CharPtrIO> (localWritePtr, *(const half *) localReadPtr);
+                localReadPtr += xStride;
             }
             break;
 
           case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT:
 
-            while (readPtr <= endPtr)
+            while (localReadPtr <= endPtr)
             {
-                Xdr::write <CharPtrIO> (writePtr, *(const float *) readPtr);
-                readPtr += xStride;
+                Xdr::write <CharPtrIO> (localWritePtr, *(const float *) localReadPtr);
+                localReadPtr += xStride;
             }
             break;
 
@@ -1504,33 +1506,33 @@ copyFromFrameBuffer (char *& writePtr,
         {
           case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT:
 
-            while (readPtr <= endPtr)
+            while (localReadPtr <= endPtr)
             {
                 for (size_t i = 0; i < sizeof (unsigned int); ++i)
-                    *writePtr++ = readPtr[i];
+                    *localWritePtr++ = localReadPtr[i];
 
-                readPtr += xStride;
+                localReadPtr += xStride;
             }
             break;
 
           case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF:
 
-            while (readPtr <= endPtr)
+            while (localReadPtr <= endPtr)
             {
-                *(half *) writePtr = *(const half *) readPtr;
-                writePtr += sizeof (half);
-                readPtr += xStride;
+                *(half *) localWritePtr = *(const half *) localReadPtr;
+                localWritePtr += sizeof (half);
+                localReadPtr += xStride;
             }
             break;
 
           case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT:
 
-            while (readPtr <= endPtr)
+            while (localReadPtr <= endPtr)
             {
                 for (size_t i = 0; i < sizeof (float); ++i)
-                    *writePtr++ = readPtr[i];
+                    *localWritePtr++ = localReadPtr[i];
 
-                readPtr += xStride;
+                localReadPtr += xStride;
             }
             break;
             
@@ -1539,6 +1541,9 @@ copyFromFrameBuffer (char *& writePtr,
             throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type.");
         }
     }
+
+    writePtr = localWritePtr;
+    readPtr = localReadPtr;
 }
 
 void
diff --git a/cinelerra-5.1/cinelerra/formatpopup.C b/cinelerra-5.1/cinelerra/formatpopup.C
index addd4a2..dc1e951 100644
--- a/cinelerra-5.1/cinelerra/formatpopup.C
+++ b/cinelerra-5.1/cinelerra/formatpopup.C
@@ -92,7 +92,10 @@ void FormatPopup::create_objects()
 	if(!use_brender)
 		post_item(FILE_TIFF);
 	post_item(FILE_TIFF_LIST);
-
+#ifdef HAVE_OPENEXR
+	if(use_brender)
+	post_item(FILE_EXR_LIST);
+#endif
 	update(&format_items, 0, 0, 1);
 }
 
diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index d529a801..ceddac2a 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -281,7 +281,7 @@ PKG_3RD([opus],[auto],
   [ include ])
 
 PKG_3RD([openjpeg],[auto],
-  [openjpeg-2.3.1],
+  [openjpeg-2.4.0],
   [ bin/libopenjp2.a ],
   [ src/lib/openjp2 ])
 
-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to