Go to the documentation of this file.
44 uint8_t
block[8] = { 0 };
47 for (
int y = 0; y <
height; y += 4) {
48 for (
int x = 0; x <
width * 4; x += 16) {
59 a = bytestream2_get_le16u(gb);
60 b = bytestream2_get_le16u(gb);
63 }
else if (
a == 1 &&
b == 0xffff) {
65 }
else if (
b &&
a == 0) {
82 for (
int by = 0; by < 4; by++) {
83 for (
int bx = 0; bx < 4; bx++)
84 AV_WL32(
dst + x + bx * 4 + by * linesize, bytestream2_get_le24u(gb));
105 if (avpkt->
size < 22)
110 if (bytestream2_get_le32(&gb) !=
MKTAG(
'D',
'X',
'T',
'1'))
112 flags = bytestream2_get_le32(&gb);
114 width = bytestream2_get_le32(&gb);
115 height = bytestream2_get_le32(&gb);
129 linesize = -
p->linesize[0];
int(* dxt1_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
static av_always_inline int bytestream2_get_bytes_left(const GetByteContext *g)
This structure describes decoded (raw) audio or video data.
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
static int decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
AVCodec p
The public AVCodec.
#define FF_CODEC_DECODE_CB(func)
int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags)
Wrapper around get_buffer() for frame-multithreaded codecs.
av_cold void ff_texturedsp_init(TextureDSPContext *c)
#define CODEC_LONG_NAME(str)
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
const FFCodec ff_rtv1_decoder
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static av_cold int decode_init(AVCodecContext *avctx)
main external API structure.
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
static int decode_rtv1(GetByteContext *gb, uint8_t *dst, ptrdiff_t linesize, int width, int height, int flag, int(*dxt1_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block))
This structure stores compressed data.
static int dxt1_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a DXT1 texture and store the resulting RGBA pixels in 'dst'.
int width
picture width / height.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
The exact code depends on how similar the blocks are and how related they are to the block
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define MKTAG(a, b, c, d)