[FFmpeg-trac] #3712(avcodec:reopened): OPENJPEG 2.1.0

FFmpeg trac at avcodec.org
Mon Mar 9 23:22:59 CET 2015


#3712: OPENJPEG 2.1.0
-------------------------------------+------------------------------------
             Reporter:  tteam        |                    Owner:
                 Type:  enhancement  |                   Status:  reopened
             Priority:  wish         |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  libopenjpeg  |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------
Changes (by pprkut):

 * status:  closed => reopened
 * resolution:  duplicate =>


Comment:

 It is actually not. It looks like there are API differences between
 openjpeg 2.0 and 2.1. When compiling ffmpeg-2.6 against openjpeg 2.1.0 I
 get these errors:

 {{{
 gcc -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DZLIB_CONST
 -DHAVE_AV_CONFIG_H -std=c99 -fomit-frame-pointer -pthread -D_GNU_SOURCE=1
 -D_REENTRANT -I/usr/include/SDL  -g -Wdeclaration-after-statement -Wall
 -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings
 -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast
 -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-
 zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-
 tree-vectorize -Werror=format-security -Werror=implicit-function-
 declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla
 -Wformat -Wno-maybe-uninitialized  -MMD -MF libavcodec/libopenjpegdec.d
 -MT libavcodec/libopenjpegdec.o -c -o libavcodec/libopenjpegdec.o
 libavcodec/libopenjpegdec.c
 libavcodec/libopenjpegdec.c: In function 'libopenjpeg_guess_pix_fmt':
 libavcodec/libopenjpegdec.c:132:10: error: 'CLRSPC_SRGB' undeclared (first
 use in this function)
      case CLRSPC_SRGB:
           ^
 libavcodec/libopenjpegdec.c:132:10: note: each undeclared identifier is
 reported only once for each function it appears in
 libavcodec/libopenjpegdec.c:136:10: error: 'CLRSPC_GRAY' undeclared (first
 use in this function)
      case CLRSPC_GRAY:
           ^
 libavcodec/libopenjpegdec.c:140:10: error: 'CLRSPC_SYCC' undeclared (first
 use in this function)
      case CLRSPC_SYCC:
           ^
 libavcodec/libopenjpegdec.c: In function 'libopenjpeg_decode_frame':
 libavcodec/libopenjpegdec.c:262:5: error: unknown type name 'opj_dinfo_t'
      opj_dinfo_t *dec;
      ^
 libavcodec/libopenjpegdec.c:263:5: error: unknown type name 'opj_cio_t'
      opj_cio_t *stream;
      ^
 libavcodec/libopenjpegdec.c:276:37: error: 'CODEC_JP2' undeclared (first
 use in this function)
          dec = opj_create_decompress(CODEC_JP2);
                                      ^
 libavcodec/libopenjpegdec.c:282:37: error: 'CODEC_J2K' undeclared (first
 use in this function)
          dec = opj_create_decompress(CODEC_J2K);
                                      ^
 libavcodec/libopenjpegdec.c:289:5: error: implicit declaration of function
 'opj_set_event_mgr' [-Werror=implicit-function-declaration]
      opj_set_event_mgr((opj_common_ptr) dec, NULL, NULL);
      ^
 libavcodec/libopenjpegdec.c:289:24: error: 'opj_common_ptr' undeclared
 (first use in this function)
      opj_set_event_mgr((opj_common_ptr) dec, NULL, NULL);
                         ^
 libavcodec/libopenjpegdec.c:289:40: error: expected ')' before 'dec'
      opj_set_event_mgr((opj_common_ptr) dec, NULL, NULL);
                                         ^
 libavcodec/libopenjpegdec.c:290:20: error: 'opj_dparameters_t' has no
 member named 'cp_limit_decoding'
      ctx->dec_params.cp_limit_decoding = LIMIT_TO_MAIN_HEADER;
                     ^
 libavcodec/libopenjpegdec.c:290:41: error: 'LIMIT_TO_MAIN_HEADER'
 undeclared (first use in this function)
      ctx->dec_params.cp_limit_decoding = LIMIT_TO_MAIN_HEADER;
                                          ^
 libavcodec/libopenjpegdec.c:293:5: warning: passing argument 1 of
 'opj_setup_decoder' from incompatible pointer type [enabled by default]
      opj_setup_decoder(dec, &ctx->dec_params);
      ^
 In file included from libavcodec/libopenjpegdec.c:42:0:
 /usr/include/openjpeg.h:1258:31: note: expected 'void **' but argument is
 of type 'int *'
  OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
                                ^
 libavcodec/libopenjpegdec.c:294:5: error: implicit declaration of function
 'opj_cio_open' [-Werror=implicit-function-declaration]
      stream = opj_cio_open((opj_common_ptr) dec, buf, buf_size);
      ^
 libavcodec/libopenjpegdec.c:294:44: error: expected ')' before 'dec'
      stream = opj_cio_open((opj_common_ptr) dec, buf, buf_size);
                                             ^
 libavcodec/libopenjpegdec.c:299:9: error: implicit declaration of function
 'opj_destroy_decompress' [-Werror=implicit-function-declaration]
          opj_destroy_decompress(dec);
          ^
 libavcodec/libopenjpegdec.c:304:5: error: implicit declaration of function
 'opj_decode_with_info' [-Werror=implicit-function-declaration]
      image = opj_decode_with_info(dec, stream, NULL);
      ^
 libavcodec/libopenjpegdec.c:304:11: warning: assignment makes pointer from
 integer without a cast [enabled by default]
      image = opj_decode_with_info(dec, stream, NULL);
            ^
 libavcodec/libopenjpegdec.c:305:5: error: implicit declaration of function
 'opj_cio_close' [-Werror=implicit-function-declaration]
      opj_cio_close(stream);
      ^
 libavcodec/libopenjpegdec.c:338:20: error: 'opj_dparameters_t' has no
 member named 'cp_limit_decoding'
      ctx->dec_params.cp_limit_decoding = NO_LIMITATION;
                     ^
 libavcodec/libopenjpegdec.c:338:41: error: 'NO_LIMITATION' undeclared
 (first use in this function)
      ctx->dec_params.cp_limit_decoding = NO_LIMITATION;
                                          ^
 libavcodec/libopenjpegdec.c:341:5: warning: passing argument 1 of
 'opj_setup_decoder' from incompatible pointer type [enabled by default]
      opj_setup_decoder(dec, &ctx->dec_params);
      ^
 In file included from libavcodec/libopenjpegdec.c:42:0:
 /usr/include/openjpeg.h:1258:31: note: expected 'void **' but argument is
 of type 'int *'
  OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
                                ^
 libavcodec/libopenjpegdec.c:342:44: error: expected ')' before 'dec'
      stream = opj_cio_open((opj_common_ptr) dec, buf, buf_size);
                                             ^
 libavcodec/libopenjpegdec.c:352:11: warning: assignment makes pointer from
 integer without a cast [enabled by default]
      image = opj_decode_with_info(dec, stream, NULL);
            ^
 cc1: some warnings being treated as errors
 make: *** [libavcodec/libopenjpegdec.o] Error 1
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3712#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list