#include "global.h"
#include "conformance.h"
Go to the source code of this file.
Functions | |
unsigned int | getMaxFs (unsigned int levelIdc) |
unsigned int | getMaxMBPS (unsigned int levelIdc) |
unsigned int | getMinCR (unsigned int levelIdc) |
unsigned int | getMaxBR (unsigned int levelIdc) |
unsigned int | getMaxCPB (unsigned int levelIdc) |
void | ProfileCheck (InputParameters *p_Inp) |
void | LevelCheck (ImageParameters *p_Img, InputParameters *p_Inp) |
void | update_mv_limits (ImageParameters *p_Img, InputParameters *p_Inp, byte is_field) |
void | clip_mv_range (ImageParameters *p_Img, int search_range, MotionVector *mv, int res) |
void | test_clip_mvs (ImageParameters *p_Img, short mv[2], Boolean write_mb) |
int | out_of_bounds_mvs (ImageParameters *p_Img, short mv[2]) |
int | InvalidWeightsForBiPrediction (Slice *currSlice, Block8x8Info *b8x8info, int mode) |
int | InvalidMotionVectors (ImageParameters *p_Img, Slice *currSlice, Block8x8Info *b8x8info, int mode) |
Boolean | CheckPredictionParams (Macroblock *currMB, Block8x8Info *b8x8info, int mode) |
Variables | |
static const unsigned int | MaxFs [] |
static const unsigned int | MinCR [] |
static const unsigned int | MaxBR [] |
static const unsigned int | MaxCPB [] |
static const unsigned int | MaxMBPS [] |
static const int | LEVELVMVLIMIT [17][6] |
const int | LEVELHMVLIMIT [6] = { -2047, 2047, -4096, 4095, -8192, 8191} |
Definition in file conformance.c.
void clip_mv_range | ( | ImageParameters * | p_Img, | |
int | search_range, | |||
MotionVector * | mv, | |||
int | res | |||
) |
Clip motion vector range given encoding level.
Definition at line 451 of file conformance.c.
References img_par::MaxHmvR, and img_par::MaxVmvR.
Referenced by BiPredBlockMotionSearch(), and BlockMotionSearch().
unsigned int getMaxBR | ( | unsigned int | levelIdc | ) |
Get maximum bit rate (in bits/s) supported given a level.
Definition at line 136 of file conformance.c.
References error().
Referenced by LevelCheck().
unsigned int getMaxCPB | ( | unsigned int | levelIdc | ) |
Get maximum coded buffer size (in bits) supported given a level.
Definition at line 159 of file conformance.c.
References error().
unsigned int getMaxFs | ( | unsigned int | levelIdc | ) |
Get maximum frame size (in MBs) supported given a level.
Definition at line 67 of file conformance.c.
References error().
Referenced by LevelCheck().
unsigned int getMaxMBPS | ( | unsigned int | levelIdc | ) |
Get maximum processing rate (in MB/s) supported given a level.
Definition at line 90 of file conformance.c.
References error().
Referenced by LevelCheck().
unsigned int getMinCR | ( | unsigned int | levelIdc | ) |
Get minimum compression ratio supported given a level.
Definition at line 113 of file conformance.c.
References error().
void LevelCheck | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp | |||
) |
Check if Level constraints are satisfied.
Definition at line 361 of file conformance.c.
References inp_par_enc::directInferenceFlag, error(), errortext, ET_SIZE, getMaxBR(), getMaxFs(), getMaxMBPS(), inp_par_enc::IntraProfile, inp_par_enc::LevelIDC, inp_par_enc::MbInterlace, inp_par_enc::output, inp_par_enc::PicInterlace, inp_par_enc::slice_argument, and inp_par_enc::slice_mode.
Referenced by PatchInp().
int out_of_bounds_mvs | ( | ImageParameters * | p_Img, | |
short | mv[2] | |||
) |
Clip motion vector range given encoding level.
Definition at line 482 of file conformance.c.
References img_par::MaxHmvR, and img_par::MaxVmvR.
Referenced by Get_Direct_MV_Spatial_MBAFF(), Get_Direct_MV_Temporal(), and RDCost_for_macroblocks().
void ProfileCheck | ( | InputParameters * | p_Inp | ) |
Check Profile conformance.
Definition at line 182 of file conformance.c.
References BASELINE, inp_par_enc::BRefPictures, inp_par_enc::directInferenceFlag, error(), errortext, ET_SIZE, EXTENDED, FREXT_CAVLC444, FREXT_Hi10P, FREXT_Hi422, FREXT_Hi444, FREXT_HP, inp_par_enc::idr_period, inp_par_enc::intra_period, inp_par_enc::IntraProfile, MAIN, inp_par_enc::MbInterlace, inp_par_enc::num_ref_frames, inp_par_enc::num_slice_groups_minus1, inp_par_enc::NumberBFrames, inp_par_enc::partition_mode, inp_par_enc::PicInterlace, inp_par_enc::ProfileIDC, inp_par_enc::sp_periodicity, inp_par_enc::symbol_mode, inp_par_enc::WeightedBiprediction, inp_par_enc::WeightedPrediction, and inp_par_enc::yuv_format.
Referenced by PatchInp().
void test_clip_mvs | ( | ImageParameters * | p_Img, | |
short | mv[2], | |||
Boolean | write_mb | |||
) |
Clip motion vector range given encoding level.
Definition at line 465 of file conformance.c.
References img_par::MaxHmvR, and img_par::MaxVmvR.
void update_mv_limits | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp, | |||
byte | is_field | |||
) |
Update Motion Vector Limits.
Definition at line 416 of file conformance.c.
References img_par::LevelIndex, img_par::MaxHmvR, and img_par::MaxVmvR.
Referenced by encode_one_slice_MBAFF(), field_picture(), and frame_picture().
const int LEVELVMVLIMIT[17][6] [static] |
Initial value:
{ { -63, 63, -128, 127, -256, 255}, { -63, 63, -128, 127, -256, 255}, { -127, 127, -256, 255, -512, 511}, { -127, 127, -256, 255, -512, 511}, { -127, 127, -256, 255, -512, 511}, { -127, 127, -256, 255, -512, 511}, { -255, 255, -512, 511, -1024, 1023}, { -255, 255, -512, 511, -1024, 1023}, { -255, 255, -512, 511, -1024, 1023}, { -511, 511, -1024, 1023, -2048, 2047}, { -511, 511, -1024, 1023, -2048, 2047}, { -511, 511, -1024, 1023, -2048, 2047}, { -511, 511, -1024, 1023, -2048, 2047}, { -511, 511, -1024, 1023, -2048, 2047}, { -511, 511, -1024, 1023, -2048, 2047}, { -511, 511, -1024, 1023, -2048, 2047}, { -511, 511, -1024, 1023, -2048, 2047} }
Definition at line 38 of file conformance.c.
const unsigned int MaxBR[] [static] |
Initial value:
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,128, 192, 384, 768, 0, 0, 0, 0, 0, 0,2000,4000,4000, 0, 0, 0, 0, 0, 0, 0, 10000,14000,20000, 0, 0, 0, 0, 0, 0, 0,20000,50000,50000, 0, 0, 0, 0, 0, 0, 0,135000,240000 }
Definition at line 26 of file conformance.c.
const unsigned int MaxCPB[] [static] |
Initial value:
{ 0, 0, 0, 0, 0, 0, 0, 0, 0,175,350, 500,1000,2000, 0, 0, 0, 0, 0, 0,2000,4000,4000, 0, 0, 0, 0, 0, 0, 0, 10000,14000,20000, 0, 0, 0, 0, 0, 0, 0,25000,62500,62500, 0, 0, 0, 0, 0, 0, 0,135000,240000 }
Definition at line 28 of file conformance.c.
const unsigned int MaxFs[] [static] |
Initial value:
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 99, 396, 396, 396, 0, 0, 0, 0, 0, 0, 396, 792, 1620, 0, 0, 0, 0, 0, 0, 0, 1620, 3600, 5120, 0, 0, 0, 0, 0, 0, 0, 8192, 8192, 8704, 0, 0, 0, 0, 0, 0, 0, 22080, 36864 }
Definition at line 21 of file conformance.c.
const unsigned int MaxMBPS[] [static] |
Initial value:
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1485, 1485, 3000, 6000, 11880, 0, 0, 0, 0, 0, 0, 11880, 19800, 20250, 0, 0, 0, 0, 0, 0, 0, 40500, 108000, 216000, 0, 0, 0, 0, 0, 0, 0, 245760, 245760, 522240, 0, 0, 0, 0, 0, 0, 0, 589824, 983040 }
Definition at line 31 of file conformance.c.
const unsigned int MinCR[] [static] |
Initial value:
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2 }
Definition at line 24 of file conformance.c.