#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "libavutil/intreadwrite.h"
#include "internal.h"
#include <openjpeg.h>
Go to the source code of this file.
Data Structures | |
struct | LibOpenJPEGContext |
Defines | |
#define | OPJ_STATIC |
#define | OFFSET(x) offsetof(LibOpenJPEGContext, x) |
#define | VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Functions | |
static void | error_callback (const char *msg, void *data) |
static void | warning_callback (const char *msg, void *data) |
static opj_image_t * | mj2_create_image (AVCodecContext *avctx, opj_cparameters_t *parameters) |
static av_cold int | libopenjpeg_encode_init (AVCodecContext *avctx) |
static int | libopenjpeg_copy_packed8 (AVCodecContext *avctx, const AVFrame *frame, opj_image_t *image) |
static int | libopenjpeg_copy_packed16 (AVCodecContext *avctx, const AVFrame *frame, opj_image_t *image) |
static int | libopenjpeg_copy_unpacked8 (AVCodecContext *avctx, const AVFrame *frame, opj_image_t *image) |
static int | libopenjpeg_copy_unpacked16 (AVCodecContext *avctx, const AVFrame *frame, opj_image_t *image) |
static int | libopenjpeg_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) |
static av_cold int | libopenjpeg_encode_close (AVCodecContext *avctx) |
Variables | |
static const AVOption | options [] |
class { | |
class_name = "libopenjpeg" | |
item_name = av_default_item_name | |
option = options | |
version = LIBAVUTIL_VERSION_INT | |
}; | |
AVCodec | ff_libopenjpeg_encoder |
Definition in file libopenjpegenc.c.
#define OFFSET | ( | x | ) | offsetof(LibOpenJPEGContext, x) |
Definition at line 402 of file libopenjpegenc.c.
#define OPJ_STATIC |
Definition at line 33 of file libopenjpegenc.c.
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 403 of file libopenjpegenc.c.
static void error_callback | ( | const char * | msg, | |
void * | data | |||
) | [static] |
static int libopenjpeg_copy_packed16 | ( | AVCodecContext * | avctx, | |
const AVFrame * | frame, | |||
opj_image_t * | image | |||
) | [static] |
static int libopenjpeg_copy_packed8 | ( | AVCodecContext * | avctx, | |
const AVFrame * | frame, | |||
opj_image_t * | image | |||
) | [static] |
static int libopenjpeg_copy_unpacked16 | ( | AVCodecContext * | avctx, | |
const AVFrame * | frame, | |||
opj_image_t * | image | |||
) | [static] |
static int libopenjpeg_copy_unpacked8 | ( | AVCodecContext * | avctx, | |
const AVFrame * | frame, | |||
opj_image_t * | image | |||
) | [static] |
static av_cold int libopenjpeg_encode_close | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 392 of file libopenjpegenc.c.
static int libopenjpeg_encode_frame | ( | AVCodecContext * | avctx, | |
AVPacket * | pkt, | |||
const AVFrame * | frame, | |||
int * | got_packet | |||
) | [static] |
Definition at line 308 of file libopenjpegenc.c.
static av_cold int libopenjpeg_encode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 133 of file libopenjpegenc.c.
static opj_image_t* mj2_create_image | ( | AVCodecContext * | avctx, | |
opj_cparameters_t * | parameters | |||
) | [static] |
static void warning_callback | ( | const char * | msg, | |
void * | data | |||
) | [static] |
const { ... } [static] |
class_name = "libopenjpeg" |
Initial value:
{ .name = "libopenjpeg", .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_JPEG2000, .priv_data_size = sizeof(LibOpenJPEGContext), .init = libopenjpeg_encode_init, .encode2 = libopenjpeg_encode_frame, .close = libopenjpeg_encode_close, .capabilities = 0, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24,PIX_FMT_RGBA,PIX_FMT_RGB48,PIX_FMT_RGBA64, PIX_FMT_GRAY8,PIX_FMT_GRAY8A,PIX_FMT_GRAY16, PIX_FMT_YUV420P,PIX_FMT_YUV422P,PIX_FMT_YUVA420P, PIX_FMT_YUV440P,PIX_FMT_YUV444P, PIX_FMT_YUV420P9,PIX_FMT_YUV422P9,PIX_FMT_YUV444P9, PIX_FMT_YUV420P10,PIX_FMT_YUV422P10,PIX_FMT_YUV444P10, PIX_FMT_YUV420P16,PIX_FMT_YUV422P16,PIX_FMT_YUV444P16, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"), .priv_class = &class, }
Definition at line 438 of file libopenjpegenc.c.
item_name = av_default_item_name |
Definition at line 433 of file libopenjpegenc.c.
Initial value:
{ { "format", "Codec Format", OFFSET(format), AV_OPT_TYPE_INT, { CODEC_JP2 }, CODEC_J2K, CODEC_JP2, VE, "format" }, { "j2k", NULL, 0, AV_OPT_TYPE_CONST, { CODEC_J2K }, 0, 0, VE, "format" }, { "jp2", NULL, 0, AV_OPT_TYPE_CONST, { CODEC_JP2 }, 0, 0, VE, "format" }, { "profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, { STD_RSIZ }, STD_RSIZ, CINEMA4K, VE, "profile" }, { "jpeg2000", NULL, 0, AV_OPT_TYPE_CONST, { STD_RSIZ }, 0, 0, VE, "profile" }, { "cinema2k", NULL, 0, AV_OPT_TYPE_CONST, { CINEMA2K }, 0, 0, VE, "profile" }, { "cinema4k", NULL, 0, AV_OPT_TYPE_CONST, { CINEMA4K }, 0, 0, VE, "profile" }, { "cinema_mode", "Digital Cinema", OFFSET(cinema_mode), AV_OPT_TYPE_INT, { OFF }, OFF, CINEMA4K_24, VE, "cinema_mode" }, { "off", NULL, 0, AV_OPT_TYPE_CONST, { OFF }, 0, 0, VE, "cinema_mode" }, { "2k_24", NULL, 0, AV_OPT_TYPE_CONST, { CINEMA2K_24 }, 0, 0, VE, "cinema_mode" }, { "2k_48", NULL, 0, AV_OPT_TYPE_CONST, { CINEMA2K_48 }, 0, 0, VE, "cinema_mode" }, { "4k_24", NULL, 0, AV_OPT_TYPE_CONST, { CINEMA4K_24 }, 0, 0, VE, "cinema_mode" }, { "prog_order", "Progression Order", OFFSET(prog_order), AV_OPT_TYPE_INT, { LRCP }, LRCP, CPRL, VE, "prog_order" }, { "lrcp", NULL, 0, AV_OPT_TYPE_CONST, { LRCP }, 0, 0, VE, "prog_order" }, { "rlcp", NULL, 0, AV_OPT_TYPE_CONST, { RLCP }, 0, 0, VE, "prog_order" }, { "rpcl", NULL, 0, AV_OPT_TYPE_CONST, { RPCL }, 0, 0, VE, "prog_order" }, { "pcrl", NULL, 0, AV_OPT_TYPE_CONST, { PCRL }, 0, 0, VE, "prog_order" }, { "cprl", NULL, 0, AV_OPT_TYPE_CONST, { CPRL }, 0, 0, VE, "prog_order" }, { "numresolution", NULL, OFFSET(numresolution), AV_OPT_TYPE_INT, { 6 }, 1, 10, VE }, { "numlayers", NULL, OFFSET(numlayers), AV_OPT_TYPE_INT, { 1 }, 1, 10, VE }, { "disto_alloc", NULL, OFFSET(disto_alloc), AV_OPT_TYPE_INT, { 1 }, 0, 1, VE }, { "fixed_alloc", NULL, OFFSET(fixed_alloc), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, { "fixed_quality", NULL, OFFSET(fixed_quality), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, { NULL }, }
Definition at line 404 of file libopenjpegenc.c.
Definition at line 435 of file libopenjpegenc.c.
Referenced by adpcm_compress_trellis(), aiff_read_header(), celt_header(), decode_frame(), decode_frame_header(), decode_init(), dvbsub_parse_clut_segment(), dvbsub_parse_page_segment(), dvbsub_parse_region_segment(), ff_mov_read_stsd_entries(), get_packet_header(), init(), libcelt_dec_init(), mov_read_chan(), mov_read_chpl(), mov_read_elst(), mov_read_mdhd(), mov_read_mvhd(), mov_read_tkhd(), mov_write_audio_tag(), mov_write_edts_tag(), mov_write_mdhd_tag(), mov_write_mvhd_tag(), mov_write_tkhd_tag(), mxf_write_identification(), read_header(), read_tfra(), rm_read_audio_stream_info(), smjpeg_read_header(), spdif_header_mpeg(), swf_write_header(), txd_decode_frame(), vble_decode_frame(), voc_probe(), voc_write_header(), and xwd_decode_frame().