68 #define write16(p, value) \ 70 if (s->big_endian) AV_WB16(p, value); \ 71 else AV_WL16(p, value); \ 74 #define write32(p, value) \ 76 if (s->big_endian) AV_WB32(p, value); \ 77 else AV_WL32(p, value); \ 87 for (y = 0; y < avctx->
height; y++) {
88 for (x = 0; x < avctx->
width; x++) {
91 value = ((
AV_RB16(src + 6*x + 4) & 0xFFC0) >> 4)
92 | ((
AV_RB16(src + 6*x + 2) & 0xFFC0) << 6)
93 | ((
AV_RB16(src + 6*x + 0) & 0xFFC0) << 16);
95 value = ((
AV_RL16(src + 6*x + 4) & 0xFFC0) >> 4)
96 | ((
AV_RL16(src + 6*x + 2) & 0xFFC0) << 6)
97 | ((
AV_RL16(src + 6*x + 0) & 0xFFC0) << 16);
107 const AVFrame *frame,
int *got_packet)
113 #define HEADER_SIZE 1664 129 memcpy (buf + 8,
"V1.0", 4);
134 write32(buf + 660, 0xFFFFFFFF);
#define write32(p, value)
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
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.
static av_cold int encode_close(AVCodecContext *avctx)
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
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]
#define CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#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.
int width
picture width / height.
int ff_alloc_packet(AVPacket *avpkt, int size)
Check AVPacket size and/or allocate data.
#define AV_LOG_INFO
Standard information.
Libavcodec external API header.
main external API structure.
static void close(AVCodecParserContext *s)
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 av_cold int init(AVCodecParserContext *s)
#define MKBETAG(a, b, c, d)
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.