|
Lines 32-38
Link Here
|
| 32 |
#include "avcodec.h" |
32 |
#include "avcodec.h" |
| 33 |
#include "internal.h" |
33 |
#include "internal.h" |
| 34 |
|
34 |
|
| 35 |
#if HAVE_OPENJPEG_2_2_OPENJPEG_H |
35 |
#if HAVE_OPENJPEG_2_3_OPENJPEG_H |
|
|
36 |
# include <openjpeg-2.3/openjpeg.h> |
| 37 |
#elif HAVE_OPENJPEG_2_2_OPENJPEG_H |
| 36 |
# include <openjpeg-2.2/openjpeg.h> |
38 |
# include <openjpeg-2.2/openjpeg.h> |
| 37 |
#elif HAVE_OPENJPEG_2_1_OPENJPEG_H |
39 |
#elif HAVE_OPENJPEG_2_1_OPENJPEG_H |
| 38 |
# include <openjpeg-2.1/openjpeg.h> |
40 |
# include <openjpeg-2.1/openjpeg.h> |
|
Lines 44-50
Link Here
|
| 44 |
# include <openjpeg.h> |
46 |
# include <openjpeg.h> |
| 45 |
#endif |
47 |
#endif |
| 46 |
|
48 |
|
| 47 |
#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H |
49 |
#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H |
| 48 |
# define OPENJPEG_MAJOR_VERSION 2 |
50 |
# define OPENJPEG_MAJOR_VERSION 2 |
| 49 |
# define OPJ(x) OPJ_##x |
51 |
# define OPJ(x) OPJ_##x |
| 50 |
#else |
52 |
#else |
|
Lines 307-313
static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
Link Here
|
| 307 |
|
309 |
|
| 308 |
opj_set_default_encoder_parameters(&ctx->enc_params); |
310 |
opj_set_default_encoder_parameters(&ctx->enc_params); |
| 309 |
|
311 |
|
| 310 |
#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H |
312 |
#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H |
| 311 |
switch (ctx->cinema_mode) { |
313 |
switch (ctx->cinema_mode) { |
| 312 |
case OPJ_CINEMA2K_24: |
314 |
case OPJ_CINEMA2K_24: |
| 313 |
ctx->enc_params.rsiz = OPJ_PROFILE_CINEMA_2K; |
315 |
ctx->enc_params.rsiz = OPJ_PROFILE_CINEMA_2K; |
|
Lines 771-777
static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
Link Here
|
| 771 |
opj_stream_set_write_function(stream, stream_write); |
773 |
opj_stream_set_write_function(stream, stream_write); |
| 772 |
opj_stream_set_skip_function(stream, stream_skip); |
774 |
opj_stream_set_skip_function(stream, stream_skip); |
| 773 |
opj_stream_set_seek_function(stream, stream_seek); |
775 |
opj_stream_set_seek_function(stream, stream_seek); |
| 774 |
#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H |
776 |
#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H |
| 775 |
opj_stream_set_user_data(stream, &writer, NULL); |
777 |
opj_stream_set_user_data(stream, &writer, NULL); |
| 776 |
#elif HAVE_OPENJPEG_2_0_OPENJPEG_H |
778 |
#elif HAVE_OPENJPEG_2_0_OPENJPEG_H |
| 777 |
opj_stream_set_user_data(stream, &writer); |
779 |
opj_stream_set_user_data(stream, &writer); |
| 778 |
- |
|
|