Commit 2ba8aafb authored by michael's avatar michael

Use ref_poc and ref_count from the correct field.

Fixes at least
MR8_BT_B.h264


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14537 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3b8963e4
...@@ -901,6 +901,7 @@ static inline void direct_ref_list_init(H264Context * const h){ ...@@ -901,6 +901,7 @@ static inline void direct_ref_list_init(H264Context * const h){
Picture * const cur = s->current_picture_ptr; Picture * const cur = s->current_picture_ptr;
int list, i, j; int list, i, j;
int sidx= s->picture_structure&1; int sidx= s->picture_structure&1;
int ref1sidx= ref1->reference&1;
if(cur->pict_type == FF_I_TYPE) if(cur->pict_type == FF_I_TYPE)
cur->ref_count[sidx][0] = 0; cur->ref_count[sidx][0] = 0;
if(cur->pict_type != FF_B_TYPE) if(cur->pict_type != FF_B_TYPE)
...@@ -913,8 +914,8 @@ static inline void direct_ref_list_init(H264Context * const h){ ...@@ -913,8 +914,8 @@ static inline void direct_ref_list_init(H264Context * const h){
if(cur->pict_type != FF_B_TYPE || h->direct_spatial_mv_pred) if(cur->pict_type != FF_B_TYPE || h->direct_spatial_mv_pred)
return; return;
for(list=0; list<2; list++){ for(list=0; list<2; list++){
for(i=0; i<ref1->ref_count[sidx][list]; i++){ for(i=0; i<ref1->ref_count[ref1sidx][list]; i++){
const int poc = ref1->ref_poc[sidx][list][i]; const int poc = ref1->ref_poc[ref1sidx][list][i];
h->map_col_to_list0[list][i] = 0; /* bogus; fills in for missing frames */ h->map_col_to_list0[list][i] = 0; /* bogus; fills in for missing frames */
for(j=0; j<h->ref_count[list]; j++) for(j=0; j<h->ref_count[list]; j++)
if(h->ref_list[list][j].poc == poc){ if(h->ref_list[list][j].poc == poc){
...@@ -925,7 +926,7 @@ static inline void direct_ref_list_init(H264Context * const h){ ...@@ -925,7 +926,7 @@ static inline void direct_ref_list_init(H264Context * const h){
} }
if(FRAME_MBAFF){ if(FRAME_MBAFF){
for(list=0; list<2; list++){ for(list=0; list<2; list++){
for(i=0; i<ref1->ref_count[sidx][list]; i++){ for(i=0; i<ref1->ref_count[ref1sidx][list]; i++){
j = h->map_col_to_list0[list][i]; j = h->map_col_to_list0[list][i];
h->map_col_to_list0_field[list][2*i] = 2*j; h->map_col_to_list0_field[list][2*i] = 2*j;
h->map_col_to_list0_field[list][2*i+1] = 2*j+1; h->map_col_to_list0_field[list][2*i+1] = 2*j+1;
......
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