FFmpeg
Loading...
Searching...
No Matches
astcdec.c File Reference

ASTC (Adaptive Scalable Texture Compression) demuxer. More...

#include "config_components.h"
#include <inttypes.h>
#include <limits.h>
#include "avformat.h"
#include "avio.h"
#include "avio_internal.h"
#include "demux.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Data Structures

struct  ASTCDemuxerContext
 

Macros

#define ASTC_HEADER_SIZE   16
 
#define ASTC_BLOCK_BYTES   16
 

Functions

static int astc_probe (const AVProbeData *p)
 
static int astc_read_header (AVFormatContext *s)
 
static int astc_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const uint8_t astc_magic [4] = { 0x13, 0xAB, 0xA1, 0x5C }
 
const FFInputFormat ff_astc_demuxer
 

Detailed Description

ASTC (Adaptive Scalable Texture Compression) demuxer.

Reads the 16-byte .astc header, exposes it as extradata to the decoder, and emits the raw ASTC bitstream as a single packet.

Definition in file astcdec.c.

Macro Definition Documentation

◆ ASTC_HEADER_SIZE

#define ASTC_HEADER_SIZE   16

Definition at line 42 of file astcdec.c.

◆ ASTC_BLOCK_BYTES

#define ASTC_BLOCK_BYTES   16

Definition at line 43 of file astcdec.c.

Function Documentation

◆ astc_probe()

static int astc_probe ( const AVProbeData * p)
static

Definition at line 51 of file astcdec.c.

◆ astc_read_header()

static int astc_read_header ( AVFormatContext * s)
static

Definition at line 59 of file astcdec.c.

◆ astc_read_packet()

static int astc_read_packet ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 127 of file astcdec.c.

Variable Documentation

◆ astc_magic

const uint8_t astc_magic[4] = { 0x13, 0xAB, 0xA1, 0x5C }
static

Definition at line 44 of file astcdec.c.

Referenced by astc_probe(), astc_read_header(), ktx_read_header(), and ktx_write_header().

◆ ff_astc_demuxer

const FFInputFormat ff_astc_demuxer
Initial value:
= {
.p.name = "astc",
.p.long_name = NULL_IF_CONFIG_SMALL("ASTC (Adaptive Scalable Texture Compression)"),
.p.mime_type = "image/astc",
.p.extensions = "astc",
.p.flags = AVFMT_NOTIMESTAMPS,
.priv_data_size = sizeof(ASTCDemuxerContext),
}
static int astc_read_header(AVFormatContext *s)
Definition astcdec.c:59
static int astc_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition astcdec.c:127
static int astc_probe(const AVProbeData *p)
Definition astcdec.c:51
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition avformat.h:500
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int read_probe(const AVProbeData *p)
Definition cdg.c:30
static int read_header(FFV1Context *f, RangeCoder *c)
Definition ffv1dec.c:578
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:97

Definition at line 165 of file astcdec.c.