Raw Video Decoder.
More...
Go to the source code of this file.
|
#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...
|
|
Raw Video Decoder.
Definition in file rawdec.c.
◆ SCALE16
#define SCALE16 |
( |
|
x, |
|
|
|
bits |
|
) |
| (((x) << (16 - (bits))) | ((x) >> (2 * (bits) - 16))) |
◆ MKSCALE16
#define MKSCALE16 |
( |
|
name, |
|
|
|
r16, |
|
|
|
w16 |
|
) |
| |
Value:{ \
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++) { \
w16(dst + i*2,
SCALE16(sample, avctx->bits_per_coded_sample)); \
} \
} \
}
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
main external API structure.
Scale buffer to 16 bits per coded sample resolution.
Definition at line 150 of file rawdec.c.
◆ raw_init_decoder()
◆ flip()
◆ raw_decode()
◆ raw_close_decoder()
◆ options
Initial value:={
}
#define AV_OPT_FLAG_VIDEO_PARAM
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition at line 58 of file rawdec.c.
◆ rawdec_class
Initial value:= {
.class_name = "rawdec",
}
#define LIBAVUTIL_VERSION_INT
static const AVOption options[]
Definition at line 63 of file rawdec.c.
◆ ff_rawvideo_decoder
Initial value:= {
.name = "rawvideo",
}
static av_cold int init(AVCodecContext *avctx)
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static av_cold int raw_close_decoder(AVCodecContext *avctx)
#define AV_CODEC_CAP_PARAM_CHANGE
Codec supports changed parameters at any point.
static av_cold int raw_init_decoder(AVCodecContext *avctx)
static const AVClass rawdec_class
Definition at line 495 of file rawdec.c.