diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/h264_parser.cc | 11 | ||||
-rw-r--r-- | media/filters/h264_parser.h | 8 | ||||
-rw-r--r-- | media/filters/vp8_parser.h | 8 | ||||
-rw-r--r-- | media/video/h264_poc.cc | 5 |
4 files changed, 10 insertions, 22 deletions
diff --git a/media/filters/h264_parser.cc b/media/filters/h264_parser.cc index 22d420b..1dd4a25 100644 --- a/media/filters/h264_parser.cc +++ b/media/filters/h264_parser.cc @@ -1085,8 +1085,6 @@ H264Parser::Result H264Parser::ParsePredWeightTable(const H264SPS& sps, } H264Parser::Result H264Parser::ParseDecRefPicMarking(H264SliceHeader* shdr) { - size_t bits_left_at_start = br_.NumBitsLeft(); - if (shdr->idr_pic_flag) { READ_BOOL_OR_RETURN(&shdr->no_output_of_prior_pics_flag); READ_BOOL_OR_RETURN(&shdr->long_term_reference_flag); @@ -1128,7 +1126,6 @@ H264Parser::Result H264Parser::ParseDecRefPicMarking(H264SliceHeader* shdr) { } } - shdr->dec_ref_pic_marking_bit_size = bits_left_at_start - br_.NumBitsLeft(); return kOk; } @@ -1175,7 +1172,6 @@ H264Parser::Result H264Parser::ParseSliceHeader(const H264NALU& nalu, if (shdr->idr_pic_flag) READ_UE_OR_RETURN(&shdr->idr_pic_id); - size_t bits_left_at_pic_order_cnt_start = br_.NumBitsLeft(); if (sps->pic_order_cnt_type == 0) { READ_BITS_OR_RETURN(sps->log2_max_pic_order_cnt_lsb_minus4 + 4, &shdr->pic_order_cnt_lsb); @@ -1185,15 +1181,12 @@ H264Parser::Result H264Parser::ParseSliceHeader(const H264NALU& nalu, } if (sps->pic_order_cnt_type == 1 && !sps->delta_pic_order_always_zero_flag) { - READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt0); + READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt[0]); if (pps->bottom_field_pic_order_in_frame_present_flag && !shdr->field_pic_flag) - READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt1); + READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt[1]); } - shdr->pic_order_cnt_bit_size = - bits_left_at_pic_order_cnt_start - br_.NumBitsLeft(); - if (pps->redundant_pic_cnt_present_flag) { READ_UE_OR_RETURN(&shdr->redundant_pic_cnt); TRUE_OR_RETURN(shdr->redundant_pic_cnt < 128); diff --git a/media/filters/h264_parser.h b/media/filters/h264_parser.h index b8dde50..e248db7 100644 --- a/media/filters/h264_parser.h +++ b/media/filters/h264_parser.h @@ -249,8 +249,7 @@ struct MEDIA_EXPORT H264SliceHeader { int idr_pic_id; int pic_order_cnt_lsb; int delta_pic_order_cnt_bottom; - int delta_pic_order_cnt0; - int delta_pic_order_cnt1; + int delta_pic_order_cnt[2]; int redundant_pic_cnt; bool direct_spatial_mv_pred_flag; @@ -286,11 +285,6 @@ struct MEDIA_EXPORT H264SliceHeader { int disable_deblocking_filter_idc; int slice_alpha_c0_offset_div2; int slice_beta_offset_div2; - - // Calculated. - // Size in bits of dec_ref_pic_marking() syntax element. - size_t dec_ref_pic_marking_bit_size; - size_t pic_order_cnt_bit_size; }; struct H264SEIRecoveryPoint { diff --git a/media/filters/vp8_parser.h b/media/filters/vp8_parser.h index c7fe620..6f85be9 100644 --- a/media/filters/vp8_parser.h +++ b/media/filters/vp8_parser.h @@ -92,13 +92,13 @@ struct MEDIA_EXPORT Vp8FrameHeader { bool IsKeyframe() const { return key_frame == KEYFRAME; } enum GoldenRefreshMode { - COPY_LAST_TO_GOLDEN = 1, - COPY_ALT_TO_GOLDEN = 2, + kCopyLastToGolden = 1, + kCopyAltToGolden = 2, }; enum AltRefreshMode { - COPY_LAST_TO_ALT = 1, - COPY_GOLDEN_TO_ALT = 2, + kCopyLastToAlt = 1, + kCopyGoldenToAlt = 2, }; FrameType key_frame; diff --git a/media/video/h264_poc.cc b/media/video/h264_poc.cc index d414b1d..5d2892a 100644 --- a/media/video/h264_poc.cc +++ b/media/video/h264_poc.cc @@ -172,9 +172,10 @@ bool H264POC::ComputePicOrderCnt( // 8-10. Derive |top_field_order_cnt| and |bottom_field_order_cnt| // (assuming no interlacing). - int32_t top_foc = expected_pic_order_cnt + slice_hdr.delta_pic_order_cnt0; + int32_t top_foc = expected_pic_order_cnt + + slice_hdr.delta_pic_order_cnt[0]; int32_t bottom_foc = top_foc + sps->offset_for_top_to_bottom_field + - slice_hdr.delta_pic_order_cnt1; + slice_hdr.delta_pic_order_cnt[1]; *pic_order_cnt = std::min(top_foc, bottom_foc); // Store state. |