Go to the documentation of this file.
20 #ifndef AVCODEC_H263_H
21 #define AVCODEC_H263_H
30 #define FF_ASPECT_EXTENDED 15
31 #define INT_BIT (CHAR_BIT * sizeof(int))
37 #define INTRA_MCBPC_VLC_BITS 6
38 #define INTER_MCBPC_VLC_BITS 7
39 #define CBPY_VLC_BITS 6
40 #define TEX_VLC_BITS 9
42 #define H263_GOB_HEIGHT(h) ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4)
55 void *
data,
int *got_frame,
60 int motion_x,
int motion_y);
85 int16_t
block[6][64]);
100 int l, bit_size,
code;
105 bit_size = f_code - 1;
128 int16_t
block[6][64],
129 int motion_x,
int motion_y){
133 int best_cbpy_score= INT_MAX;
134 int best_cbpc_score= INT_MAX;
135 int cbpc = (-1), cbpy= (-1);
141 if(
i&1) score +=
s->coded_score[5];
142 if(
i&2) score +=
s->coded_score[4];
144 if(score < best_cbpc_score){
145 best_cbpc_score= score;
152 if(
i&1) score +=
s->coded_score[3];
153 if(
i&2) score +=
s->coded_score[2];
154 if(
i&4) score +=
s->coded_score[1];
155 if(
i&8) score +=
s->coded_score[0];
157 if(score < best_cbpy_score){
158 best_cbpy_score= score;
163 if ((motion_x | motion_y |
s->dquant) == 0 &&
s->mv_type==
MV_TYPE_16X16){
164 if(best_cbpy_score + best_cbpc_score + 2*lambda >= 0)
168 for (
i = 0;
i < 6;
i++) {
169 if (
s->block_last_index[
i] >= 0 && ((cbp >> (5 -
i))&1)==0 ){
170 s->block_last_index[
i]= -1;
171 s->bdsp.clear_block(
s->block[
i]);
176 for (
i = 0;
i < 6;
i++) {
177 if (
s->block_last_index[
i] >= 0)
#define MV_TYPE_16X16
1 vector for the whole mb
AVPixelFormat
Pixel format.
void ff_init_qscale_tab(MpegEncContext *s)
init s->current_picture.qscale_table from s->lambda_table
int ff_h263_decode_mba(MpegEncContext *s)
static int h263_get_motion_length(int val, int f_code)
VLC ff_h263_intra_MCBPC_vlc
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
static double val(void *priv, double ch)
#define AV_CODEC_FLAG2_NO_OUTPUT
Skip bitstream encoding.
int ff_h263_pred_dc(MpegEncContext *s, int n, int16_t **dc_val_ptr)
int av_const h263_get_picture_format(int width, int height)
Return the value of the 3-bit "source format" syntax element.
void ff_h263_decode_init_vlc(void)
void ff_h263_encode_init(MpegEncContext *s)
static void skip_put_bits(PutBitContext *s, int n)
Skip the given number of bits.
static int get_p_cbp(MpegEncContext *s, int16_t block[6][64], int motion_x, int motion_y)
void ff_h263_encode_picture_header(MpegEncContext *s, int picture_number)
void ff_h263_encode_gob_header(MpegEncContext *s, int mb_line)
Encode a group of blocks header.
Rational number (pair of numerator and denominator).
enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[]
void ff_h263_update_motion_val(MpegEncContext *s)
void ff_h263_show_pict_info(MpegEncContext *s)
Print picture info if FF_DEBUG_PICT_INFO is set.
void ff_clean_h263_qscales(MpegEncContext *s)
modify qscale so that encoding is actually possible in H.263 (limit difference to -2....
void ff_h263_encode_mba(MpegEncContext *s)
int ff_intel_h263_decode_picture_header(MpegEncContext *s)
void ff_h263_loop_filter(MpegEncContext *s)
int ff_h263_decode_motion(MpegEncContext *s, int pred, int f_code)
int ff_h263_resync(MpegEncContext *s)
Decode the group of blocks / video packet header / slice header (MPEG-4 Studio).
const uint8_t ff_h263_cbpy_tab[16][2]
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
const uint8_t ff_h263_inter_MCBPC_bits[28]
int ff_h263_decode_init(AVCodecContext *avctx)
#define i(width, name, range_min, range_max)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some it can consider them to be part of the FIFO and delay acknowledging a status change accordingly Example code
int ff_h263_decode_end(AVCodecContext *avctx)
int ff_h263_decode_gob_header(MpegEncContext *s)
av_const int ff_h263_aspect_to_info(AVRational aspect)
Return the 4 bit value that specifies the given aspect ratio.
static const float pred[4]
#define FF_MPV_FLAG_CBP_RD
int ff_h263_decode_picture_header(MpegEncContext *s)
const uint8_t ff_mvtab[33][2]
main external API structure.
int16_t * ff_h263_pred_motion(MpegEncContext *s, int block, int dir, int *px, int *py)
void ff_h263_pred_acdc(MpegEncContext *s, int16_t *block, int n)
static void ff_h263_encode_motion_vector(MpegEncContext *s, int x, int y, int f_code)
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
This structure stores compressed data.
The exact code depends on how similar the blocks are and how related they are to the block
int ff_h263_decode_mb(MpegEncContext *s, int16_t block[6][64])
void ff_h263_encode_mb(MpegEncContext *s, int16_t block[6][64], int motion_x, int motion_y)
void ff_h263_encode_motion(PutBitContext *pb, int val, int f_code)
VLC ff_h263_inter_MCBPC_vlc