FFmpeg
Data Structures | Functions | Variables
speedhqenc.c File Reference
#include "libavutil/thread.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "mpeg12data.h"
#include "mpeg12vlc.h"
#include "mpegvideo.h"
#include "mpegvideodata.h"
#include "mpegvideoenc.h"
#include "rl.h"
#include "speedhq.h"
#include "speedhqenc.h"

Go to the source code of this file.

Data Structures

struct  SpeedHQEncContext
 

Functions

static av_cold void speedhq_init_static_data (void)
 
av_cold int ff_speedhq_encode_init (MpegEncContext *s)
 
void ff_speedhq_encode_picture_header (MpegEncContext *s)
 
void ff_speedhq_end_slice (MpegEncContext *s)
 
static void encode_dc (PutBitContext *pb, int diff, int component)
 
static void encode_block (MpegEncContext *s, int16_t *block, int n)
 
void ff_speedhq_encode_mb (MpegEncContext *s, int16_t block[12][64])
 
static int ff_speedhq_mb_rows_in_slice (int slice_num, int mb_height)
 
int ff_speedhq_mb_y_order_to_mb (int mb_y_order, int mb_height, int *first_in_slice)
 

Variables

static uint8_t speedhq_max_level [MAX_LEVEL+1]
 
static uint8_t speedhq_index_run [MAX_RUN+1]
 
static const uint16_t mpeg12_vlc_dc_lum_code_reversed [12]
 
static const uint16_t mpeg12_vlc_dc_chroma_code_reversed [12]
 
static uint32_t speedhq_lum_dc_uni [512]
 
static uint32_t speedhq_chr_dc_uni [512]
 
static uint8_t uni_speedhq_ac_vlc_len [64 *64 *2]
 
const FFCodec ff_speedhq_encoder
 

Detailed Description

SpeedHQ encoder.

Definition in file speedhqenc.c.

Function Documentation

◆ speedhq_init_static_data()

static av_cold void speedhq_init_static_data ( void  )
static

Definition at line 67 of file speedhqenc.c.

Referenced by ff_speedhq_encode_init().

◆ ff_speedhq_encode_init()

av_cold int ff_speedhq_encode_init ( MpegEncContext s)

Definition at line 98 of file speedhqenc.c.

Referenced by ff_mpv_encode_init().

◆ ff_speedhq_encode_picture_header()

void ff_speedhq_encode_picture_header ( MpegEncContext s)

Definition at line 137 of file speedhqenc.c.

Referenced by encode_picture().

◆ ff_speedhq_end_slice()

void ff_speedhq_end_slice ( MpegEncContext s)

Definition at line 149 of file speedhqenc.c.

Referenced by encode_thread(), and write_slice_end().

◆ encode_dc()

static void encode_dc ( PutBitContext pb,
int  diff,
int  component 
)
inlinestatic

Definition at line 163 of file speedhqenc.c.

Referenced by encode_block().

◆ encode_block()

static void encode_block ( MpegEncContext s,
int16_t *  block,
int  n 
)
static

Definition at line 197 of file speedhqenc.c.

Referenced by ff_speedhq_encode_mb().

◆ ff_speedhq_encode_mb()

void ff_speedhq_encode_mb ( MpegEncContext s,
int16_t  block[12][64] 
)

Definition at line 246 of file speedhqenc.c.

Referenced by encode_mb_internal().

◆ ff_speedhq_mb_rows_in_slice()

static int ff_speedhq_mb_rows_in_slice ( int  slice_num,
int  mb_height 
)
static

Definition at line 269 of file speedhqenc.c.

Referenced by ff_speedhq_mb_y_order_to_mb().

◆ ff_speedhq_mb_y_order_to_mb()

int ff_speedhq_mb_y_order_to_mb ( int  mb_y_order,
int  mb_height,
int first_in_slice 
)

Definition at line 274 of file speedhqenc.c.

Referenced by encode_thread().

Variable Documentation

◆ speedhq_max_level

uint8_t speedhq_max_level[MAX_LEVEL+1]
static

Definition at line 43 of file speedhqenc.c.

Referenced by encode_block(), and speedhq_init_static_data().

◆ speedhq_index_run

uint8_t speedhq_index_run[MAX_RUN+1]
static

Definition at line 44 of file speedhqenc.c.

Referenced by encode_block(), and speedhq_init_static_data().

◆ mpeg12_vlc_dc_lum_code_reversed

const uint16_t mpeg12_vlc_dc_lum_code_reversed[12]
static
Initial value:
= {
0x1, 0x0, 0x2, 0x5, 0x3, 0x7, 0xF, 0x1F, 0x3F, 0x7F, 0xFF, 0x1FF
}

Definition at line 47 of file speedhqenc.c.

Referenced by encode_dc(), and speedhq_init_static_data().

◆ mpeg12_vlc_dc_chroma_code_reversed

const uint16_t mpeg12_vlc_dc_chroma_code_reversed[12]
static
Initial value:
= {
0x0, 0x2, 0x1, 0x3, 0x7, 0xF, 0x1F, 0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF
}

Definition at line 50 of file speedhqenc.c.

Referenced by encode_dc(), and speedhq_init_static_data().

◆ speedhq_lum_dc_uni

uint32_t speedhq_lum_dc_uni[512]
static

Definition at line 56 of file speedhqenc.c.

Referenced by encode_dc(), and speedhq_init_static_data().

◆ speedhq_chr_dc_uni

uint32_t speedhq_chr_dc_uni[512]
static

Definition at line 57 of file speedhqenc.c.

Referenced by encode_dc(), and speedhq_init_static_data().

◆ uni_speedhq_ac_vlc_len

uint8_t uni_speedhq_ac_vlc_len[64 *64 *2]
static

Definition at line 59 of file speedhqenc.c.

Referenced by ff_speedhq_encode_init(), and speedhq_init_static_data().

◆ ff_speedhq_encoder

const FFCodec ff_speedhq_encoder
Initial value:
= {
.p.name = "speedhq",
CODEC_LONG_NAME("NewTek SpeedHQ"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.priv_class = &ff_mpv_enc_class,
.priv_data_size = sizeof(SpeedHQEncContext),
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.pix_fmts = (const enum AVPixelFormat[]) {
},
}

Definition at line 285 of file speedhqenc.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
ff_mpv_enc_class
const AVClass ff_mpv_enc_class
Definition: mpegvideo_enc.c:101
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:42
ff_mpv_encode_picture
int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic_arg, int *got_packet)
Definition: mpegvideo_enc.c:1754
SpeedHQEncContext
Definition: speedhqenc.c:61
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:296
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
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:73
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
AV_CODEC_ID_SPEEDHQ
@ AV_CODEC_ID_SPEEDHQ
Definition: codec_id.h:275
ff_mpv_encode_end
av_cold int ff_mpv_encode_end(AVCodecContext *avctx)
Definition: mpegvideo_enc.c:987
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:366
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:78
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:77
ff_mpv_encode_init
av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
Definition: mpegvideo_enc.c:310