|
|
Created:
4 years, 1 month ago by wdzierzanowski Modified:
4 years ago Reviewers:
DaleCurtis CC:
chromium-reviews, feature-media-reviews_chromium.org, posciak+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdjust VideoRendererAlgorithm for |frame_dropping_disabled_|
This makes video frame hashing in tests immune to timing variations that
are inherent in the rendering algorithm.
BUG=663709
TEST=media_unittests pass, new unit test VideoRendererAlgorithmTest.EffectiveFramesQueuedWithoutFrameDropping
Committed: https://crrev.com/e1e43d3da2315557b19009165ea9c8a580d63eda
Cr-Commit-Position: refs/heads/master@{#434350}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Use unrendered frame count as minimum effective frame count #Patch Set 3 : CountEffectiveFramesQueued() can be const #
Total comments: 5
Patch Set 4 : Style fixes, new unit test #
Messages
Total messages: 36 (14 generated)
wdzierzanowski@opera.com changed reviewers: + dalecurtis@chromium.org
Dale, PTAL if this is what you had in mind.
https://codereview.chromium.org/2502093002/diff/1/media/filters/video_rendere... File media/filters/video_renderer_algorithm.cc (right): https://codereview.chromium.org/2502093002/diff/1/media/filters/video_rendere... media/filters/video_renderer_algorithm.cc:682: // If frame dropping is disabled, only count as queued those frames that were This can go below the l.691 block. Also while this works, I think we want this to be a minimum value, and not necessarily the returned value. I.e. it's possible for a frame with a non-zero render count to still be effective. So i'd do something like size_t min_effective_frames = frame_dropping_disabled_ ? <count them> : 0; ... l.706: effective_frames_queued_ = std::max(min_effective_frames, frame_queue_.size() - expired_frames); l.713: effective_frames_queued_ = min_effective_frames; l.728: effective_frames_queued_ = std::max(min_effective_frames, renderable_frame_count)
https://codereview.chromium.org/2502093002/diff/1/media/filters/video_rendere... File media/filters/video_renderer_algorithm.cc (right): https://codereview.chromium.org/2502093002/diff/1/media/filters/video_rendere... media/filters/video_renderer_algorithm.cc:682: // If frame dropping is disabled, only count as queued those frames that were On 2016/11/15 22:42:21, DaleCurtis wrote: > This can go below the l.691 block. Also while this works, I think we want this > to be a minimum value, and not necessarily the returned value. I.e. it's > possible for a frame with a non-zero render count to still be effective. So i'd > do something like > > size_t min_effective_frames = frame_dropping_disabled_ ? <count them> : 0; > > ... > > l.706: effective_frames_queued_ = std::max(min_effective_frames, > frame_queue_.size() - expired_frames); > l.713: effective_frames_queued_ = min_effective_frames; > l.728: effective_frames_queued_ = std::max(min_effective_frames, > renderable_frame_count) Done.
Want to add a small unittest for this too? lgtm https://codereview.chromium.org/2502093002/diff/40001/media/filters/video_ren... File media/filters/video_renderer_algorithm.cc (right): https://codereview.chromium.org/2502093002/diff/40001/media/filters/video_ren... media/filters/video_renderer_algorithm.cc:691: // If frame dropping is disabled, the lower bound is the number of frames Add line between these. https://codereview.chromium.org/2502093002/diff/40001/media/filters/video_ren... media/filters/video_renderer_algorithm.cc:691: // If frame dropping is disabled, the lower bound is the number of frames Add line between these. https://codereview.chromium.org/2502093002/diff/40001/media/filters/video_ren... media/filters/video_renderer_algorithm.cc:700: const size_t frames_queued = CountEffectiveFramesQueued(); Just inline this into the std::max.
On 2016/11/16 22:03:44, DaleCurtis wrote: > Want to add a small unittest for this too? Done. > it's possible for a frame with a non-zero render count to still be effective I'm having trouble exercising this case in the unit test I've added. It seems the non-zero-render-count frames are getting chopped off in https://cs.chromium.org/chromium/src/media/filters/video_renderer_algorithm.c.... Any advice on how to test it?
https://codereview.chromium.org/2502093002/diff/40001/media/filters/video_ren... File media/filters/video_renderer_algorithm.cc (right): https://codereview.chromium.org/2502093002/diff/40001/media/filters/video_ren... media/filters/video_renderer_algorithm.cc:691: // If frame dropping is disabled, the lower bound is the number of frames On 2016/11/16 22:03:44, DaleCurtis wrote: > Add line between these. Done. https://codereview.chromium.org/2502093002/diff/40001/media/filters/video_ren... media/filters/video_renderer_algorithm.cc:700: const size_t frames_queued = CountEffectiveFramesQueued(); On 2016/11/16 22:03:44, DaleCurtis wrote: > Just inline this into the std::max. Done.
On 2016/11/23 at 09:53:52, wdzierzanowski wrote: > On 2016/11/16 22:03:44, DaleCurtis wrote: > > Want to add a small unittest for this too? > > Done. > > > it's possible for a frame with a non-zero render count to still be effective > > I'm having trouble exercising this case in the unit test I've added. It seems the non-zero-render-count frames are getting chopped off in https://cs.chromium.org/chromium/src/media/filters/video_renderer_algorithm.c.... Any advice on how to test it? You need to test something that has a cadence of 2 or higher, so that each frame needs > 1 render count for optimal rendering. This lgtm though.
Description was changed from ========== Adjust VideoRendererAlgorithm for |frame_dropping_disabled_| This makes video frame hashing in tests immune to timing variations that are inherent in the rendering algorithm. BUG=663709 TEST=media_unittests pass ========== to ========== Adjust VideoRendererAlgorithm for |frame_dropping_disabled_| This makes video frame hashing in tests immune to timing variations that are inherent in the rendering algorithm. BUG=663709 TEST=media_unittests pass, new unit test VideoRendererAlgorithmTest.EffectiveFramesQueuedWithoutFrameDropping ==========
Alright, I'll leave it as it is then. Thanks for the hints and for reviewing!
The CQ bit was checked by wdzierzanowski@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The failure in "webgl_conformance_tests on NVIDIA GPU on Linux" seems unrelated. Retrying.
The CQ bit was checked by wdzierzanowski@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
JOB_TIMED_OUT? Trying once more.
The CQ bit was checked by wdzierzanowski@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by wdzierzanowski@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Turns out some CQ builders are having issues, https://groups.google.com/a/chromium.org/d/topic/chromium-dev/LjiTwXkVrUU/dis...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by wdzierzanowski@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1480001272922320, "parent_rev": "652dc90d0fa7b7b6f6b99613b47ed8fd64636041", "commit_rev": "dc0575e6a0ddae03408a3f2266bbe11a61ccd702"}
Message was sent while issue was closed.
Description was changed from ========== Adjust VideoRendererAlgorithm for |frame_dropping_disabled_| This makes video frame hashing in tests immune to timing variations that are inherent in the rendering algorithm. BUG=663709 TEST=media_unittests pass, new unit test VideoRendererAlgorithmTest.EffectiveFramesQueuedWithoutFrameDropping ========== to ========== Adjust VideoRendererAlgorithm for |frame_dropping_disabled_| This makes video frame hashing in tests immune to timing variations that are inherent in the rendering algorithm. BUG=663709 TEST=media_unittests pass, new unit test VideoRendererAlgorithmTest.EffectiveFramesQueuedWithoutFrameDropping ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Adjust VideoRendererAlgorithm for |frame_dropping_disabled_| This makes video frame hashing in tests immune to timing variations that are inherent in the rendering algorithm. BUG=663709 TEST=media_unittests pass, new unit test VideoRendererAlgorithmTest.EffectiveFramesQueuedWithoutFrameDropping ========== to ========== Adjust VideoRendererAlgorithm for |frame_dropping_disabled_| This makes video frame hashing in tests immune to timing variations that are inherent in the rendering algorithm. BUG=663709 TEST=media_unittests pass, new unit test VideoRendererAlgorithmTest.EffectiveFramesQueuedWithoutFrameDropping Committed: https://crrev.com/e1e43d3da2315557b19009165ea9c8a580d63eda Cr-Commit-Position: refs/heads/master@{#434350} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/e1e43d3da2315557b19009165ea9c8a580d63eda Cr-Commit-Position: refs/heads/master@{#434350} |