41 const uint32_t *
src = (
const uint32_t *)avpkt->
data;
44 uint8_t *g_line, *b_line, *r_line;
45 int r10 = (avctx->
codec_tag & 0xFFFFFF) ==
MKTAG(
'r',
'1',
'0', 0);
50 if (avpkt->
size < 4 * aligned_width * avctx->
height) {
60 g_line = pic->
data[0];
61 b_line = pic->
data[1];
62 r_line = pic->
data[2];
64 for (h = 0; h < avctx->
height; h++) {
65 uint16_t *dstg = (uint16_t *)g_line;
66 uint16_t *dstb = (uint16_t *)b_line;
67 uint16_t *dstr = (uint16_t *)r_line;
68 for (w = 0; w < avctx->
width; w++) {
78 g = (pixel >> 10) & 0x3ff;
79 r = (pixel >> 20) & 0x3ff;
82 g = (pixel >> 10) & 0x3ff;
83 b = (pixel >> 20) & 0x3ff;
85 b = (pixel >> 2) & 0x3ff;
86 g = (pixel >> 12) & 0x3ff;
87 r = (pixel >> 22) & 0x3ff;
93 src += aligned_width - avctx->
width;
104 #if CONFIG_R210_DECODER 116 #if CONFIG_R10K_DECODER 128 #if CONFIG_AVRP_DECODER #define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
#define AV_PIX_FMT_GBRP10
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.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
#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. ...
const char * name
Name of the codec implementation.
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
common internal and external API header
static av_cold int decode_init(AVCodecContext *avctx)
int key_frame
1 -> keyframe, 0-> not
#define MKTAG(a, b, c, d)
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators...