FFmpeg
Data Structures | Macros | Functions | Variables
hdrenc.c File Reference
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.h"

Go to the source code of this file.

Data Structures

struct  HDREncContext
 

Macros

#define MIN_RLE   4
 

Functions

static av_cold int hdr_encode_init (AVCodecContext *avctx)
 
static av_cold int hdr_encode_close (AVCodecContext *avctx)
 
static void bytestream_put_str (uint8_t **buf, const char *const line)
 
static void float2rgbe (uint8_t *rgbe, float red, float green, float blue)
 
static void rle (uint8_t **buffer, const uint8_t *data, int width)
 
static int hdr_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
 

Variables

const FFCodec ff_hdr_encoder
 

Macro Definition Documentation

◆ MIN_RLE

#define MIN_RLE   4

Function Documentation

◆ hdr_encode_init()

static av_cold int hdr_encode_init ( AVCodecContext avctx)
static

Definition at line 31 of file hdrenc.c.

◆ hdr_encode_close()

static av_cold int hdr_encode_close ( AVCodecContext avctx)
static

Definition at line 42 of file hdrenc.c.

◆ bytestream_put_str()

static void bytestream_put_str ( uint8_t **  buf,
const char *const  line 
)
static

Definition at line 51 of file hdrenc.c.

Referenced by hdr_encode_frame().

◆ float2rgbe()

static void float2rgbe ( uint8_t *  rgbe,
float  red,
float  green,
float  blue 
)
static

Definition at line 56 of file hdrenc.c.

Referenced by hdr_encode_frame().

◆ rle()

static void rle ( uint8_t **  buffer,
const uint8_t *  data,
int  width 
)
static

Definition at line 75 of file hdrenc.c.

Referenced by hdr_encode_frame().

◆ hdr_encode_frame()

static int hdr_encode_frame ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame frame,
int *  got_packet 
)
static

Definition at line 119 of file hdrenc.c.

Variable Documentation

◆ ff_hdr_encoder

const FFCodec ff_hdr_encoder
Initial value:
= {
.p.name = "hdr",
CODEC_LONG_NAME("HDR (Radiance RGBE format) image"),
.priv_data_size = sizeof(HDREncContext),
.p.type = AVMEDIA_TYPE_VIDEO,
.init = hdr_encode_init,
.close = hdr_encode_close,
.p.pix_fmts = (const enum AVPixelFormat[]){
},
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 174 of file hdrenc.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:43
hdr_encode_close
static av_cold int hdr_encode_close(AVCodecContext *avctx)
Definition: hdrenc.c:42
hdr_encode_init
static av_cold int hdr_encode_init(AVCodecContext *avctx)
Definition: hdrenc.c:31
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:320
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition: codec.h:159
hdr_encode_frame
static int hdr_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: hdrenc.c:119
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:110
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AV_PIX_FMT_GBRPF32
#define AV_PIX_FMT_GBRPF32
Definition: pixfmt.h:532
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
HDREncContext
Definition: hdrenc.c:27
AV_CODEC_ID_RADIANCE_HDR
@ AV_CODEC_ID_RADIANCE_HDR
Definition: codec_id.h:320