Commit 8ac0d95b authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  h264: avoid pointless copying of ref lists
  lavr: always reset mix function names and pointers in mix_function_init()
  lavr: call mix_function_init() in ff_audio_mix_set_matrix()
  fate: update ref after rv30_loop_filter fix
  rv30: fix masking in rv30_loop_filter()

Conflicts:
	tests/ref/fate/filter-delogo
	tests/ref/fate/rv30
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 17596198 940b8b58
......@@ -1301,7 +1301,7 @@ static int decode_update_thread_context(AVCodecContext *dst,
// reference lists
copy_fields(h, h1, ref_count, list_count);
copy_fields(h, h1, ref_list, intra_gb);
copy_fields(h, h1, ref2frm, intra_gb);
copy_fields(h, h1, short_ref, cabac_init_idc);
copy_picture_range(h->short_ref, h1->short_ref, 32, s, s1);
......@@ -2400,7 +2400,6 @@ static int clone_slice(H264Context *dst, H264Context *src)
memcpy(dst->short_ref, src->short_ref, sizeof(dst->short_ref));
memcpy(dst->long_ref, src->long_ref, sizeof(dst->long_ref));
memcpy(dst->default_ref_list, src->default_ref_list, sizeof(dst->default_ref_list));
memcpy(dst->ref_list, src->ref_list, sizeof(dst->ref_list));
memcpy(dst->dequant4_coeff, src->dequant4_coeff, sizeof(src->dequant4_coeff));
memcpy(dst->dequant8_coeff, src->dequant8_coeff, sizeof(src->dequant8_coeff));
......
......@@ -485,9 +485,9 @@ typedef struct H264Context {
int redundant_pic_count;
Picture default_ref_list[2][32]; ///< base reference list for all slices of a coded picture
Picture *short_ref[32];
Picture *long_ref[32];
Picture default_ref_list[2][32]; ///< base reference list for all slices of a coded picture
Picture *delayed_pic[MAX_DELAYED_PIC_COUNT + 2]; // FIXME size?
int last_pocs[MAX_DELAYED_PIC_COUNT];
Picture *next_output_pic;
......
......@@ -187,7 +187,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row)
for(i = !mb_x; i < 2; i++, C += 4){
int ij = i + (j >> 1);
loc_lim = 0;
if(cur_cbp && (1 << ij))
if (cur_cbp & (1 << ij))
loc_lim = cur_lim;
else if(!i && left_cbp & (1 << (ij + 1)))
loc_lim = left_lim;
......@@ -229,7 +229,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row)
for(i = 0; i < 2; i++, C += 4){
int ij = i + (j >> 1);
loc_lim = 0;
if(r->cbp_chroma[mb_pos] && (1 << ij))
if (r->cbp_chroma[mb_pos] & (1 << ij))
loc_lim = cur_lim;
else if(!j && top_cbp & (1 << (ij + 2)))
loc_lim = top_lim;
......
......@@ -284,11 +284,12 @@ static void mix_2_to_6_fltp_flt_c(float **samples, float **matrix, int len,
static int mix_function_init(AudioMix *am)
{
am->func_descr = am->func_descr_generic = "n/a";
am->mix = am->mix_generic = NULL;
/* no need to set a mix function when we're skipping mixing */
if (!am->in_matrix_channels || !am->out_matrix_channels) {
am->func_descr = "n/a";
if (!am->in_matrix_channels || !am->out_matrix_channels)
return 0;
}
/* any-to-any C versions */
......@@ -422,10 +423,6 @@ AudioMix *ff_audio_mix_alloc(AVAudioResampleContext *avr)
av_free(matrix_dbl);
}
ret = mix_function_init(am);
if (ret < 0)
goto error;
return am;
error:
......@@ -704,5 +701,5 @@ int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
return AVERROR(EINVAL);
}
return 0;
return mix_function_init(am);
}
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment