66 #define write16(p, value) \
68 if (s->big_endian) AV_WB16(p, value); \
69 else AV_WL16(p, value); \
72 #define write32(p, value) \
74 if (s->big_endian) AV_WB32(p, value); \
75 else AV_WL32(p, value); \
85 for (y = 0; y < avctx->
height; y++) {
86 for (x = 0; x < avctx->
width; x++) {
89 value = ((
AV_RB16(src + 6*x + 4) & 0xFFC0) >> 4)
90 | ((
AV_RB16(src + 6*x + 2) & 0xFFC0) << 6)
91 | ((
AV_RB16(src + 6*x + 0) & 0xFFC0) << 16);
93 value = ((
AV_RL16(src + 6*x + 4) & 0xFFC0) >> 4)
94 | ((
AV_RL16(src + 6*x + 2) & 0xFFC0) << 6)
95 | ((
AV_RL16(src + 6*x + 0) & 0xFFC0) << 16);
105 const AVFrame *frame,
int *got_packet)
111 #define HEADER_SIZE 1664
127 memcpy (buf + 8,
"V1.0", 4);
132 write32(buf + 660, 0xFFFFFFFF);
#define write32(p, value)
#define CODEC_FLAG_BITEXACT
int linesize[AV_NUM_DATA_POINTERS]
number of bytes per line
This structure describes decoded (raw) audio or video data.
packed RGB 8:8:8, 24bpp, RGBRGB...
AVFrame * coded_frame
the picture in the bitstream
struct DPXContext DPXContext
static av_cold int encode_init(AVCodecContext *avctx)
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height, unsigned char *dest, int dest_size)
Copy pixel data from an AVPicture into a buffer.
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
four components are given, that's all.
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
uint8_t * data[AV_NUM_DATA_POINTERS]
static int init(AVCodecParserContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
int flags
A combination of AV_PKT_FLAG values.
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int width
picture width / height.
int ff_alloc_packet(AVPacket *avpkt, int size)
Check AVPacket size and/or allocate data.
main external API structure.
#define MKBETAG(a, b, c, d)
static void encode_rgb48_10bit(AVCodecContext *avctx, const AVPicture *pic, uint8_t *dst)
common internal api header.
common internal and external API header
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
#define write16(p, value)
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
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
AVPixelFormat
Pixel format.
This structure stores compressed data.