Go to the documentation of this file.
40 const AVFrame *p,
int *got_packet)
46 static const uint32_t ordered_dither[2][2] =
48 { 0x10400000, 0x104F0000 },
49 { 0xCB2A0000, 0xCB250000 },
54 "Widths which are not a multiple of 4 might fail with some decoders, "
55 "use vstrict=-1 / -strict -1 to use %d anyway.\n", avctx->
width);
65 for (y = 0; y < avctx->
height; y++) {
70 for (x = 0; x < avctx->
width; x += 4) {
71 switch (
a->dither_type) {
72 case 0:
dither = 0x492A0000;
break;
74 case 2:
dither = ordered_dither[ y&1 ][ (x>>2)&1 ];
break;
76 if (x+3 >= avctx->
width) {
77 memset(luma_tmp, 0,
sizeof(luma_tmp));
78 memcpy(luma_tmp, luma, avctx->
width - x);
97 #define OFFSET(x) offsetof(CLJRContext, x)
98 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
AVPixelFormat
Pixel format.
#define AVERROR_EXPERIMENTAL
Requested feature is flagged experimental. Set strict_std_compliance if you really want to use it.
static double cb(void *priv, double x, double y)
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
This structure describes decoded (raw) audio or video data.
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
const FFCodec ff_cljr_encoder
AVCodec p
The public AVCodec.
#define FF_CODEC_ENCODE_CB(func)
static const AVOption options[]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
static const AVClass cljr_class
#define CODEC_LONG_NAME(str)
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
#define FF_COMPLIANCE_UNOFFICIAL
Allow unofficial extensions.
const char * name
Name of the codec implementation.
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
int64_t frame_num
Frame counter, set by libavcodec.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
int strict_std_compliance
strictly follow the standard (MPEG-4, ...).
main external API structure.
int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags)
Get a buffer for a packet.
@ AV_OPT_TYPE_INT
Underlying C type is int.
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *p, int *got_packet)
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
This structure stores compressed data.
static double cr(void *priv, double x, double y)
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
static const uint8_t dither[8][8]