Skip to content

Commit

Permalink
Make the PAFF detection more robust (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
Asd-g committed Feb 8, 2025
1 parent fa6f983 commit b0907c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
11 changes: 10 additions & 1 deletion common/lwindex.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,16 @@ static void create_video_frame_order_list
int enable_repeat = 0;
int complete_frame = 1;
int repeat_field = 1;
int consistent_filed_order = 1;
lw_field_info_t next_field_info = info[1].field_info;
for (uint32_t i = 2; i <= frame_count; ++i)
{
if (info[i].field_info != next_field_info)
{
consistent_filed_order = 0;
break;
}
}
for( uint32_t i = 1; i <= frame_count; i++, order_count++ )
{
int repeat_pict = info[i].repeat_pict;
Expand Down Expand Up @@ -1033,7 +1042,7 @@ static void create_video_frame_order_list
default :
break;
}
if( repeat_pict == 0 && !(info[i].flags & (LW_VFRAME_FLAG_CORRUPT | LW_VFRAME_FLAG_COUNTERPART_MISSING)) )
if( consistent_filed_order == 0 && repeat_pict == 0 && !(info[i].flags & (LW_VFRAME_FLAG_CORRUPT | LW_VFRAME_FLAG_COUNTERPART_MISSING)) )
{
/* PAFF field coded picture */
complete_frame ^= 1;
Expand Down
15 changes: 0 additions & 15 deletions vcxcompat.props

This file was deleted.

0 comments on commit b0907c0

Please sign in to comment.