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

Issue 23677011: Byte-swap the video frame pixels before passing them to Java. (Closed)

Created:
7 years, 3 months ago by Lambros
Modified:
7 years, 2 months ago
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, hclam+watch_chromium.org, wez+watch_chromium.org, amit, sanjeevr, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, rmsousa+watch_chromium.org, weitaosu+watch_chromium.org, alexeypa+watch_chromium.org, sergeyu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Byte-swap the video frame pixels before passing them to Java. When a complete video frame is decoded, this CL converts the pixels from BGRA to a format suitable for loading into a Java Bitmap directly. This removes the need to create a temporary int[] array in Java. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226405

Patch Set 1 #

Total comments: 20

Patch Set 2 : rebase onto new VideoDecoder interface #

Patch Set 3 : Add PixelFormat to FrameConsumer interface #

Total comments: 4

Patch Set 4 : rebase (for Skia removal) #

Total comments: 2

Patch Set 5 : remove FrameConsumerProxy::Attach #

Total comments: 6

Patch Set 6 : fix nits #

Patch Set 7 : rewind() the ByteBuffer before copying pixels from it #

Patch Set 8 : Placate findbugs #

Patch Set 9 : Narrow the synchronization block #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -48 lines) Patch
M remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -5 lines 0 comments Download
M remoting/client/frame_consumer.h View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M remoting/client/frame_consumer_proxy.h View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M remoting/client/frame_consumer_proxy.cc View 1 2 3 4 2 chunks +7 lines, -7 lines 0 comments Download
M remoting/client/jni/chromoting_jni_instance.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/client/jni/jni_frame_consumer.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M remoting/client/jni/jni_frame_consumer.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M remoting/client/plugin/chromoting_instance.cc View 1 2 3 4 5 2 chunks +9 lines, -5 lines 0 comments Download
M remoting/client/plugin/pepper_view.h View 1 2 3 4 5 3 chunks +8 lines, -9 lines 0 comments Download
M remoting/client/plugin/pepper_view.cc View 1 2 3 4 5 8 chunks +18 lines, -15 lines 0 comments Download
M remoting/client/rectangle_update_decoder.cc View 1 2 3 4 5 4 chunks +63 lines, -0 lines 0 comments Download
M remoting/remoting.gyp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Lambros
This adds a VideoDecoderWrapper class as suggested by Wez to do the byte-swapping. If you ...
7 years, 3 months ago (2013-09-20 16:33:01 UTC) #1
Sergey Ulanov
https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc File remoting/client/rectangle_update_decoder.cc (right): https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc#newcode21 remoting/client/rectangle_update_decoder.cc:21: #if defined(OS_ANDROID) No need to wrap this include in ...
7 years, 3 months ago (2013-09-20 18:35:15 UTC) #2
fbarchard
https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc File remoting/client/rectangle_update_decoder.cc (right): https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc#newcode75 remoting/client/rectangle_update_decoder.cc:75: libyuv::ABGRToARGB(pixels, image_stride, pixels, image_stride, On 2013/09/20 18:35:15, Sergey Ulanov ...
7 years, 3 months ago (2013-09-20 21:50:58 UTC) #3
Sergey Ulanov
https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc File remoting/client/rectangle_update_decoder.cc (right): https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc#newcode75 remoting/client/rectangle_update_decoder.cc:75: libyuv::ABGRToARGB(pixels, image_stride, pixels, image_stride, On 2013/09/20 21:50:58, fbarchard wrote: ...
7 years, 3 months ago (2013-09-20 21:56:03 UTC) #4
fbarchard1
On 2013/09/20 21:56:03, Sergey Ulanov wrote: > https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc > File remoting/client/rectangle_update_decoder.cc (right): > > https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc#newcode75 ...
7 years, 3 months ago (2013-09-23 19:45:57 UTC) #5
Lambros
ptal https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc File remoting/client/rectangle_update_decoder.cc (right): https://codereview.chromium.org/23677011/diff/1/remoting/client/rectangle_update_decoder.cc#newcode21 remoting/client/rectangle_update_decoder.cc:21: #if defined(OS_ANDROID) On 2013/09/20 18:35:15, Sergey Ulanov wrote: ...
7 years, 2 months ago (2013-09-25 18:40:41 UTC) #6
fbarchard1
lgtm from libyuv::ABGRToARGB point of view. I'll make a point to optimize this function more ...
7 years, 2 months ago (2013-09-26 00:31:54 UTC) #7
solb
I don't know much about the VideoDecoder hierarchy, but from what I can see the ...
7 years, 2 months ago (2013-09-26 14:34:08 UTC) #8
Lambros
Rebased, should work now. Sergey, I'll wait for your LG before landing this.
7 years, 2 months ago (2013-09-26 20:06:28 UTC) #9
Sergey Ulanov
https://codereview.chromium.org/23677011/diff/16001/remoting/client/frame_consumer.h File remoting/client/frame_consumer.h (right): https://codereview.chromium.org/23677011/diff/16001/remoting/client/frame_consumer.h#newcode51 remoting/client/frame_consumer.h:51: // from any thread. Don't need the threading comment. ...
7 years, 2 months ago (2013-09-27 21:51:13 UTC) #10
Lambros
ptal - I'm not sure PepperView::InitiateDrawing() is the best place to pass in the FrameProducer*. ...
7 years, 2 months ago (2013-09-28 00:22:18 UTC) #11
Sergey Ulanov
https://codereview.chromium.org/23677011/diff/36001/remoting/client/plugin/pepper_view.h File remoting/client/plugin/pepper_view.h (right): https://codereview.chromium.org/23677011/diff/36001/remoting/client/plugin/pepper_view.h#newcode70 remoting/client/plugin/pepper_view.h:70: void InitiateDrawing(FrameProducer* producer); nit: Please rename it to Start() ...
7 years, 2 months ago (2013-09-28 00:33:31 UTC) #12
Sergey Ulanov
lgtm when my nits are addressed
7 years, 2 months ago (2013-09-28 00:33:44 UTC) #13
Lambros
https://codereview.chromium.org/23677011/diff/36001/remoting/client/plugin/pepper_view.h File remoting/client/plugin/pepper_view.h (right): https://codereview.chromium.org/23677011/diff/36001/remoting/client/plugin/pepper_view.h#newcode70 remoting/client/plugin/pepper_view.h:70: void InitiateDrawing(FrameProducer* producer); On 2013/09/28 00:33:32, Sergey Ulanov wrote: ...
7 years, 2 months ago (2013-09-28 00:51:10 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lambroslambrou@chromium.org/23677011/42001
7 years, 2 months ago (2013-09-28 00:54:49 UTC) #15
commit-bot: I haz the power
Retried try job too often on android_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_dbg&number=107450
7 years, 2 months ago (2013-09-28 04:01:07 UTC) #16
solb
My tests of this patch seem to indicate that it breaks rendering: I first tested ...
7 years, 2 months ago (2013-09-28 05:04:08 UTC) #17
Lambros
Yeah, it was working fine on my Nexus 7 but not on my Nexus 4. ...
7 years, 2 months ago (2013-09-30 21:45:55 UTC) #18
fbarchard1
FYI I've ported the AVX2 version of ABGRToARGB to OSX https://webrtc-codereview.appspot.com/2320005/ On Mon, Sep 30, ...
7 years, 2 months ago (2013-10-01 07:04:43 UTC) #19
solb
On 2013/09/30 21:45:55, Lambros wrote: > Yeah, it was working fine on my Nexus 7 ...
7 years, 2 months ago (2013-10-01 14:00:20 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lambroslambrou@chromium.org/23677011/79001
7 years, 2 months ago (2013-10-01 22:58:39 UTC) #21
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 2 months ago (2013-10-02 00:00:55 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lambroslambrou@chromium.org/23677011/102001
7 years, 2 months ago (2013-10-02 01:42:55 UTC) #23
commit-bot: I haz the power
7 years, 2 months ago (2013-10-02 06:53:59 UTC) #24
Message was sent while issue was closed.
Change committed as 226405

Powered by Google App Engine
This is Rietveld 408576698