|
|
@ -2174,9 +2174,10 @@ static void implicit_weight_table(H264Context *h, int field){ |
|
|
|
for(ref0=ref_start; ref0 < ref_count0; ref0++){ |
|
|
|
for(ref0=ref_start; ref0 < ref_count0; ref0++){ |
|
|
|
int poc0 = h->ref_list[0][ref0].poc; |
|
|
|
int poc0 = h->ref_list[0][ref0].poc; |
|
|
|
for(ref1=ref_start; ref1 < ref_count1; ref1++){ |
|
|
|
for(ref1=ref_start; ref1 < ref_count1; ref1++){ |
|
|
|
|
|
|
|
int w= 32; |
|
|
|
|
|
|
|
if (!h->ref_list[0][ref0].long_ref && !h->ref_list[1][ref1].long_ref){ |
|
|
|
int poc1 = h->ref_list[1][ref1].poc; |
|
|
|
int poc1 = h->ref_list[1][ref1].poc; |
|
|
|
int td = av_clip(poc1 - poc0, -128, 127); |
|
|
|
int td = av_clip(poc1 - poc0, -128, 127); |
|
|
|
int w= 32; |
|
|
|
|
|
|
|
if(td){ |
|
|
|
if(td){ |
|
|
|
int tb = av_clip(cur_poc - poc0, -128, 127); |
|
|
|
int tb = av_clip(cur_poc - poc0, -128, 127); |
|
|
|
int tx = (16384 + (FFABS(td) >> 1)) / td; |
|
|
|
int tx = (16384 + (FFABS(td) >> 1)) / td; |
|
|
@ -2184,6 +2185,7 @@ static void implicit_weight_table(H264Context *h, int field){ |
|
|
|
if(dist_scale_factor >= -64 && dist_scale_factor <= 128) |
|
|
|
if(dist_scale_factor >= -64 && dist_scale_factor <= 128) |
|
|
|
w = 64 - dist_scale_factor; |
|
|
|
w = 64 - dist_scale_factor; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if(field<0){ |
|
|
|
if(field<0){ |
|
|
|
h->implicit_weight[ref0][ref1][0]= |
|
|
|
h->implicit_weight[ref0][ref1][0]= |
|
|
|
h->implicit_weight[ref0][ref1][1]= w; |
|
|
|
h->implicit_weight[ref0][ref1][1]= w; |
|
|
|