diff options
author | rockot <rockot@chromium.org> | 2015-01-14 14:40:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-14 22:41:16 +0000 |
commit | e69d5cb6c3076d61c4f86677987cca579c968af4 (patch) | |
tree | a5fbe73b498fae4d53f896c1c006a01b61794338 /media | |
parent | 91a784780c821a67aba26901bbb38e0d8c422556 (diff) | |
download | chromium_src-e69d5cb6c3076d61c4f86677987cca579c968af4.zip chromium_src-e69d5cb6c3076d61c4f86677987cca579c968af4.tar.gz chromium_src-e69d5cb6c3076d61c4f86677987cca579c968af4.tar.bz2 |
Revert of Add accelerated video decoder interface, VP8 and H.264 implementations and hook up to V4L2SVDA (patchset #1 id:20001 of https://codereview.chromium.org/813693006/)
Reason for revert:
This is breaking arm builds. See for example:
https://build.chromium.org/p/chromiumos.chromium/builders/Daisy%20%28chromium%29/builds/4129/steps/cbuildbot/logs/stdio
Original issue's description:
> Reland: Add accelerated video decoder interface, VP8 and H.264 implementations and hook up to V4L2SVDA.
>
> This is a reland as the previous CL has an issue with BUILD.gn and failed gn build.
>
> An AcceleratedVideoDecoder is a video decoder that requires support from an
> external accelerator (typically a hardware accelerator) to partially
> offload the decode process after parsing stream headers, and performing
> reference frame and state management.
>
> In this design, the hardware-independent decoder implementation interfaces
> with a HW-specific Accelerator to offload last stages of the decode process.
>
> Add the interface for AcceleratedVideoDecoder, decoders for VP8 and H264,
> V4L2-specific Accelerators for VP8 and H264 and a common accelerator/client
> class for V4L2.
>
> TEST=vdatest VP8/H264, mp4 local video playback, apprtc decode
> BUG=chrome-os-partner:33728
> TBR=wuchengli@chromium.org,kcwu@chromium.org,owenlin@chromium.org,xhwang@chromium.org,scherkus@chromium.org,dalecurtis@chromium.org
>
> Committed: https://crrev.com/3c09b9b26ee6fc8b43c7535070cfa08aba1285cf
> Cr-Commit-Position: refs/heads/master@{#311464}
TBR=wuchengli@chromium.org,kcwu@chromium.org,owenlin@chromium.org,xhwang@chromium.org,scherkus@chromium.org,dalecurtis@chromium.org,posciak@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=chrome-os-partner:33728
Review URL: https://codereview.chromium.org/852103002
Cr-Commit-Position: refs/heads/master@{#311561}
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. |