New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 597681 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Unified Media Pipeline - Video is drawn upside down on canvas

Reported by to...@interlude.fm, Mar 24 2016

Issue description

Example URL:
https://s3.amazonaws.com/storage2.interlude.fm/dev_temp/tomer/chrome_ump_canvas_bug/index.html

Steps to reproduce the problem:
1. Go to provided URL on Android Chrome Dev (with unified media pipeline enabled)
2. Play the video

What is the expected behavior?
The canvas element should draw video frames right side up.

What went wrong?
Video frames on canvas are drawn upside down.

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes 

Chrome version: 51.0.2687.0  Channel: dev
OS Version: 6.0.1
Flash Version:
 
Screenshot_20160324-132040.png
795 KB View Download
Cc: w...@chromium.org tobiasjs@chromium.org liber...@chromium.org
Labels: Proj-Spitzer
Thanks for the report!

Comment 2 by to...@interlude.fm, Mar 24 2016

Sure :)
Status: Assigned (was: Unconfirmed)
i'll take a look.
Owner: liber...@chromium.org
i verified that this is opposite what my linux box provides.  we're applying the texture matrix to get to android texture coordinates, but those are flipped in the y direction from chromium.

tob...@ is working through a similar issue for WMPA.  he and i will coordinate a fix for all of the 4? cases.
Status: Fixed (was: Assigned)
I just verified that this is fixed on both the UMP path and the non-UMP path in 51.0.2695.1. The problem was that we were using the SurfaceTexture matrix directly in texture copies, and the CL that fixed this was https://codereview.chromium.org/1746983002/
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5897d75b89294c388df2ec16b7519ecd635cc148

commit 5897d75b89294c388df2ec16b7519ecd635cc148
Author: tobiasjs <tobiasjs@chromium.org>
Date: Thu Jul 14 17:07:47 2016

Always apply UniformMatrix4fvStreamTextureMatrixCHROMIUM matrix argument.

Regardless of whether we have a stream texture matrix, we should apply
the transformation matrix held by the StreamTextureDrawQuad instance.

Change the implementation of the extension to always premultiply either
the stream texture matrix or the identity matrix by the passed
transformation matrix.

BUG= 597681 
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/1818073002
Cr-Commit-Position: refs/heads/master@{#405507}

[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/cc/layers/video_frame_provider_client_impl.cc
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/cc/layers/video_frame_provider_client_impl.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/cc/layers/video_layer_impl.cc
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/cc/output/gl_renderer.cc
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/cc/output/shader.cc
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_stream_texture_matrix.txt
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/client/gles2_c_lib_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/client/gles2_implementation_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/client/gles2_interface_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/client/gles2_interface_stub_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/cmd_buffer_functions.txt
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/common/gles2_cmd_format_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/service/gl_stream_texture_image.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/gpu/ipc/service/stream_texture_android.cc
[modify] https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148/media/gpu/avda_codec_image.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a79d7c93a712da8b63e7ee78da2e4ce4302c1530

commit a79d7c93a712da8b63e7ee78da2e4ce4302c1530
Author: wjmaclean <wjmaclean@chromium.org>
Date: Thu Jul 14 17:43:05 2016

Revert of Always apply UniformMatrix4fvStreamTextureMatrixCHROMIUM matrix argument. (patchset #11 id:220001 of https://codereview.chromium.org/1818073002/ )

Reason for revert:
Broke the build on Mac GYP (dbg):

https://build.chromium.org/p/chromium.mac/builders/Mac%20GYP%20(dbg)

Original issue's description:
> Always apply UniformMatrix4fvStreamTextureMatrixCHROMIUM matrix argument.
>
> Regardless of whether we have a stream texture matrix, we should apply
> the transformation matrix held by the StreamTextureDrawQuad instance.
>
> Change the implementation of the extension to always premultiply either
> the stream texture matrix or the identity matrix by the passed
> transformation matrix.
>
> BUG= 597681 
> CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel
>
> Committed: https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148
> Cr-Commit-Position: refs/heads/master@{#405507}

TBR=enne@chromium.org,ccameron@chromium.org,liberato@chromium.org,sievers@chromium.org,tobiasjs@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 597681 

Review-Url: https://codereview.chromium.org/2150993002
Cr-Commit-Position: refs/heads/master@{#405514}

[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/cc/layers/video_frame_provider_client_impl.cc
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/cc/layers/video_frame_provider_client_impl.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/cc/layers/video_layer_impl.cc
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/cc/output/gl_renderer.cc
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/cc/output/shader.cc
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_stream_texture_matrix.txt
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/client/gles2_c_lib_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/client/gles2_implementation_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/client/gles2_interface_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/client/gles2_interface_stub_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/cmd_buffer_functions.txt
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/common/gles2_cmd_format_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/service/gl_stream_texture_image.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/gpu/ipc/service/stream_texture_android.cc
[modify] https://crrev.com/a79d7c93a712da8b63e7ee78da2e4ce4302c1530/media/gpu/avda_codec_image.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee

commit fc9d613c03b8e72ddfbc9f43d87119d29f96fdee
Author: tobiasjs <tobiasjs@chromium.org>
Date: Wed Aug 03 16:56:10 2016

Always apply UniformMatrix4fvStreamTextureMatrixCHROMIUM matrix argument.

Regardless of whether we have a stream texture matrix, we should apply
the transformation matrix held by the StreamTextureDrawQuad instance.

Change the implementation of the extension to always premultiply either
the stream texture matrix or the identity matrix by the passed
transformation matrix.

BUG= 597681 
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel

Committed: https://crrev.com/5897d75b89294c388df2ec16b7519ecd635cc148
Review-Url: https://codereview.chromium.org/1818073002
Cr-Original-Commit-Position: refs/heads/master@{#405507}
Cr-Commit-Position: refs/heads/master@{#409543}

[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/cc/layers/video_frame_provider_client_impl.cc
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/cc/layers/video_frame_provider_client_impl.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/cc/layers/video_layer_impl.cc
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/cc/output/gl_renderer.cc
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/cc/output/shader.cc
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_stream_texture_matrix.txt
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/client/gles2_c_lib_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/client/gles2_implementation_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/client/gles2_interface_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/client/gles2_interface_stub_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/cmd_buffer_functions.txt
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/common/gles2_cmd_format_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/service/gl_stream_texture_image.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/gpu/ipc/service/stream_texture_android.cc
[modify] https://crrev.com/fc9d613c03b8e72ddfbc9f43d87119d29f96fdee/media/gpu/avda_codec_image.cc

Hmm, did this miss M-52? I didn't notice that this got reverted. We should merge this to M53 if possible at least.
The last CL isn't a bugfix - it's just removing the last redundant pair of y-flips that I had to split out of the original CL. It's been waiting a long time because the gyp build was broken on some bots, in a way that I couldn't reproduce. But now gyp's dead, \o/.

This doesn't need to be merged anywhere, I think.
Awesome, thanks for the clarification :)

Sign in to add a comment