FFmpeg
Classes | Macros | Typedefs | Variables
rawdec.c File Reference

Raw Video Decoder. More...

#include "avcodec.h"
#include "bswapdsp.h"
#include "get_bits.h"
#include "internal.h"
#include "raw.h"
#include "libavutil/avassert.h"
#include "libavutil/buffer.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"

Classes

struct  RawVideoContext
 

Macros

#define SCALE16(x, bits)   (((x) << (16 - (bits))) | ((x) >> (2 * (bits) - 16)))
 
#define MKSCALE16(name, r16, w16)
 Scale buffer to 16 bits per coded sample resolution. More...
 

Typedefs

typedef struct RawVideoContext RawVideoContext
 

Variables

AVCodec ff_rawvideo_decoder
 

Detailed Description

Raw Video Decoder.

Macro Definition Documentation

§ MKSCALE16

#define MKSCALE16 (   name,
  r16,
  w16 
)
Value:
static void name(AVCodecContext *avctx, uint8_t * dst, const uint8_t *buf, int buf_size, int packed) \
{ \
int i; \
if (!packed) { \
for (i = 0; i + 1 < buf_size; i += 2) \
w16(dst + i, SCALE16(r16(buf + i), avctx->bits_per_coded_sample)); \
} else { \
GetBitContext gb; \
init_get_bits(&gb, buf, buf_size * 8); \
for (i = 0; i < avctx->width * avctx->height; i++) { \
int sample = get_bits(&gb, avctx->bits_per_coded_sample); \
w16(dst + i*2, SCALE16(sample, avctx->bits_per_coded_sample)); \
} \
} \
}
main external API structure.
Definition: avcodec.h:1518

Scale buffer to 16 bits per coded sample resolution.

Variable Documentation

§ ff_rawvideo_decoder

AVCodec ff_rawvideo_decoder
Initial value:
= {
.name = "rawvideo",
.long_name = NULL_IF_CONFIG_SMALL("raw video"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_RAWVIDEO,
.priv_data_size = sizeof(RawVideoContext),
.init = raw_init_decoder,
.close = raw_close_decoder,
.decode = raw_decode,
.priv_class = &rawdec_class,
.capabilities = AV_CODEC_CAP_PARAM_CHANGE,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
Definition: rawdec.c:39
#define AV_CODEC_CAP_PARAM_CHANGE
Codec supports changed parameters at any point.
Definition: avcodec.h:1023