Added a commandline parameter --bipred to enable bi-pred search

This commit is contained in:
Marko Viitanen 2015-04-21 14:18:34 +03:00
parent fb74f86a5b
commit 7f504b7808
5 changed files with 9 additions and 2 deletions

View file

@ -57,7 +57,8 @@ http://github.com/ultravideo/kvazaar/wiki/List-of-suggested-topics for a list of
0: 64x64, 1: 32x32, 2: 16x16, 3: 8x8
--pu-depth-intra <int>-<int> : Range for sizes of intra prediction units to try.
0: 64x64, 1: 32x32, 2: 16x16, 3: 8x8, 4: 4x4
--gop <int> : Length of Group of Pictures, must be 8 or 0 [0]
--gop <int> : Length of Group of Pictures, must be 8 or 0 [0]
--bipred : Enable bi-prediction search
Video Usability Information:
--sar <width:height> : Specify Sample Aspect Ratio

View file

@ -89,6 +89,7 @@ int config_init(config_t *cfg)
cfg->ref_frames = DEFAULT_REF_PIC_COUNT;
cfg->seek = 0;
cfg->gop_len = 0;
cfg->bipred = 0;
cfg->tiles_width_count = 0;
cfg->tiles_height_count = 0;
@ -559,6 +560,8 @@ static int config_parse(config_t *cfg, const char *name, const char *value)
return 0;
}
}
else if OPT("bipred")
cfg->bipred = atobool(value);
else
return 0;
#undef OPT
@ -621,6 +624,7 @@ int config_read(config_t *cfg,int argc, char *argv[])
{ "pu-depth-inter", required_argument, NULL, 0 },
{ "pu-depth-intra", required_argument, NULL, 0 },
{ "gop", required_argument, NULL, 0 },
{ "bipred", no_argument, NULL, 0 },
{0, 0, 0, 0}
};

View file

@ -64,6 +64,7 @@ typedef struct
int32_t tr_depth_intra; /*!< \brief Maximum transform depth for intra. */
int8_t ime_algorithm; /*!< \brief Integer motion estimation algorithm. */
int32_t fme_level; /*!< \brief Fractional pixel motion estimation level (0: disabled, 1: enabled). */
int32_t bipred; /*!< \brief Bi-prediction (0: disabled, 1: enabled). */
int32_t deblock_beta; /*!< \brief (deblocking) beta offset (div 2), range -6...6 */
int32_t deblock_tc; /*!< \brief (deblocking) tc offset (div 2), range -6...6 */
struct

View file

@ -137,6 +137,7 @@ int main(int argc, char *argv[])
" --pu-depth-intra <int>-<int> : Range for sizes of intra prediction units to try.\n"
" 0: 64x64, 1: 32x32, 2: 16x16, 3: 8x8, 4: 4x4\n"
" --gop <int> : Length of Group of Pictures, must be 8 or 0 [0]\n"
" --bipred : Enable bi-prediction search\n"
"\n"
" Video Usability Information:\n"
" --sar <width:height> : Specify Sample Aspect Ratio\n"

View file

@ -1099,7 +1099,7 @@ static int search_cu_inter(const encoder_state_t * const state, int x, int y, in
}
// Search bi-pred positions
if (state->global->slicetype == SLICE_B) {
if (state->global->slicetype == SLICE_B && state->encoder_control->cfg->bipred) {
lcu_t *templcu = MALLOC(lcu_t, 1);
cost_pixel_nxn_func *satd = pixels_get_satd_func(LCU_WIDTH >> depth);
#define NUM_PRIORITY_LIST 12;