20 #ifndef AVCODEC_H263_H
21 #define AVCODEC_H263_H
29 #if !FF_API_ASPECT_EXTENDED
30 #define FF_ASPECT_EXTENDED 15
32 #define INT_BIT (CHAR_BIT * sizeof(int))
38 #define INTRA_MCBPC_VLC_BITS 6
39 #define INTER_MCBPC_VLC_BITS 7
40 #define CBPY_VLC_BITS 6
41 #define TEX_VLC_BITS 9
43 #define H263_GOB_HEIGHT(h) ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4)
85 void *
data,
int *got_frame,
90 int motion_x,
int motion_y);
115 int16_t
block[6][64]);
130 int l, bit_size, code;
135 bit_size = f_code - 1;
140 code = (val >> bit_size) + 1;
142 return ff_mvtab[code][1] + 1 + bit_size;
158 int16_t
block[6][64],
159 int motion_x,
int motion_y){
163 int best_cbpy_score= INT_MAX;
164 int best_cbpc_score= INT_MAX;
165 int cbpc = (-1), cbpy= (-1);
174 if(score < best_cbpc_score){
175 best_cbpc_score= score;
187 if(score < best_cbpy_score){
188 best_cbpy_score= score;
194 if(best_cbpy_score + best_cbpc_score + 2*lambda >= 0)
198 for (i = 0; i < 6; i++) {
206 for (i = 0; i < 6; i++) {
const char const char void * val
const int8_t ff_inter_run[102]
const uint8_t ff_cbpc_b_tab[4][2]
const int8_t ff_inter_level[102]
void ff_h263_encode_picture_header(MpegEncContext *s, int picture_number)
ptrdiff_t const GLvoid * data
void(* clear_block)(int16_t *block)
void ff_h263_encode_init(MpegEncContext *s)
int ff_h263_pred_dc(MpegEncContext *s, int n, int16_t **dc_val_ptr)
VLC ff_h263_intra_MCBPC_vlc
const uint8_t ff_h263_intra_MCBPC_code[9]
const uint8_t ff_h263_cbpy_tab[16][2]
static void skip_put_bits(PutBitContext *s, int n)
Skip the given number of bits.
int mpv_flags
flags set by private options
const uint16_t ff_h263_format[8][2]
const uint8_t ff_modified_quant_tab[2][32]
void ff_h263_encode_motion(PutBitContext *pb, int val, int f_code)
int ff_h263_decode_mb(MpegEncContext *s, int16_t block[6][64])
#define FF_MPV_FLAG_CBP_RD
void ff_h263_decode_init_vlc(void)
const uint8_t ff_h263_intra_MCBPC_bits[9]
const uint8_t ff_mvtab[33][2]
void ff_h263_loop_filter(MpegEncContext *s)
const uint8_t ff_h263_inter_MCBPC_bits[28]
int ff_intel_h263_decode_picture_header(MpegEncContext *s)
int ff_h263_decode_mba(MpegEncContext *s)
void ff_init_qscale_tab(MpegEncContext *s)
init s->current_picture.qscale_table from s->lambda_table
bitstream reader API header.
const AVRational ff_h263_pixel_aspect[16]
int dquant
qscale difference to prev qscale
const uint8_t ff_mba_length[7]
uint8_t ff_h263_static_rl_table_store[2][2][2 *MAX_RUN+MAX_LEVEL+3]
av_const int ff_h263_aspect_to_info(AVRational aspect)
Return the 4 bit value that specifies the given aspect ratio.
static const uint8_t offset[127][2]
void ff_clean_h263_qscales(MpegEncContext *s)
modify qscale so that encoding is actually possible in h263 (limit difference to -2..2)
int ff_h263_decode_init(AVCodecContext *avctx)
VLC ff_h263_inter_MCBPC_vlc
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[]
const uint16_t ff_mba_max[6]
int block_last_index[12]
last non zero coefficient in block
const uint16_t ff_inter_vlc[103][2]
const uint8_t ff_h263_inter_MCBPC_code[28]
void ff_h263_pred_acdc(MpegEncContext *s, int16_t *block, int n)
int av_const h263_get_picture_format(int width, int height)
Return the value of the 3bit "source format" syntax element.
static const float pred[4]
#define MV_TYPE_16X16
1 vector for the whole mb
unsigned int lambda2
(lambda*lambda) >> FF_LAMBDA_SHIFT
main external API structure.
void ff_h263_encode_mba(MpegEncContext *s)
BYTE int const BYTE int int int height
void ff_h263_encode_gob_header(MpegEncContext *s, int mb_line)
Encode a group of blocks header.
rational number numerator/denominator
static void ff_h263_encode_motion_vector(MpegEncContext *s, int x, int y, int f_code)
int ff_h263_decode_picture_header(MpegEncContext *s)
const uint8_t ff_h263_mbtype_b_tab[15][2]
int ff_h263_resync(MpegEncContext *s)
Decode the group of blocks / video packet header.
int16_t * ff_h263_pred_motion(MpegEncContext *s, int block, int dir, int *px, int *py)
struct AVCodecContext * avctx
PutBitContext pb
bit output
#define CODEC_FLAG2_NO_OUTPUT
Skip bitstream encoding.
void ff_h263_encode_mb(MpegEncContext *s, int16_t block[6][64], int motion_x, int motion_y)
int ff_h263_decode_end(AVCodecContext *avctx)
void ff_h263_update_motion_val(MpegEncContext *s)
int16_t(* block)[64]
points to one of the following blocks
static int get_p_cbp(MpegEncContext *s, int16_t block[6][64], int motion_x, int motion_y)
int ff_h263_decode_gob_header(MpegEncContext *s)
static int h263_get_motion_length(int val, int f_code)
int ff_h263_decode_motion(MpegEncContext *s, int pred, int f_code)
void ff_h263_show_pict_info(MpegEncContext *s)
Print picture info if FF_DEBUG_PICT_INFO is set.
AVPixelFormat
Pixel format.
This structure stores compressed data.