Skip to content

Commit

Permalink
Removing some compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arild Fuldseth authored and Thomas Davies committed Mar 21, 2016
1 parent bdb7e46 commit 6d46917
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
22 changes: 0 additions & 22 deletions dec/decode_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ void decode_block(decoder_info_t *decoder_info,int size,int ypos,int xpos){
int sizeC = size/2;

block_mode_t mode;
mv_t mv;
intra_mode_t intra_mode;

frame_type_t frame_type = decoder_info->frame_info.frame_type;
Expand All @@ -196,20 +195,12 @@ void decode_block(decoder_info_t *decoder_info,int size,int ypos,int xpos){
yuv_frame_t *rec = decoder_info->rec;
yuv_frame_t *ref = decoder_info->ref[0];

/* Calculate position in padded reference frame */
int ref_posY = yposY*ref->stride_y+xposY;
int ref_posC = yposC*ref->stride_c+xposC;

/* Pointers to current position in reconstructed frame*/
uint8_t *rec_y = &rec->y[yposY*rec->stride_y+xposY];
uint8_t *rec_u = &rec->u[yposC*rec->stride_c+xposC];
uint8_t *rec_v = &rec->v[yposC*rec->stride_c+xposC];

/* Pointers to colocated block position in reference frame */
uint8_t *ref_y = ref->y + ref_posY;
uint8_t *ref_u = ref->u + ref_posC;
uint8_t *ref_v = ref->v + ref_posC;

stream_t *stream = decoder_info->stream;

/* Read data from bitstream */
Expand Down Expand Up @@ -272,7 +263,6 @@ void decode_block(decoder_info_t *decoder_info,int size,int ypos,int xpos){
thor_free(pblock1_v);
}
else{
mv = block_info.block_param.mv_arr0[0];
int ref_idx = block_info.block_param.ref_idx0; //TODO: Move to top
int r = decoder_info->frame_info.ref_array[ref_idx];
ref = r>=0 ? decoder_info->ref[r] : decoder_info->interp_frames[0];
Expand Down Expand Up @@ -321,7 +311,6 @@ void decode_block(decoder_info_t *decoder_info,int size,int ypos,int xpos){
thor_free(pblock1_v);
}
else{
mv = block_info.block_param.mv_arr0[0];
int ref_idx = block_info.block_param.ref_idx0; //TODO: Move to top
int r = decoder_info->frame_info.ref_array[ref_idx];
ref = r>=0 ? decoder_info->ref[r] : decoder_info->interp_frames[0];
Expand All @@ -330,24 +319,13 @@ void decode_block(decoder_info_t *decoder_info,int size,int ypos,int xpos){
}
}
else if (mode == MODE_INTER){
int div = decoder_info->tb_split_enable+1; //TODO: pb_split_enable
int psizeY = sizeY/div;
int psizeC = sizeC/div;
int pstrideY = sizeY;
int pstrideC = sizeC;
int ref_idx = block_info.block_param.ref_idx0;
int r = decoder_info->frame_info.ref_array[ref_idx];
ref = r>=0 ? decoder_info->ref[r] : decoder_info->interp_frames[0];
int sign = ref->frame_num > rec->frame_num;
ref_y = ref->y + ref_posY;
ref_u = ref->u + ref_posC;
ref_v = ref->v + ref_posC;
get_inter_prediction_yuv(ref, pblock_y, pblock_u, pblock_v, &block_info.block_pos, block_info.block_param.mv_arr0, sign, width, height, bipred, decoder_info->pb_split);
}
else if (mode == MODE_BIPRED){
int div = decoder_info->tb_split_enable+1;
int pstrideY = sizeY;
int pstrideC = sizeC;

uint8_t *pblock0_y = thor_alloc(MAX_SB_SIZE*MAX_SB_SIZE, 16);
uint8_t *pblock0_u = thor_alloc(MAX_SB_SIZE*MAX_SB_SIZE, 16);
Expand Down
14 changes: 0 additions & 14 deletions enc/encode_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -2303,13 +2303,6 @@ int check_early_skip_block(encoder_info_t *encoder_info,block_info_t *block_info
int sign0 = ref0->frame_num >= encoder_info->frame_info.frame_num;
int sign1 = ref1->frame_num >= encoder_info->frame_info.frame_num;

block_info_t tmp_block_info;
tmp_block_info.block_pos.bheight = size0;
tmp_block_info.block_pos.bwidth = size0;
tmp_block_info.block_pos.ypos = ypos + i;
tmp_block_info.block_pos.xpos = xpos + j;
tmp_block_info.block_pos.size = size0;

block_pos_t tmp_block_pos;
tmp_block_pos.bheight = size0;
tmp_block_pos.bwidth = size0;
Expand Down Expand Up @@ -2345,13 +2338,6 @@ int check_early_skip_block(encoder_info_t *encoder_info,block_info_t *block_info
int block_offset_y = size*i + j;
int block_offset_c = (size / 2)*(i / 2) + j / 2;

block_info_t tmp_block_info;
tmp_block_info.block_pos.bheight = size0;
tmp_block_info.block_pos.bwidth = size0;
tmp_block_info.block_pos.ypos = ypos + i;
tmp_block_info.block_pos.xpos = xpos + j;
tmp_block_info.block_pos.size = size0;

block_pos_t tmp_block_pos;
tmp_block_pos.bheight = size0;
tmp_block_pos.bwidth = size0;
Expand Down

0 comments on commit 6d46917

Please sign in to comment.