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);
64 for (y = 0; y < avctx->
height; y++) {
69 for (x = 0; x < avctx->
width; x += 4) {
70 switch (
a->dither_type) {
71 case 0:
dither = 0x492A0000;
break;
73 case 2:
dither = ordered_dither[ y&1 ][ (x>>2)&1 ];
break;
75 if (x+3 >= avctx->
width) {
76 memset(luma_tmp, 0,
sizeof(luma_tmp));
77 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 AV_PKT_FLAG_KEY
The packet contains a keyframe.
#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.
#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
int flags
A combination of AV_PKT_FLAG values.
static int put_bits_count(PutBitContext *s)
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.
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, size in bytes of each picture line.
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64_t min_size)
Check AVPacket size and/or allocate data.
static const uint8_t dither[8][8]