FFmpeg
Macros | Functions | Variables
h261enc.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "h263.h"
#include "h261.h"
#include "mpegvideodata.h"

Go to the source code of this file.

Macros

#define UNI_ENC_INDEX(last, run, level)   ((last)*128*64 + (run)*128 + (level))
 

Functions

int ff_h261_get_picture_format (int width, int height)
 
void ff_h261_encode_picture_header (MpegEncContext *s, int picture_number)
 
static void h261_encode_gob_header (MpegEncContext *s, int mb_line)
 Encode a group of blocks header. More...
 
void ff_h261_reorder_mb_index (MpegEncContext *s)
 
static void h261_encode_motion (H261Context *h, int val)
 
static int get_cbp (MpegEncContext *s, int16_t block[6][64])
 
static void h261_encode_block (H261Context *h, int16_t *block, int n)
 Encode an 8x8 block. More...
 
void ff_h261_encode_mb (MpegEncContext *s, int16_t block[6][64], int motion_x, int motion_y)
 
static av_cold void init_uni_h261_rl_tab (const RLTable *rl, uint8_t *len_tab)
 
static av_cold void h261_encode_init_static (void)
 
av_cold void ff_h261_encode_init (MpegEncContext *s)
 

Variables

static uint8_t uni_h261_rl_len [64 *64 *2 *2]
 
const AVCodec ff_h261_encoder
 

Detailed Description

H.261 encoder.

Definition in file h261enc.c.

Macro Definition Documentation

◆ UNI_ENC_INDEX

#define UNI_ENC_INDEX (   last,
  run,
  level 
)    ((last)*128*64 + (run)*128 + (level))

Definition at line 39 of file h261enc.c.

Function Documentation

◆ ff_h261_get_picture_format()

int ff_h261_get_picture_format ( int  width,
int  height 
)

◆ ff_h261_encode_picture_header()

void ff_h261_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

Definition at line 54 of file h261enc.c.

Referenced by encode_picture().

◆ h261_encode_gob_header()

static void h261_encode_gob_header ( MpegEncContext s,
int  mb_line 
)
static

Encode a group of blocks header.

Definition at line 92 of file h261enc.c.

Referenced by ff_h261_reorder_mb_index().

◆ ff_h261_reorder_mb_index()

void ff_h261_reorder_mb_index ( MpegEncContext s)

Definition at line 109 of file h261enc.c.

Referenced by encode_thread().

◆ h261_encode_motion()

static void h261_encode_motion ( H261Context h,
int  val 
)
static

Definition at line 136 of file h261enc.c.

Referenced by ff_h261_encode_mb().

◆ get_cbp()

static int get_cbp ( MpegEncContext s,
int16_t  block[6][64] 
)
inlinestatic

Definition at line 155 of file h261enc.c.

Referenced by ff_h261_encode_mb().

◆ h261_encode_block()

static void h261_encode_block ( H261Context h,
int16_t *  block,
int  n 
)
static

Encode an 8x8 block.

Parameters
blockthe 8x8 block
nblock index (0-3 are luma, 4-5 are chroma)

Definition at line 170 of file h261enc.c.

Referenced by ff_h261_encode_mb().

◆ ff_h261_encode_mb()

void ff_h261_encode_mb ( MpegEncContext s,
int16_t  block[6][64],
int  motion_x,
int  motion_y 
)

Definition at line 238 of file h261enc.c.

Referenced by encode_mb_internal().

◆ init_uni_h261_rl_tab()

static av_cold void init_uni_h261_rl_tab ( const RLTable rl,
uint8_t *  len_tab 
)
static

Definition at line 326 of file h261enc.c.

Referenced by h261_encode_init_static().

◆ h261_encode_init_static()

static av_cold void h261_encode_init_static ( void  )
static

Definition at line 365 of file h261enc.c.

Referenced by ff_h261_encode_init().

◆ ff_h261_encode_init()

av_cold void ff_h261_encode_init ( MpegEncContext s)

Definition at line 373 of file h261enc.c.

Referenced by ff_mpv_encode_init().

Variable Documentation

◆ uni_h261_rl_len

uint8_t uni_h261_rl_len[64 *64 *2 *2]
static

Definition at line 38 of file h261enc.c.

Referenced by ff_h261_encode_init(), and h261_encode_init_static().

◆ ff_h261_encoder

const AVCodec ff_h261_encoder
Initial value:
= {
.name = "h261",
.long_name = NULL_IF_CONFIG_SMALL("H.261"),
.priv_class = &ff_mpv_enc_class,
.priv_data_size = sizeof(H261Context),
}

Definition at line 388 of file h261enc.c.

FF_CODEC_CAP_INIT_THREADSAFE
#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:42
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
AV_CODEC_ID_H261
@ AV_CODEC_ID_H261
Definition: codec_id.h:53
init
static int init
Definition: av_tx.c:47
ff_mpv_encode_init
int ff_mpv_encode_init(AVCodecContext *avctx)
Definition: mpegvideo_enc.c:310
ff_mpv_encode_picture
int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: mpegvideo_enc.c:1712
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:296
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:66
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
H261Context
H261Context.
Definition: h261.h:37
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: internal.h:50
ff_mpv_encode_end
int ff_mpv_encode_end(AVCodecContext *avctx)
Definition: mpegvideo_enc.c:965
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
ff_mpv_enc_class
const AVClass ff_mpv_enc_class
Definition: mpegvideo_enc.c:99