Opened 4 years ago

Closed 3 years ago

#3712 closed enhancement (duplicate)

OPENJPEG 2.1.0

Reported by: tteam Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: libopenjpeg
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ENHANCEMENT REQUEST

Hi All,

Is it possible to add the new OpenJpeg2.1.0 bugfixed library to the FFmpeg?

New Features:

  • Digital Cinema profiles have been fixed and updated
    • New option to disable MCT if needed
  • extended RAW support: it is now possible to input raw images

with subsampled color components (422, 420, etc)

  • New way to deal with profiles

Change History (3)

comment:1 Changed 4 years ago by cehoyos

  • Component changed from ffmpeg to avcodec
  • Keywords libopenjpeg added; OpenJPEG 2.1.0 removed
  • Priority changed from normal to wish
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from unspecified to git-master

I believe this should be handled in ticket #2016

comment:2 Changed 3 years ago by pprkut

  • Resolution duplicate deleted
  • Status changed from closed to reopened

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

comment:3 Changed 3 years ago by cehoyos

  • Resolution set to duplicate
  • Status changed from reopened to closed

This was a duplicate of ticket #2016
If you need installation support, please post on the user mailing list.

Note: See TracTickets for help on using tickets.