72 if (tags->
fourcc == fourcc)
144 int buf_size = avpkt->
size;
173 for (i = 0; 2 * i + 1 < buf_size; i++) {
174 dst[2 * i + 0] = buf[i] >> 4;
175 dst[2 * i + 1] = buf[i] & 15;
178 for (i = 0; 4 * i + 3 < buf_size; i++) {
179 dst[4 * i + 0] = buf[i] >> 6;
180 dst[4 * i + 1] = buf[i] >> 4 & 3;
181 dst[4 * i + 2] = buf[i] >> 2 & 3;
182 dst[4 * i + 3] = buf[i] & 3;
186 }
else if (need_copy) {
208 memcpy(context->
palette->
data, pal, AVPALETTE_SIZE);
225 flip(avctx, picture);
237 for (y = 0; y < avctx->
height; y++) {
238 for (x = 0; x < avctx->
width; x++)
239 line[2 * x + 1] ^= 0x80;
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it...
int linesize[AV_NUM_DATA_POINTERS]
number of bytes per line
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
AVCodec ff_rawvideo_decoder
int avpicture_fill(AVPicture *picture, uint8_t *ptr, enum AVPixelFormat pix_fmt, int width, int height)
Fill in the AVPicture fields.
packed RGB 8:8:8, 24bpp, RGBRGB...
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
AVPacket * pkt
Current packet as passed into the decoder, to avoid having to pass the packet into every function...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static enum AVPixelFormat find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc)
#define AV_PIX_FMT_RGB444
four components are given, that's all.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
8 bit with PIX_FMT_RGB32 palette
uint8_t * data[AV_NUM_DATA_POINTERS]
const PixelFormatTag ff_raw_pix_fmt_tags[]
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static const PixelFormatTag pix_fmt_bps_avi[]
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
static const uint8_t frame_size[4]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
void av_log(void *avcl, int level, const char *fmt,...)
int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt)
const char * name
Name of the codec implementation.
static const PixelFormatTag pix_fmt_bps_mov[]
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
#define AV_PIX_FMT_FLAG_PSEUDOPAL
The pixel format is "pseudo-paletted".
int64_t reordered_opaque
opaque 64bit number (generally a PTS) that will be reordered and output in AVFrame.reordered_opaque
packed RGB 8:8:8, 24bpp, BGRBGR...
Libavcodec external API header.
AVBufferRef * av_buffer_alloc(int size)
Allocate an AVBuffer of the given size using av_malloc().
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
main external API structure.
static void close(AVCodecParserContext *s)
uint8_t * data
The data buffer.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
int64_t reordered_opaque
reordered opaque 64bit (generally an integer or a double precision float PTS but can be anything)...
static av_cold int raw_close_decoder(AVCodecContext *avctx)
int palette_has_changed
Tell user application that palette has changed from previous frame.
refcounted data buffer API
int64_t pkt_pts
PTS copied from the AVPacket that was decoded to produce this frame.
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0 ...
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
A reference to a data buffer.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
common internal api header.
common internal and external API header
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
static void flip(AVCodecContext *avctx, AVPicture *picture)
static av_cold int raw_init_decoder(AVCodecContext *avctx)
AVBufferRef * av_buffer_ref(AVBufferRef *buf)
Create a new reference to an AVBuffer.
#define AV_PIX_FMT_RGB555
static av_cold int init(AVCodecParserContext *s)
struct AVCodecInternal * internal
Private context used for internal data.
int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height)
Calculate the size in bytes that a picture of the given width and height would occupy if stored in th...
int key_frame
1 -> keyframe, 0-> not
uint8_t * av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
#define FFSWAP(type, a, b)
#define MKTAG(a, b, c, d)
AVPixelFormat
Pixel format.
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...