Changed scalinglist_process() to be done on frame level

This commit is contained in:
Marko Viitanen 2013-10-28 11:47:54 +02:00
parent 601d64f04f
commit caa010a972

View file

@ -259,6 +259,7 @@ void init_encoder_input(encoder_input *input, FILE *inputfile,
void encode_one_frame(encoder_control* encoder)
{
// output parameters before first frame
if (encoder->frame == 0) {
// Video Parameter Set (VPS)
@ -289,6 +290,7 @@ void encode_one_frame(encoder_control* encoder)
cabac_start(&cabac);
encoder->in.cur_pic->slicetype = SLICE_I;
encoder->in.cur_pic->type = NAL_IDR_W_RADL;
scalinglist_process();
search_slice_data(encoder);
encode_slice_header(encoder);
@ -304,6 +306,7 @@ void encode_one_frame(encoder_control* encoder)
cabac_start(&cabac);
encoder->in.cur_pic->slicetype = SLICE_P;
encoder->in.cur_pic->type = NAL_TRAIL_R;
scalinglist_process();
search_slice_data(encoder);
encode_slice_header(encoder);
@ -1962,8 +1965,6 @@ void encode_block_residual(encoder_control *encoder,
uint8_t border_split_y = ((encoder->in.height) < ((y_ctb + 1) * (LCU_WIDTH >> MAX_DEPTH) + (LCU_WIDTH >> (depth + 1)))) ? 0 : 1;
uint8_t border = border_x | border_y; /*!< are we in any border CU */
scalinglist_process();
// When not in MAX_DEPTH, insert split flag and split the blocks if needed
if (depth != MAX_DEPTH) {
if (split_flag || border) {