Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Issue 2000833003: Don't reset the codec state for a flush; this kills the frames. (Closed)

Created:
4 years, 7 months ago by DaleCurtis
Modified:
4 years, 7 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't reset the codec state for a flush; this kills the frames. Causing a reset after flush completes will invalidate all the vended frames, don't do this. Instead only reset when a reset should actually occur. Instead, since this reset is required on JellyBean devices, we issue the reset upon receipt of the next Decode() call. This allows the more frequent EOS cases to not trash the last frame on these devices will config changes will work as before. A followup CL will move the texture matrix to the shared state so that we don't accidentally apply the wrong matrix after the reset case. BUG=613608 TEST=no more random blue frames. Committed: https://crrev.com/eb4a8d89c1c1c3ed4b74e2afdee7ccd8dd6558bc Cr-Commit-Position: refs/heads/master@{#395995}

Patch Set 1 #

Patch Set 2 : Defer reset. #

Total comments: 5

Patch Set 3 : Fix matrix and flush. #

Total comments: 4

Patch Set 4 : Fix comment. Add dcheck. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -1 line) Patch
M media/gpu/android_video_decode_accelerator.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.cc View 1 2 3 3 chunks +19 lines, -0 lines 0 comments Download
M media/gpu/avda_codec_image.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 29 (9 generated)
DaleCurtis
4 years, 7 months ago (2016-05-20 20:45:11 UTC) #2
watk
Just for the record, this was added for MSE config change EOS's https://codereview.chromium.org/1560983002 I'm not ...
4 years, 7 months ago (2016-05-20 20:56:30 UTC) #4
liberato (no reviews please)
On 2016/05/20 20:56:30, watk wrote: > Just for the record, this was added for MSE ...
4 years, 7 months ago (2016-05-20 21:03:12 UTC) #5
Tima Vaisburd
On 2016/05/20 21:03:12, liberato wrote: > On 2016/05/20 20:56:30, watk wrote: > > Just for ...
4 years, 7 months ago (2016-05-20 22:07:41 UTC) #8
DaleCurtis
Good catch Tima, I had forgotten about that. Instead I've made it such that flush ...
4 years, 7 months ago (2016-05-20 23:12:07 UTC) #10
DaleCurtis
And oh, vended frames refers to the frames output just prior to the drain completing. ...
4 years, 7 months ago (2016-05-20 23:12:48 UTC) #11
chcunningham
> i'm confused now. i remember that we weren't getting resolution changes, but > i ...
4 years, 7 months ago (2016-05-21 00:25:26 UTC) #12
chcunningham
https://codereview.chromium.org/2000833003/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2000833003/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode1193 media/gpu/android_video_decode_accelerator.cc:1193: const bool codec_requires_reset_for_config_changes = It used to be that ...
4 years, 7 months ago (2016-05-21 00:25:33 UTC) #13
chcunningham
Also, Frank/Dale, I'm a bit confused about how the killed frames causes a blue frame? ...
4 years, 7 months ago (2016-05-21 00:30:29 UTC) #14
Tima Vaisburd
On 2016/05/21 00:30:29, chcunningham wrote: > Also, Frank/Dale, I'm a bit confused about how the ...
4 years, 7 months ago (2016-05-21 00:34:15 UTC) #15
Tima Vaisburd
https://codereview.chromium.org/2000833003/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2000833003/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode907 media/gpu/android_video_decode_accelerator.cc:907: ResetCodecState(base::Closure()); Did you mean ConfigureMediaCodecAsynchronously() ? What else from ...
4 years, 7 months ago (2016-05-21 06:40:31 UTC) #16
liberato (no reviews please)
On 2016/05/21 00:30:29, chcunningham wrote: > Also, Frank/Dale, I'm a bit confused about how the ...
4 years, 7 months ago (2016-05-21 07:15:14 UTC) #17
DaleCurtis
The beauty of the web-platform tests effort is you don't need to the layout test ...
4 years, 7 months ago (2016-05-24 00:35:30 UTC) #18
Tima Vaisburd
lgtm with a comment https://codereview.chromium.org/2000833003/diff/40001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2000833003/diff/40001/media/gpu/android_video_decode_accelerator.cc#newcode904 media/gpu/android_video_decode_accelerator.cc:904: // If we previously deferred ...
4 years, 7 months ago (2016-05-24 19:06:26 UTC) #19
liberato (no reviews please)
lgtm. nice. -fl
4 years, 7 months ago (2016-05-24 19:40:31 UTC) #20
watk
https://codereview.chromium.org/2000833003/diff/40001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2000833003/diff/40001/media/gpu/android_video_decode_accelerator.cc#newcode1192 media/gpu/android_video_decode_accelerator.cc:1192: if (drain_type_ == DRAIN_FOR_FLUSH && !did_codec_error_happen) { Can we ...
4 years, 7 months ago (2016-05-24 19:47:26 UTC) #21
DaleCurtis
https://codereview.chromium.org/2000833003/diff/40001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2000833003/diff/40001/media/gpu/android_video_decode_accelerator.cc#newcode904 media/gpu/android_video_decode_accelerator.cc:904: // If we previously deferred a codec restart, take ...
4 years, 7 months ago (2016-05-24 23:53:14 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2000833003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2000833003/80001
4 years, 7 months ago (2016-05-25 20:15:04 UTC) #26
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 7 months ago (2016-05-25 21:52:02 UTC) #27
commit-bot: I haz the power
4 years, 7 months ago (2016-05-25 21:53:19 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/eb4a8d89c1c1c3ed4b74e2afdee7ccd8dd6558bc
Cr-Commit-Position: refs/heads/master@{#395995}

Powered by Google App Engine
This is Rietveld 408576698