38 #if FF_API_CODED_FRAME 69 #define write16(p, value) \ 71 if (s->big_endian) AV_WB16(p, value); \ 72 else AV_WL16(p, value); \ 75 #define write32(p, value) \ 77 if (s->big_endian) AV_WB32(p, value); \ 78 else AV_WL32(p, value); \ 88 for (y = 0; y < avctx->
height; y++) {
89 for (x = 0; x < avctx->
width; x++) {
92 value = ((
AV_RB16(src + 6*x + 4) & 0xFFC0) >> 4)
93 | ((
AV_RB16(src + 6*x + 2) & 0xFFC0) << 6)
94 | ((
AV_RB16(src + 6*x + 0) & 0xFFC0) << 16);
96 value = ((
AV_RL16(src + 6*x + 4) & 0xFFC0) >> 4)
97 | ((
AV_RL16(src + 6*x + 2) & 0xFFC0) << 6)
98 | ((
AV_RL16(src + 6*x + 0) & 0xFFC0) << 16);
108 const AVFrame *frame,
int *got_packet)
114 #define HEADER_SIZE 1664 131 memcpy (buf + 8,
"V1.0", 4);
136 write32(buf + 660, 0xFFFFFFFF);
#define write32(p, value)
This structure describes decoded (raw) audio or video data.
int av_image_copy_to_buffer(uint8_t *dst, int dst_size, const uint8_t *const src_data[4], const int src_linesize[4], enum AVPixelFormat pix_fmt, int width, int height, int align)
Copy image data from an image into a buffer.
static void encode_rgb48_10bit(AVCodecContext *avctx, const AVFrame *pic, uint8_t *dst)
packed RGB 8:8:8, 24bpp, RGBRGB...
static av_cold int encode_init(AVCodecContext *avctx)
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
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 bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height, int align)
Return the size in bytes of the amount of data required to store an image with the given parameters...
#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. ...
int flags
AV_CODEC_FLAG_*.
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.
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
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.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
static enum AVPixelFormat pix_fmts[]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
#define FF_DISABLE_DEPRECATION_WARNINGS
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)
attribute_deprecated AVFrame * coded_frame
the picture in the bitstream
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)
#define FF_ENABLE_DEPRECATION_WARNINGS
int key_frame
1 -> keyframe, 0-> not
AVPixelFormat
Pixel format.
This structure stores compressed data.