#include <openjpeg.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixfmt.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "thread.h"
Go to the source code of this file.
Data Structures | |
struct | LibOpenJPEGContext |
Defines | |
#define | OPJ_STATIC |
#define | JP2_SIG_TYPE 0x6A502020 |
#define | JP2_SIG_VALUE 0x0D0A870A |
#define | RGB_PIXEL_FORMATS PIX_FMT_RGB24,PIX_FMT_RGBA,PIX_FMT_RGB48,PIX_FMT_RGBA64 |
#define | GRAY_PIXEL_FORMATS PIX_FMT_GRAY8,PIX_FMT_GRAY8A,PIX_FMT_GRAY16 |
#define | YUV_PIXEL_FORMATS |
#define | OFFSET(x) offsetof(LibOpenJPEGContext, x) |
#define | VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM |
Functions | |
static int | libopenjpeg_matches_pix_fmt (const opj_image_t *image, enum PixelFormat pix_fmt) |
static enum PixelFormat | libopenjpeg_guess_pix_fmt (const opj_image_t *image) |
static int | libopenjpeg_ispacked (enum PixelFormat pix_fmt) |
static void | libopenjpeg_copy_to_packed8 (AVFrame *picture, opj_image_t *image) |
static void | libopenjpeg_copy_to_packed16 (AVFrame *picture, opj_image_t *image) |
static void | libopenjpeg_copyto8 (AVFrame *picture, opj_image_t *image) |
static void | libopenjpeg_copyto16 (AVFrame *picture, opj_image_t *image) |
static av_cold int | libopenjpeg_decode_init (AVCodecContext *avctx) |
static av_cold int | libopenjpeg_decode_init_thread_copy (AVCodecContext *avctx) |
static int | libopenjpeg_decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) |
static av_cold int | libopenjpeg_decode_close (AVCodecContext *avctx) |
Variables | |
static enum PixelFormat | libopenjpeg_rgb_pix_fmts [] = {RGB_PIXEL_FORMATS} |
static enum PixelFormat | libopenjpeg_gray_pix_fmts [] = {GRAY_PIXEL_FORMATS} |
static enum PixelFormat | libopenjpeg_yuv_pix_fmts [] = {YUV_PIXEL_FORMATS} |
static enum PixelFormat | libopenjpeg_all_pix_fmts [] = {RGB_PIXEL_FORMATS,GRAY_PIXEL_FORMATS,YUV_PIXEL_FORMATS} |
static const AVOption | options [] |
class { | |
class_name = "libopenjpeg" | |
item_name = av_default_item_name | |
option = options | |
version = LIBAVUTIL_VERSION_INT | |
}; | |
AVCodec | ff_libopenjpeg_decoder |
Definition in file libopenjpegdec.c.
#define GRAY_PIXEL_FORMATS PIX_FMT_GRAY8,PIX_FMT_GRAY8A,PIX_FMT_GRAY16 |
Definition at line 44 of file libopenjpegdec.c.
#define JP2_SIG_TYPE 0x6A502020 |
Definition at line 38 of file libopenjpegdec.c.
#define JP2_SIG_VALUE 0x0D0A870A |
Definition at line 39 of file libopenjpegdec.c.
#define OFFSET | ( | x | ) | offsetof(LibOpenJPEGContext, x) |
Definition at line 395 of file libopenjpegdec.c.
#define OPJ_STATIC |
Definition at line 27 of file libopenjpegdec.c.
#define RGB_PIXEL_FORMATS PIX_FMT_RGB24,PIX_FMT_RGBA,PIX_FMT_RGB48,PIX_FMT_RGBA64 |
Definition at line 43 of file libopenjpegdec.c.
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM |
Definition at line 396 of file libopenjpegdec.c.
#define YUV_PIXEL_FORMATS |
Value:
PIX_FMT_YUV410P,PIX_FMT_YUV411P,PIX_FMT_YUVA420P, \ PIX_FMT_YUV420P,PIX_FMT_YUV422P,PIX_FMT_YUVA422P, \ PIX_FMT_YUV440P,PIX_FMT_YUV444P,PIX_FMT_YUVA444P, \ PIX_FMT_YUV420P9,PIX_FMT_YUV422P9,PIX_FMT_YUV444P9, \ PIX_FMT_YUV420P10,PIX_FMT_YUV422P10,PIX_FMT_YUV444P10, \ PIX_FMT_YUV420P12,PIX_FMT_YUV422P12,PIX_FMT_YUV444P12, \ PIX_FMT_YUV420P14,PIX_FMT_YUV422P14,PIX_FMT_YUV444P14, \ PIX_FMT_YUV420P16,PIX_FMT_YUV422P16,PIX_FMT_YUV444P16
Definition at line 45 of file libopenjpegdec.c.
static void libopenjpeg_copy_to_packed16 | ( | AVFrame * | picture, | |
opj_image_t * | image | |||
) | [inline, static] |
static void libopenjpeg_copy_to_packed8 | ( | AVFrame * | picture, | |
opj_image_t * | image | |||
) | [inline, static] |
static void libopenjpeg_copyto16 | ( | AVFrame * | picture, | |
opj_image_t * | image | |||
) | [inline, static] |
static void libopenjpeg_copyto8 | ( | AVFrame * | picture, | |
opj_image_t * | image | |||
) | [inline, static] |
static av_cold int libopenjpeg_decode_close | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 386 of file libopenjpegdec.c.
static int libopenjpeg_decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | data_size, | |||
AVPacket * | avpkt | |||
) | [static] |
Definition at line 227 of file libopenjpegdec.c.
static av_cold int libopenjpeg_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 209 of file libopenjpegdec.c.
static av_cold int libopenjpeg_decode_init_thread_copy | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 219 of file libopenjpegdec.c.
static enum PixelFormat libopenjpeg_guess_pix_fmt | ( | const opj_image_t * | image | ) | [inline, static] |
static int libopenjpeg_ispacked | ( | enum PixelFormat | pix_fmt | ) | [inline, static] |
static int libopenjpeg_matches_pix_fmt | ( | const opj_image_t * | image, | |
enum PixelFormat | pix_fmt | |||
) | [inline, static] |
Definition at line 66 of file libopenjpegdec.c.
Referenced by libopenjpeg_decode_frame(), and libopenjpeg_guess_pix_fmt().
const { ... } [static] |
class_name = "libopenjpeg" |
Definition at line 404 of file libopenjpegdec.c.
Initial value:
{ .name = "libopenjpeg", .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_JPEG2000, .priv_data_size = sizeof(LibOpenJPEGContext), .init = libopenjpeg_decode_init, .close = libopenjpeg_decode_close, .decode = libopenjpeg_decode_frame, .capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, .max_lowres = 31, .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"), .priv_class = &class, .init_thread_copy = ONLY_IF_THREADS_ENABLED(libopenjpeg_decode_init_thread_copy), }
Definition at line 410 of file libopenjpegdec.c.
item_name = av_default_item_name |
Definition at line 405 of file libopenjpegdec.c.
enum PixelFormat libopenjpeg_all_pix_fmts[] = {RGB_PIXEL_FORMATS,GRAY_PIXEL_FORMATS,YUV_PIXEL_FORMATS} [static] |
enum PixelFormat libopenjpeg_gray_pix_fmts[] = {GRAY_PIXEL_FORMATS} [static] |
enum PixelFormat libopenjpeg_rgb_pix_fmts[] = {RGB_PIXEL_FORMATS} [static] |
enum PixelFormat libopenjpeg_yuv_pix_fmts[] = {YUV_PIXEL_FORMATS} [static] |
Definition at line 406 of file libopenjpegdec.c.
Initial value:
{ { "lowqual", "Limit the number of layers used for decoding", OFFSET(lowqual), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VD }, { NULL }, }
Definition at line 398 of file libopenjpegdec.c.
Definition at line 407 of file libopenjpegdec.c.