diff --git a/mythtv/libs/libmythtv/mpeg/H264Parser.cpp b/mythtv/libs/libmythtv/mpeg/H264Parser.cpp
index ac805e7..d933858 100644
a
|
b
|
bool H264Parser::new_AU(void) |
183 | 183 | one or more of the following ways. |
184 | 184 | |
185 | 185 | - frame_num differs in value. The value of frame_num used to |
186 | | test this condition is the value of frame_num that appears in |
187 | | the syntax of the slice header, regardless of whether that value |
188 | | is inferred to have been equal to 0 for subsequent use in the |
189 | | decoding process due to the presence of |
190 | | memory_management_control_operation equal to 5. |
| 186 | test this condition is the value of frame_num that appears in |
| 187 | the syntax of the slice header, regardless of whether that value |
| 188 | is inferred to have been equal to 0 for subsequent use in the |
| 189 | decoding process due to the presence of |
| 190 | memory_management_control_operation equal to 5. |
191 | 191 | Note: If the current picture is an IDR picture FrameNum and |
192 | 192 | PrevRefFrameNum are set equal to 0. |
193 | 193 | - pic_parameter_set_id differs in value. |
194 | 194 | - field_pic_flag differs in value. |
195 | 195 | - bottom_field_flag is present in both and differs in value. |
196 | | - nal_ref_idc differs in value with one of the nal_ref_idc values |
197 | | being equal to 0. |
| 196 | - nal_ref_idc differs in value with one of the nal_ref_idc |
| 197 | values being equal to 0. |
198 | 198 | - pic_order_cnt_type is equal to 0 for both and either |
199 | | pic_order_cnt_lsb differs in value, or delta_pic_order_cnt_bottom |
200 | | differs in value. |
| 199 | pic_order_cnt_lsb differs in value, or delta_pic_order_cnt_bottom |
| 200 | differs in value. |
201 | 201 | - pic_order_cnt_type is equal to 1 for both and either |
202 | | delta_pic_order_cnt[0] differs in value, or |
203 | | delta_pic_order_cnt[1] differs in value. |
| 202 | delta_pic_order_cnt[0] differs in value, or |
| 203 | delta_pic_order_cnt[1] differs in value. |
204 | 204 | - nal_unit_type differs in value with one of the nal_unit_type values |
205 | | being equal to 5. |
| 205 | being equal to 5. |
206 | 206 | - nal_unit_type is equal to 5 for both and idr_pic_id differs in |
207 | | value. |
| 207 | value. |
208 | 208 | |
209 | 209 | NOTE â Some of the VCL NAL units in redundant coded pictures or some |
210 | 210 | non-VCL NAL units (e.g. an access unit delimiter NAL unit) may also |
… |
… |
bool H264Parser::new_AU(void) |
230 | 230 | else if ((bottom_field_flag != -1 && prev_bottom_field_flag != -1) && |
231 | 231 | bottom_field_flag != prev_bottom_field_flag) |
232 | 232 | result = true; |
| 233 | else if ((nal_ref_idc == 0 || prev_nal_ref_idc == 0) && |
| 234 | nal_ref_idc != prev_nal_ref_idc) |
| 235 | result = true; |
233 | 236 | else if ((pic_order_cnt_type == 0 && prev_pic_order_cnt_type == 0) && |
234 | 237 | (pic_order_cnt_lsb != prev_pic_order_cnt_lsb || |
235 | 238 | delta_pic_order_cnt_bottom != |
… |
… |
bool H264Parser::new_AU(void) |
253 | 256 | prev_pic_parameter_set_id = pic_parameter_set_id; |
254 | 257 | prev_field_pic_flag = field_pic_flag; |
255 | 258 | prev_bottom_field_flag = bottom_field_flag; |
| 259 | prev_nal_ref_idc = nal_ref_idc; |
256 | 260 | prev_pic_order_cnt_lsb = pic_order_cnt_lsb; |
257 | 261 | prev_delta_pic_order_cnt_bottom = delta_pic_order_cnt_bottom; |
258 | 262 | prev_delta_pic_order_cnt[0] = delta_pic_order_cnt[0]; |
… |
… |
uint32_t H264Parser::addBytes(const uint8_t *bytes, |
348 | 352 | AU_pending = true; |
349 | 353 | AU_offset = stream_offset; |
350 | 354 | } |
351 | | else if ((nal_ref_idc == 0 || prev_nal_ref_idc == 0) && |
352 | | nal_ref_idc != prev_nal_ref_idc) |
353 | | { |
354 | | AU_pending = true; |
355 | | AU_offset = stream_offset; |
356 | | } |
357 | 355 | } |
358 | 356 | |
359 | 357 | if (AU_pending && NALisSlice(nal_unit_type)) |
… |
… |
uint32_t H264Parser::addBytes(const uint8_t *bytes, |
378 | 376 | else |
379 | 377 | on_frame = on_key_frame = false; |
380 | 378 | |
381 | | prev_nal_ref_idc = nal_ref_idc; |
382 | | |
383 | 379 | return byteP - bytes; |
384 | 380 | } |
385 | 381 | } |
… |
… |
void H264Parser::vui_parameters(GetBitContext * gb) |
1015 | 1011 | |
1016 | 1012 | uint H264Parser::frameRate(void) const |
1017 | 1013 | { |
1018 | | uint64_t num; |
| 1014 | uint64_t num; |
1019 | 1015 | uint64_t fps; |
1020 | 1016 | |
1021 | 1017 | num = 500 * (uint64_t)timeScale; /* 1000 * 0.5 */ |