Go to the documentation of this file.
41 const AVFrame *p,
int *got_packet)
47 static const uint32_t ordered_dither[2][2] =
49 { 0x10400000, 0x104F0000 },
50 { 0xCB2A0000, 0xCB250000 },
55 "Widths which are not a multiple of 4 might fail with some decoders, "
56 "use vstrict=-1 / -strict -1 to use %d anyway.\n", avctx->
width);
66 for (y = 0; y < avctx->
height; y++) {
71 for (x = 0; x < avctx->
width; x += 4) {
72 switch (
a->dither_type) {
73 case 0:
dither = 0x492A0000;
break;
75 case 2:
dither = ordered_dither[ y&1 ][ (x>>2)&1 ];
break;
77 if (x+3 >= avctx->
width) {
78 memset(luma_tmp, 0,
sizeof(luma_tmp));
79 memcpy(luma_tmp, luma, avctx->
width - x);
98 #define OFFSET(x) offsetof(CLJRContext, x)
99 #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
#define FF_COMPLIANCE_UNOFFICIAL
Allow unofficial extensions.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static const AVOption options[]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static enum AVPixelFormat pix_fmts[]
static const AVClass cljr_class
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
const AVCodec ff_cljr_encoder
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
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
const char * name
Name of the codec implementation.
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.
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *p, int *got_packet)
int frame_number
Frame counter, set by libavcodec.
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]