On 08/30/2010 11:12 PM, Frans de Boer wrote:
> The next error has been reported long ago (> 1 year) and I remember
> that a patch was proposed.
> I can apply that patch again, but just wonder why this has not been
> fixed already. After all, the build-in FFMPEG library is quite old and
> numerous errors and improvements have been published already.
>
> Using latest git source with external ffmpeg enabled:
>
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../libmpeg3
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> -DX86_CPU -DHAVE_FIREWIRE -I/usr/include/mjpegtools
> -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex
> -DENCORE_INCLUDE=\"encore50/encore.h\" -I/usr/include/libavcodec
> -I/usr/include/libswscale -DHAVE_SWSCALER -O3 -march=amdfam10 -MT
> qtffmpeg.lo -MD -MP -MF .deps/qtffmpeg.Tpo -c qtffmpeg.c  -fPIC -DPIC
> -o .libs/qtffmpeg.o
> qtffmpeg.c: In function 'decode_wrapper':
> qtffmpeg.c:192:3: warning: 'avcodec_decode_video' is deprecated
> (declared at /usr/include/libavcodec/avcodec.h:3452)
> qtffmpeg.c: In function 'get_chroma_factor':
> qtffmpeg.c:228:8: error: 'PIX_FMT_YUV422' undeclared (first use in
> this function)
> qtffmpeg.c:228:8: note: each undeclared identifier is reported only
> once for each function it appears in
> qtffmpeg.c: In function 'quicktime_ffmpeg_decode':
> qtffmpeg.c:427:8: error: 'PIX_FMT_YUV422' undeclared (first use in
> this function)
> make[3]: *** [qtffmpeg.lo] Error 1
>
>
> Using latest git source /with/ internal ffmpeg produces the next error
> message:
>
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../libmpeg3
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> -DX86_CPU -DHAVE_FIREWIRE -I/usr/include/mjpegtools
> -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex
> -DENCORE_INCLUDE=\"encore50/encore.h\" -I../quicktime/ffmpeg -O3
> -march=amdfam10 -MT qth264.lo -MD -MP -MF .deps/qth264.Tpo -c
> qth264.c  -fPIC -DPIC -o .libs/qth264.o
> qth264.c: In function 'encode':
> qth264.c:245:4: warning: passing argument 1 of 'x264_nal_encode' from
> incompatible pointer type
> /usr/include/x264.h:456:6: note: expected 'struct x264_t *' but
> argument is of type 'unsigned char *'
> qth264.c:245:4: warning: passing argument 2 of 'x264_nal_encode' from
> incompatible pointer type
> /usr/include/x264.h:456:6: note: expected 'uint8_t *' but argument is
> of type 'int *'
> qth264.c:245:4: warning: passing argument 3 of 'x264_nal_encode' makes
> pointer from integer without a cast
> /usr/include/x264.h:456:6: note: expected 'struct x264_nal_t *' but
> argument is of type 'int'
> qth264.c:245:4: error: too many arguments to function 'x264_nal_encode'
> /usr/include/x264.h:456:6: note: declared here
> qth264.c:242:14: error: void value not ignored as it ought to be
> make[3]: *** [qth264.lo] Error 1
>
> Since Cinelerra version 4.x CV is still a pipe dream, the 2.1 CV
> version might need a "makeover" and improvement to the ffmpeg
> libraries. Wish I could help, but I am no longer a good programmer
> anymore (has been to long ago).
>
> Hope someone can do something with the above report.
>
> Regards,
> Frans.
I was wrong, I have the patch since April 30th this year. I don't
remember if I made it myself or have received from someone. Anyhow, this
patch fixes the first reported error message. I did not apply yet
because I wanted to start fresh but the site is down to reload the git
repository again.

The patch is attached.

Frans.

diff -rb -u6 a/git-cinelerra/cinelerra/ffmpeg.C b/git-cinelerra/cinelerra/ffmpeg.C
--- a/git-cinelerra/cinelerra/ffmpeg.C	2010-04-30 22:50:59.719942284 +0200
+++ b/git-cinelerra/cinelerra/ffmpeg.C	2010-04-30 23:12:28.375817437 +0200
@@ -1,20 +1,30 @@
 #include <string.h>
 
 #ifdef HAVE_SWSCALER
 extern "C" {
-#include <swscale.h>
+#include <libswscale/swscale.h>
 }
 #endif
 
 
 #include "filebase.h"
 #include "quicktime.h"
 #include "ffmpeg.h"
 #include "guicast.h"
 
+// Fix for external ffmpeg version 52 and later
+#ifndef PIX_FMT_UYVY411
+#define PIX_FMT_UYVY411 PIX_FMT_UYYVYY411
+#endif
+#ifndef PIX_FMT_RGBA32
+#define PIX_FMT_RGBA32 PIX_FMT_RGB32
+#endif
+#ifndef PIX_FMT_YUV422
+#define PIX_FMT_YUV422 PIX_FMT_YUYV422
+#endif
 
 FFMPEG::FFMPEG(Asset *asset) {
 	this->asset = asset;
 	codec = 0;
 	context = 0;
 	picture = 0;
diff -rb -u6 a/git-cinelerra/quicktime/qtffmpeg.h b/git-cinelerra/quicktime/qtffmpeg.h
--- a/git-cinelerra/quicktime/qtffmpeg.h	2010-04-30 22:50:59.695941508 +0200
+++ b/git-cinelerra/quicktime/qtffmpeg.h	2010-04-30 23:15:03.075942814 +0200
@@ -17,13 +17,22 @@
 
 
 
 #include "libavcodec/avcodec.h"
 #include "qtprivate.h"
 
-
+// Fix for ffmpeg version 52 and later
+#ifndef PIX_FMT_UYVY411
+#define PIX_FMT_UYVY411 PIX_FMT_UYYVYY411
+#endif
+#ifndef PIX_FMT_RGBA32
+#define PIX_FMT_RGBA32 PIX_FMT_RGB32
+#endif
+#ifndef PIX_FMT_YUV422
+#define PIX_FMT_YUV422 PIX_FMT_YUYV422
+#endif
 
 typedef struct
 {
 #define FIELDS 2
 // Encoding
     AVCodec *encoder[FIELDS];

Reply via email to