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

Issue 663183002: ppapi: Change endianness in libyuv calls, from BGRA to ARGB (Closed)

Created:
6 years, 2 months ago by magjed_chromium
Modified:
6 years, 2 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Detect endianness automatically from the data received from the plugin. BUG=426020 Committed: https://crrev.com/8cd330dced386cf0f3eb6888af8b9f46b90d8d1c Cr-Commit-Position: refs/heads/master@{#301079}

Patch Set 1 #

Total comments: 2

Patch Set 2 : automatically detect endianness #

Total comments: 2

Patch Set 3 : Add todo and remove PepperVideoSourceHost from this CL #

Total comments: 2

Patch Set 4 : tpsiaki@s and thorcarpenter@s comments #

Total comments: 2

Patch Set 5 : clarifying comments #

Total comments: 8

Patch Set 6 : fbarchard@s comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -11 lines) Patch
M content/renderer/media/webrtc/video_destination_handler.cc View 1 2 3 4 5 5 chunks +53 lines, -11 lines 0 comments Download

Messages

Total messages: 40 (8 generated)
magjed_chromium
Please take a look.
6 years, 2 months ago (2014-10-20 18:44:59 UTC) #2
tommi (sloooow) - chröme
lgtm fwiw - this really needs to be vetted by someone familiar with libyuv and ...
6 years, 2 months ago (2014-10-20 19:27:42 UTC) #3
thorcarpenter
lgtm Thanks for making this change. Before submitting though, please let us get a new ...
6 years, 2 months ago (2014-10-20 20:32:23 UTC) #5
fbarchard
lgtm https://codereview.chromium.org/663183002/diff/1/content/renderer/media/webrtc/video_destination_handler.cc File content/renderer/media/webrtc/video_destination_handler.cc (right): https://codereview.chromium.org/663183002/diff/1/content/renderer/media/webrtc/video_destination_handler.cc#newcode105 content/renderer/media/webrtc/video_destination_handler.cc:105: DCHECK(image_data->format() == PP_IMAGEDATAFORMAT_BGRA_PREMUL); FYI our effects code is ...
6 years, 2 months ago (2014-10-21 01:02:57 UTC) #7
thorcarpenter
lgtm https://codereview.chromium.org/663183002/diff/20001/content/renderer/media/webrtc/video_destination_handler.cc File content/renderer/media/webrtc/video_destination_handler.cc (right): https://codereview.chromium.org/663183002/diff/20001/content/renderer/media/webrtc/video_destination_handler.cc#newcode158 content/renderer/media/webrtc/video_destination_handler.cc:158: // Due to confusion about endianness, we try ...
6 years, 2 months ago (2014-10-21 21:14:48 UTC) #8
magjed_chromium
Can you please take another look? I have removed the change in PepperVideoSourceHost from this ...
6 years, 2 months ago (2014-10-22 15:57:25 UTC) #10
tpsiaki
It shouldn't be necessary to do this every frame. Can we just do it once ...
6 years, 2 months ago (2014-10-22 16:45:56 UTC) #11
chromium-reviews
(the endian check that is) On Wed, Oct 22, 2014 at 9:45 AM, <tpsiaki@google.com> wrote: ...
6 years, 2 months ago (2014-10-22 16:46:53 UTC) #12
thorcarpenter
https://codereview.chromium.org/663183002/diff/60001/content/renderer/media/webrtc/video_destination_handler.cc File content/renderer/media/webrtc/video_destination_handler.cc (right): https://codereview.chromium.org/663183002/diff/60001/content/renderer/media/webrtc/video_destination_handler.cc#newcode188 content/renderer/media/webrtc/video_destination_handler.cc:188: (endian == XXXA) ? libyuv::ARGBToI420 : libyuv::BGRAToI420; can we ...
6 years, 2 months ago (2014-10-22 16:56:39 UTC) #13
magjed_chromium
PTAL. I changed so that the endian is stored as a member variable. If we ...
6 years, 2 months ago (2014-10-22 17:27:53 UTC) #14
chromium-reviews
perhaps gcl upload? I'm still seeing (endian_ == AXXX) On Wed, Oct 22, 2014 at ...
6 years, 2 months ago (2014-10-22 17:47:36 UTC) #15
tpsiaki
lgtm
6 years, 2 months ago (2014-10-22 17:49:12 UTC) #16
chromium-reviews
oh, after rereading, it looks right. staring at too many endians is confusing :-) On ...
6 years, 2 months ago (2014-10-22 17:56:17 UTC) #17
chromium-reviews
lgtm On Wed, Oct 22, 2014 at 10:56 AM, Thor Carpenter <thorcarpenter@google.com> wrote: > oh, ...
6 years, 2 months ago (2014-10-22 17:56:34 UTC) #18
chromium-reviews
Yeah, sorry, I should have been more clear. I swapped XXXA to AXXX instead of ...
6 years, 2 months ago (2014-10-22 17:57:27 UTC) #19
brucedawson
What is the reason why image_data->format() == PP_IMAGEDATAFORMAT_BGRA_PREMUL can't be used to specify/detect the byte ...
6 years, 2 months ago (2014-10-22 17:58:41 UTC) #21
magjed_chromium
brucedawson: Regarding image_data->format(). We always expect PP_IMAGEDATAFORMAT_BGRA_PREMUL, that DCHECK will crash otherwise in debug. The ...
6 years, 2 months ago (2014-10-22 18:18:14 UTC) #22
brucedawson
Would it not be sensible to pass in a new IMAGEDATAFORMAT that specifies the new ...
6 years, 2 months ago (2014-10-22 18:34:11 UTC) #23
magjed_chromium
brucedawson: I added some comments to clarify the code. Regarding sending in a new format ...
6 years, 2 months ago (2014-10-22 19:13:52 UTC) #25
brucedawson
Apologies if this is a dumb question, but how do we guarantee that somebody doesn't ...
6 years, 2 months ago (2014-10-22 20:05:07 UTC) #26
chromium-reviews
Yes, there will always be some small percent of users that are on really old ...
6 years, 2 months ago (2014-10-22 20:13:56 UTC) #27
fbarchard
https://codereview.chromium.org/663183002/diff/120001/content/renderer/media/webrtc/video_destination_handler.cc File content/renderer/media/webrtc/video_destination_handler.cc (right): https://codereview.chromium.org/663183002/diff/120001/content/renderer/media/webrtc/video_destination_handler.cc#newcode169 content/renderer/media/webrtc/video_destination_handler.cc:169: // Due to confusion about endianness, we try to ...
6 years, 2 months ago (2014-10-22 21:47:43 UTC) #28
magjed_chromium
fbarchard: PTAL. https://codereview.chromium.org/663183002/diff/120001/content/renderer/media/webrtc/video_destination_handler.cc File content/renderer/media/webrtc/video_destination_handler.cc (right): https://codereview.chromium.org/663183002/diff/120001/content/renderer/media/webrtc/video_destination_handler.cc#newcode169 content/renderer/media/webrtc/video_destination_handler.cc:169: // Due to confusion about endianness, we ...
6 years, 2 months ago (2014-10-23 10:59:36 UTC) #29
brucedawson
On 2014/10/23 10:59:36, magjed wrote: > fbarchard: PTAL. > > https://codereview.chromium.org/663183002/diff/120001/content/renderer/media/webrtc/video_destination_handler.cc > File content/renderer/media/webrtc/video_destination_handler.cc (right): ...
6 years, 2 months ago (2014-10-23 17:04:02 UTC) #30
magjed_chromium
perkj: Can you take a look as well?
6 years, 2 months ago (2014-10-23 20:46:43 UTC) #32
perkj_chrome
On 2014/10/23 20:46:43, magjed wrote: > perkj: Can you take a look as well? Well ...
6 years, 2 months ago (2014-10-24 06:43:14 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/663183002/140001
6 years, 2 months ago (2014-10-24 07:50:39 UTC) #35
commit-bot: I haz the power
Committed patchset #6 (id:140001)
6 years, 2 months ago (2014-10-24 09:37:20 UTC) #36
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/8cd330dced386cf0f3eb6888af8b9f46b90d8d1c Cr-Commit-Position: refs/heads/master@{#301079}
6 years, 2 months ago (2014-10-24 09:38:00 UTC) #37
chromium-reviews
I'm implementing the corresponding change in the nacl effects plugin and I think the AXXX ...
6 years, 2 months ago (2014-10-24 16:35:21 UTC) #38
magjed_chromium
On 2014/10/24 16:35:21, chromium-reviews wrote: > I'm implementing the corresponding change in the nacl effects ...
6 years, 2 months ago (2014-10-24 16:58:04 UTC) #39
chromium-reviews
6 years, 2 months ago (2014-10-24 17:01:05 UTC) #40
Message was sent while issue was closed.
ok yeah you're right.  I missed where you were actually selecting the right
libyuv::XXXXtoI420 version.

On Fri, Oct 24, 2014 at 9:58 AM, <magjed@chromium.org> wrote:

> On 2014/10/24 16:35:21, chromium-reviews wrote:
>
>> I'm implementing the corresponding change in the nacl effects plugin and I
>> think the AXXX logic here is backwards.
>>
>
>  libyuv says ARGB means src[0]:B src[1]:G src[2]:R src[3]:A (see here:
>>
>
> https://cs.corp.google.com/#piper///depot/google3/third_
> party/libyuv/files/source/row_common.cc&rcl=78325477&l=1995
>
>> )
>>
>
>  In this change we're saying essentially if px_ptr[3] is not A then AXXX,
>> but in libyuv px_ptr[3] is A for AXXX...
>>
>
>  Do we have a canary build with this change yet to verify?  An ML hangout
>> should look pretty broken if I'm not mistaken.
>>
>
>  On Fri, Oct 24, 2014 at 2:37 AM, <mailto:commit-bot@chromium.org> wrote:
>>
>
>  > Patchset 6 (id:??) landed as
>> > https://crrev.com/8cd330dced386cf0f3eb6888af8b9f46b90d8d1c
>> > Cr-Commit-Position: refs/heads/master@{#301079}
>> >
>> > https://codereview.chromium.org/663183002/
>> >
>>
>
>  To unsubscribe from this group and stop receiving emails from it, send an
>>
> email
>
>> to mailto:chromium-reviews+unsubscribe@chromium.org.
>>
>
> No, it should be correct. I'm using the same naming convention for AXXX as
> PP_ImageDataFormat does, which is in memory order. As you say, libyuv uses:
> ARGB: src[0]:B src[1]:G src[2]:R src[3]:A
> which is in the reversed order of that. There are comments in the code
> explaining the difference.
>
>
>
>
>
> https://codereview.chromium.org/663183002/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698