OpenJPEG 2.0.0 not compiling like 1.5.1

Questions that occur when trying to compile FFmpeg.
Post Reply
cjplay
Posts: 10
Joined: Tue Dec 06, 2011 7:55 pm

OpenJPEG 2.0.0 not compiling like 1.5.1

Post by cjplay » Tue Mar 04, 2014 6:07 pm

config.zip
Config.log from compilation, zipped.
(30.97 KiB) Downloaded 101 times
I imagine that OpenJPEG 2.0 needs some reconfiguration that will make it more FFMPEG-friendly. Therefore, I'm wondering if anyone can help guide me to the best way to go about doing this? There is a page in OpenJPEG's tickets that calls out the issue with doing this. The reason I want to is sometimes I get a green frame (1 out of 500,000 or so frames) on Zeranoe's builds that OpenJPEG 2.0's decoders don't turn green from.

OS: CentOS 6.5

Libraries and FFMPEG: From Zeranoe's ExtLibs download links on the build page (including OJ 1.5.1).

Goal: Compiling FFMPEG for Linux first, then Cross-compiling for Win64.

Configure Command: ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --extra-libs=-ldl --enable-shared --enable-gpl --enable-libfdk-aac --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libopenjpeg --extra-cflags="-I/usr/local/include/openjpeg-2.0"

Status: All downloads of external libs are compiled to $HOME/ffmpeg_build/include. Cmake completed the OpenJPEG compilation as directed on their site, but I pushed the compilation to the above location along with all other libraries and got this error from the Make command. Using OpenJPEG 1.5.1 from Zeranoe, the Make completes.

Error:
CC libavcodec/libopenjpegdec.o
libavcodec/libopenjpegdec.c: In function âlibopenjpeg_guess_pix_fmtâ:
libavcodec/libopenjpegdec.c:113: error: âCLRSPC_SRGBâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:113: error: (Each undeclared identifier is reported only once
libavcodec/libopenjpegdec.c:113: error: for each function it appears in.)
libavcodec/libopenjpegdec.c:117: error: âCLRSPC_GRAYâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:121: error: âCLRSPC_SYCCâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c: In function âlibopenjpeg_decode_frameâ:
libavcodec/libopenjpegdec.c:245: error: âopj_dinfo_tâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:245: error: âdecâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:246: error: âopj_cio_tâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:246: error: âstreamâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:247: warning: ISO C90 forbids mixed declarations and code
libavcodec/libopenjpegdec.c:259: error: âCODEC_JP2â undeclared (first use in this function)
libavcodec/libopenjpegdec.c:265: error: âCODEC_J2Kâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:272: error: implicit declaration of function âopj_set_event_mgrâ
libavcodec/libopenjpegdec.c:272: error: âopj_common_ptrâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:272: error: expected â)â before âdecâ
libavcodec/libopenjpegdec.c:273: error: âopj_dparameters_tâ has no member named âcp_limit_decodingâ
libavcodec/libopenjpegdec.c:273: error: âLIMIT_TO_MAIN_HEADERâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:277: error: implicit declaration of function âopj_cio_openâ
libavcodec/libopenjpegdec.c:277: error: expected â)â before âdecâ
libavcodec/libopenjpegdec.c:282: error: implicit declaration of function âopj_destroy_decompressâ
libavcodec/libopenjpegdec.c:287: error: implicit declaration of function âopj_decode_with_infoâ
libavcodec/libopenjpegdec.c:288: error: implicit declaration of function âopj_cio_closeâ
libavcodec/libopenjpegdec.c:325: error: âopj_dparameters_tâ has no member named âcp_limit_decodingâ
libavcodec/libopenjpegdec.c:325: error: âNO_LIMITATIONâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:329: error: expected â)â before âdecâ
make: *** [libavcodec/libopenjpegdec.o] Error 1
INSTALL libavdevice/libavdevice.a
CC libavcodec/libopenjpegdec.o
libavcodec/libopenjpegdec.c: In function âlibopenjpeg_guess_pix_fmtâ:
libavcodec/libopenjpegdec.c:113: error: âCLRSPC_SRGBâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:113: error: (Each undeclared identifier is reported only once
libavcodec/libopenjpegdec.c:113: error: for each function it appears in.)
libavcodec/libopenjpegdec.c:117: error: âCLRSPC_GRAYâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:121: error: âCLRSPC_SYCCâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c: In function âlibopenjpeg_decode_frameâ:
libavcodec/libopenjpegdec.c:245: error: âopj_dinfo_tâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:245: error: âdecâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:246: error: âopj_cio_tâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:246: error: âstreamâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:247: warning: ISO C90 forbids mixed declarations and code
libavcodec/libopenjpegdec.c:259: error: âCODEC_JP2â undeclared (first use in this function)
libavcodec/libopenjpegdec.c:265: error: âCODEC_J2Kâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:272: error: implicit declaration of function âopj_set_event_mgrâ
libavcodec/libopenjpegdec.c:272: error: âopj_common_ptrâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:272: error: expected â)â before âdecâ
libavcodec/libopenjpegdec.c:273: error: âopj_dparameters_tâ has no member named âcp_limit_decodingâ
libavcodec/libopenjpegdec.c:273: error: âLIMIT_TO_MAIN_HEADERâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:277: error: implicit declaration of function âopj_cio_openâ
libavcodec/libopenjpegdec.c:277: error: expected â)â before âdecâ
libavcodec/libopenjpegdec.c:282: error: implicit declaration of function âopj_destroy_decompressâ
libavcodec/libopenjpegdec.c:287: error: implicit declaration of function âopj_decode_with_infoâ
libavcodec/libopenjpegdec.c:288: error: implicit declaration of function âopj_cio_closeâ
libavcodec/libopenjpegdec.c:325: error: âopj_dparameters_tâ has no member named âcp_limit_decodingâ
libavcodec/libopenjpegdec.c:325: error: âNO_LIMITATIONâ undeclared (first use in this function)
libavcodec/libopenjpegdec.c:329: error: expected â)â before âdecâ
make: *** [libavcodec/libopenjpegdec.o] Error 1

Thank you for any help you can give. Otherwise, I'm hitting PSPad for some DIFF handiwork in the header files.

-CJ

User avatar
Zeranoe
Site Admin
Posts: 703
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: OpenJPEG 2.0.0 not compiling like 1.5.1

Post by Zeranoe » Tue Mar 04, 2014 6:56 pm

You might want to check out: http://trac.ffmpeg.org/ticket/2016

cjplay
Posts: 10
Joined: Tue Dec 06, 2011 7:55 pm

Re: OpenJPEG 2.0.0 not compiling like 1.5.1

Post by cjplay » Mon Mar 10, 2014 11:22 pm

Thank you! I will give it a shot. What would you need in order to put it into your builds?

Thanks SO much!
-CJ

User avatar
Zeranoe
Site Admin
Posts: 703
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: OpenJPEG 2.0.0 not compiling like 1.5.1

Post by Zeranoe » Thu Mar 13, 2014 2:15 pm

It looks like the patch hasn't made it upstream yet: http://git.videolan.org/?p=ffmpeg.git;a ... HEAD#l4519

Post Reply
'