FFmpeg  4.0
Macros | Enumerations | Functions | Variables
cfhd.c File Reference

Cineform HD video decoder. More...

#include "libavutil/attributes.h"
#include "libavutil/buffer.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "bytestream.h"
#include "get_bits.h"
#include "internal.h"
#include "thread.h"
#include "cfhd.h"

Go to the source code of this file.

Macros

#define ALPHA_COMPAND_DC_OFFSET   256
 
#define ALPHA_COMPAND_GAIN   9400
 

Enumerations

enum  CFHDParam {
  ChannelCount = 12, SubbandCount = 14, ImageWidth = 20, ImageHeight = 21,
  LowpassPrecision = 35, SubbandNumber = 48, Quantization = 53, ChannelNumber = 62,
  BitsPerComponent = 101, ChannelWidth = 104, ChannelHeight = 105, PrescaleShift = 109
}
 

Functions

static av_cold int cfhd_init (AVCodecContext *avctx)
 
static void init_plane_defaults (CFHDContext *s)
 
static void init_frame_defaults (CFHDContext *s)
 
static int dequant_and_decompand (int level, int quantisation)
 
static void process_alpha (int16_t *alpha, int width)
 
static void filter (int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, int clip)
 
static void horiz_filter (int16_t *output, int16_t *low, int16_t *high, int width)
 
static void horiz_filter_clip (int16_t *output, int16_t *low, int16_t *high, int width, int clip)
 
static void vert_filter (int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len)
 
static void free_buffers (CFHDContext *s)
 
static int alloc_buffers (AVCodecContext *avctx)
 
static int cfhd_decode (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int cfhd_close (AVCodecContext *avctx)
 

Variables

AVCodec ff_cfhd_decoder
 

Detailed Description

Cineform HD video decoder.

Definition in file cfhd.c.

Macro Definition Documentation

◆ ALPHA_COMPAND_DC_OFFSET

#define ALPHA_COMPAND_DC_OFFSET   256

Definition at line 40 of file cfhd.c.

Referenced by process_alpha().

◆ ALPHA_COMPAND_GAIN

#define ALPHA_COMPAND_GAIN   9400

Definition at line 41 of file cfhd.c.

Referenced by process_alpha().

Enumeration Type Documentation

◆ CFHDParam

enum CFHDParam
Enumerator
ChannelCount 
SubbandCount 
ImageWidth 
ImageHeight 
LowpassPrecision 
SubbandNumber 
Quantization 
ChannelNumber 
BitsPerComponent 
ChannelWidth 
ChannelHeight 
PrescaleShift 

Definition at line 43 of file cfhd.c.

Function Documentation

◆ cfhd_init()

static av_cold int cfhd_init ( AVCodecContext avctx)
static

Definition at line 58 of file cfhd.c.

◆ init_plane_defaults()

static void init_plane_defaults ( CFHDContext s)
static

Definition at line 68 of file cfhd.c.

Referenced by cfhd_decode(), and init_frame_defaults().

◆ init_frame_defaults()

static void init_frame_defaults ( CFHDContext s)
static

Definition at line 75 of file cfhd.c.

Referenced by cfhd_decode().

◆ dequant_and_decompand()

static int dequant_and_decompand ( int  level,
int  quantisation 
)
inlinestatic

Definition at line 93 of file cfhd.c.

Referenced by cfhd_decode().

◆ process_alpha()

static void process_alpha ( int16_t *  alpha,
int  width 
)
inlinestatic

Definition at line 100 of file cfhd.c.

Referenced by cfhd_decode().

◆ filter()

static void filter ( int16_t *  output,
ptrdiff_t  out_stride,
int16_t *  low,
ptrdiff_t  low_stride,
int16_t *  high,
ptrdiff_t  high_stride,
int  len,
int  clip 
)
inlinestatic

Definition at line 114 of file cfhd.c.

Referenced by adpcm_decode_frame(), apply_filter(), apply_ir_filter(), av_bitstream_filter_next(), av_bsf_alloc(), av_bsf_list_append2(), avfilter_get_by_name(), avfilter_graph_dump_to_buf(), avfilter_graph_parse2(), avfilter_graph_parse_ptr(), avfilter_graph_queue_command(), avfilter_graph_send_command(), bsfs_init(), build_filter(), check_mc(), compare_filter_params(), configure_output_video_filter(), copy_filter_params(), copy_restart_frame_params(), create_filter(), decode_frame(), detect_stream_specific(), determine_filters(), do_scaled_8tap_c(), do_video_out(), ff_alsa_get_device_list(), ff_avg_bilin_16h_msa(), ff_avg_bilin_16v_msa(), ff_avg_bilin_32h_msa(), ff_avg_bilin_32v_msa(), ff_avg_bilin_4h_msa(), ff_avg_bilin_4v_msa(), ff_avg_bilin_64h_msa(), ff_avg_bilin_64v_msa(), ff_avg_bilin_8h_msa(), ff_avg_bilin_8v_msa(), ff_filter_alloc(), ff_filter_graph_run_once(), ff_put_bilin_16h_msa(), ff_put_bilin_16v_msa(), ff_put_bilin_32h_msa(), ff_put_bilin_32v_msa(), ff_put_bilin_4h_msa(), ff_put_bilin_4v_msa(), ff_put_bilin_64h_msa(), ff_put_bilin_64v_msa(), ff_put_bilin_8h_msa(), ff_put_bilin_8v_msa(), ff_put_vp8_bilinear16_h_msa(), ff_put_vp8_bilinear16_v_msa(), ff_put_vp8_bilinear4_h_msa(), ff_put_vp8_bilinear4_v_msa(), ff_put_vp8_bilinear8_h_msa(), ff_put_vp8_bilinear8_v_msa(), ff_put_vp8_epel16_h4_mmi(), ff_put_vp8_epel16_h4_msa(), ff_put_vp8_epel16_h4v4_mmi(), ff_put_vp8_epel16_h4v6_mmi(), ff_put_vp8_epel16_h6_mmi(), ff_put_vp8_epel16_h6_msa(), ff_put_vp8_epel16_h6v4_mmi(), ff_put_vp8_epel16_h6v6_mmi(), ff_put_vp8_epel16_v4_mmi(), ff_put_vp8_epel16_v4_msa(), ff_put_vp8_epel16_v6_mmi(), ff_put_vp8_epel16_v6_msa(), ff_put_vp8_epel4_h4_mmi(), ff_put_vp8_epel4_h4_msa(), ff_put_vp8_epel4_h4v4_mmi(), ff_put_vp8_epel4_h4v6_mmi(), ff_put_vp8_epel4_h6_mmi(), ff_put_vp8_epel4_h6_msa(), ff_put_vp8_epel4_h6v4_mmi(), ff_put_vp8_epel4_h6v6_mmi(), ff_put_vp8_epel4_v4_mmi(), ff_put_vp8_epel4_v4_msa(), ff_put_vp8_epel4_v6_mmi(), ff_put_vp8_epel4_v6_msa(), ff_put_vp8_epel8_h4_mmi(), ff_put_vp8_epel8_h4_msa(), ff_put_vp8_epel8_h4v4_mmi(), ff_put_vp8_epel8_h4v6_mmi(), ff_put_vp8_epel8_h6_mmi(), ff_put_vp8_epel8_h6_msa(), ff_put_vp8_epel8_h6v4_mmi(), ff_put_vp8_epel8_h6v6_mmi(), ff_put_vp8_epel8_v4_mmi(), ff_put_vp8_epel8_v4_msa(), ff_put_vp8_epel8_v6_mmi(), ff_put_vp8_epel8_v6_msa(), filter_3800(), filter_fast_3320(), hevc_idct_16x16_msa(), hevc_idct_8x8_msa(), horiz_filter(), horiz_filter_clip(), hybrid4_8_12_cx(), hybrid6_cx(), iir_filter(), initFilter(), libAVEnumPins_Cleanup(), libAVEnumPins_Clone(), libAVEnumPins_Setup(), libAVPin_Disconnect(), libAVPin_QueryPinInfo(), libAVPin_ReceiveConnection(), libAVPin_Setup(), list_filters(), main(), make_filters_from_proto(), mpegts_open_filter(), mpegts_open_pes_filter(), mpegts_open_section_filter(), new_output_stream(), pick_formats(), predictor_update_3930(), predictor_update_filter(), process_command(), ps_hybrid_analysis_c(), put_hevc_epel_bi_h(), put_hevc_epel_bi_hv(), put_hevc_epel_bi_v(), put_hevc_epel_bi_w_h(), put_hevc_epel_bi_w_hv(), put_hevc_epel_bi_w_v(), put_hevc_epel_h(), put_hevc_epel_hv(), put_hevc_epel_uni_h(), put_hevc_epel_uni_hv(), put_hevc_epel_uni_v(), put_hevc_epel_uni_w_h(), put_hevc_epel_uni_w_hv(), put_hevc_epel_uni_w_v(), put_hevc_epel_v(), put_hevc_qpel_bi_h(), put_hevc_qpel_bi_hv(), put_hevc_qpel_bi_v(), put_hevc_qpel_bi_w_h(), put_hevc_qpel_bi_w_hv(), put_hevc_qpel_bi_w_v(), put_hevc_qpel_h(), put_hevc_qpel_hv(), put_hevc_qpel_uni_h(), put_hevc_qpel_uni_hv(), put_hevc_qpel_uni_v(), put_hevc_qpel_uni_w_h(), put_hevc_qpel_uni_w_hv(), put_hevc_qpel_uni_w_v(), put_hevc_qpel_v(), query_formats(), read_filter_params(), reap_filters(), resample_common(), resample_linear(), resample_one(), set_filter(), set_filter_params(), show_filters(), sws_getDefaultFilter(), test_hybrid_analysis(), transcode_init(), truespeech_apply_twopoint_filter(), tta_decode_frame(), tta_encode_frame(), usePal(), vert_filter(), write_filter_params(), xa_decode(), and yuv2yuvX().

◆ horiz_filter()

static void horiz_filter ( int16_t *  output,
int16_t *  low,
int16_t *  high,
int  width 
)
static

Definition at line 157 of file cfhd.c.

Referenced by cfhd_decode().

◆ horiz_filter_clip()

static void horiz_filter_clip ( int16_t *  output,
int16_t *  low,
int16_t *  high,
int  width,
int  clip 
)
static

Definition at line 163 of file cfhd.c.

Referenced by cfhd_decode().

◆ vert_filter()

static void vert_filter ( int16_t *  output,
ptrdiff_t  out_stride,
int16_t *  low,
ptrdiff_t  low_stride,
int16_t *  high,
ptrdiff_t  high_stride,
int  len 
)
static

Definition at line 169 of file cfhd.c.

Referenced by cfhd_decode().

◆ free_buffers()

static void free_buffers ( CFHDContext s)
static

Definition at line 176 of file cfhd.c.

Referenced by cfhd_close(), and cfhd_decode().

◆ alloc_buffers()

static int alloc_buffers ( AVCodecContext avctx)
static

Definition at line 194 of file cfhd.c.

Referenced by cfhd_decode().

◆ cfhd_decode()

static int cfhd_decode ( AVCodecContext avctx,
void data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 272 of file cfhd.c.

◆ cfhd_close()

static av_cold int cfhd_close ( AVCodecContext avctx)
static

Definition at line 830 of file cfhd.c.

Variable Documentation

◆ ff_cfhd_decoder

AVCodec ff_cfhd_decoder
Initial value:
= {
.name = "cfhd",
.long_name = NULL_IF_CONFIG_SMALL("Cineform HD"),
.priv_data_size = sizeof(CFHDContext),
.close = cfhd_close,
}
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: cfhd.c:272
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:40
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:1015
static av_cold int cfhd_close(AVCodecContext *avctx)
Definition: cfhd.c:830
static av_cold int cfhd_init(AVCodecContext *avctx)
Definition: cfhd.c:58
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 844 of file cfhd.c.