kopia lustrzana https://github.com/F5OEO/tstools
Bug# 14594
h.264 RAP as I or I + recovery_point SEI Two changes done: 1) esdots computes the duration of GOPs, even in the h.264 case. The change made is to consider an I frame without recovery_point SEI as beginning of a new GOP. This can be changed just setting rec_point_required = TRUE in esdots.c. In this case a new GOP is started when we found I + recovery point SEI 2) nalunit has been modified so it's able to output the information about error recovery point SEI message. Just use 'esreport -x' and SEI recovery point messages will be reported with the same syntax as all the others. e.g. 83644584/0036: NAL unit 0/6 (SEI) 6: 06 06 01 a4 80 00 @@ Recovery Point SEI recovery_frame_cnt 0 exact_match_flag 0 broken_link_flag 1 changing_slice_group_idc 0 --HG-- extra : convert_revision : svn%3Aeff31bef-be4a-0410-a8fe-e47997df2690/trunk%4074issue20
rodzic
7dc61bf1f9
commit
8cae2ae5e9
2
esdots.c
2
esdots.c
|
@ -314,7 +314,7 @@ static char choose_nal_type(access_unit_p access_unit, int *gop_start_found)
|
|||
int ii;
|
||||
int gop_start = FALSE;
|
||||
nal_unit_p temp_nal_unit;
|
||||
int rec_point_required = TRUE;
|
||||
int rec_point_required = FALSE;
|
||||
// FALSE: a random access point is identified as an I frame,
|
||||
// TRUE: a random access point is identified as an I frame + recovery_point SEI.
|
||||
// The value recovery_frame_cnt is never considered (as if it was 0).
|
||||
|
|
28
nalunit.c
28
nalunit.c
|
@ -860,8 +860,16 @@ static int read_SEI_recovery_point(nal_unit_p nal,
|
|||
|
||||
err = read_bits(bd,2,&data->changing_slice_group_idc);
|
||||
CHECK("changing_slice_group_idc");
|
||||
|
||||
|
||||
nal->decoded = TRUE;
|
||||
|
||||
if (show_nal_details)
|
||||
{
|
||||
printf("@@ Recovery Point SEI\n");
|
||||
printf(" recovery_frame_cnt %d\n exact_match_flag %d\n", data->recovery_frame_cnt, data->exact_match_flag);
|
||||
printf(" broken_link_flag %d\n changing_slice_group_idc %d", data->broken_link_flag, data->changing_slice_group_idc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -918,7 +926,8 @@ static int read_SEI(nal_unit_p nal,
|
|||
nal->u.sei_recovery.payloadSize = SEI_payloadSize;
|
||||
|
||||
if (SEI_payloadType == 6) // SEI recovery_point
|
||||
err = read_SEI_recovery_point(nal, SEI_payloadSize, show_nal_details);
|
||||
err = read_SEI_recovery_point(nal, SEI_payloadSize, show_nal_details);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -993,19 +1002,6 @@ static int read_rbsp_data(nal_unit_p nal,
|
|||
}
|
||||
return err;
|
||||
}
|
||||
/*
|
||||
* Is this NAL a SEI unit containing a recovery point message?
|
||||
*
|
||||
* Returns true if it's true :)
|
||||
*/
|
||||
extern int nal_is_SEI_recovery_point(nal_unit_p nal)
|
||||
{
|
||||
if (nal->nal_unit_type == 6)
|
||||
return (nal->u.sei_recovery.payloadType == 6);
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Is this NAL unit a slice?
|
||||
|
@ -1382,7 +1378,7 @@ extern int setup_NAL_data(int verbose,
|
|||
nal->unit.start_posn.infile,
|
||||
nal->unit.start_posn.inpacket,
|
||||
nal->nal_ref_idc,nal->nal_unit_type,what);
|
||||
|
||||
|
||||
// Show the start of the data bytes. This is a tailored form of what
|
||||
// `print_data` would do, more suited to our purposes here (i.e.,
|
||||
// wanting multiple rows of output to line up neatly in columns).
|
||||
|
|
Ładowanie…
Reference in New Issue