Closed
Bug 1147763
Opened 10 years ago
Closed 8 years ago
[Nexus 5][Video] thumbnail image of webm format is broken
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: hcheng, Assigned: vliu)
References
Details
(Keywords: regression, Whiteboard: [v2.2-nexus-5-l])
Attachments
(4 files, 1 obsolete file)
(deleted),
image/jpeg
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
image/png
|
Details |
* STR:
1. upload a video file which format is webm
2. open Video app
* Expected result:
thumbnail is ok
* Actual result:
Got a broken thumbnail just like attachment shows
Reporter | ||
Comment 1•10 years ago
|
||
I found this issue when verifying bug 1120780.
Michael, could you take a look?
Comment 2•10 years ago
|
||
mwu: any update/input here?
thanks
hema
Comment 4•10 years ago
|
||
before blocking we are waiting to confirm(likely by response in comment# 3) if this is a generic 2.2 and L issue to help understand isolate the device specific behavior that may be seen here.
Yes, we are also seeing thumbnail corruption on our reference devices. Although we have not made the determination if it's gecko or gonk issue.
Flags: needinfo?(ikumar)
Comment 6•10 years ago
|
||
Sotaro, do you have any insight about this bug? Looks like this is a generic L issue, rather than being specific to nexus 5.
Flags: needinfo?(sotaro.ikeda.g)
Comment 7•10 years ago
|
||
Blocking Reason: broken thumbnail happening on both nexus5 and QRD. it looks like one of the webm thumbnails on the top of the screenshot looks fine.
Thanks
Hema
blocking-b2g: 2.2? → 2.2+
Comment 8•10 years ago
|
||
Probably another stride issue, though probably on the gecko side of things.
Hermes, can you link your test video?
Flags: needinfo?(mwu)
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(hcheng)
Reporter | ||
Comment 9•10 years ago
|
||
(In reply to Michael Wu [:mwu] from comment #8)
> Probably another stride issue, though probably on the gecko side of things.
>
> Hermes, can you link your test video?
I used this one
https://github.com/mozilla-b2g/gaia/blob/master/test_media/Movies/elephants-dream.webm
Flags: needinfo?(hcheng)
Updated•10 years ago
|
Blocks: CAF-v2.2-metabug
Whiteboard: [v2.2-nexus-5-l] → [v2.2-nexus-5-l][CR 812421]
Updated•10 years ago
|
Component: Gaia::Video → Video/Audio
Product: Firefox OS → Core
Updated•10 years ago
|
Whiteboard: [v2.2-nexus-5-l][CR 812421] → [caf priority: p2][v2.2-nexus-5-l][CR 812421]
Comment 11•10 years ago
|
||
Hi Blake,
Please check this bug, thanks.
Flags: needinfo?(slee) → needinfo?(bwu)
Updated•10 years ago
|
Keywords: regression
Comment 12•10 years ago
|
||
I think this should be related to color space alignment.
vliu,
Can you help check it?
Flags: needinfo?(bwu) → needinfo?(vliu)
Assignee | ||
Comment 13•10 years ago
|
||
Sure, I can reproduce this issue on Nexus 5. I will try to look into this problem.
Assignee | ||
Comment 14•10 years ago
|
||
It seems that the recent change for ColorConverter in stagefright to cause this problem.
Flags: needinfo?(vliu)
Assignee | ||
Comment 15•10 years ago
|
||
I tried to revert some codes in ColorConverter.cpp in stagefright, it can make sure the problem we meet.
Updated•10 years ago
|
Assignee: nobody → vliu
Status: NEW → ASSIGNED
Assignee | ||
Comment 16•10 years ago
|
||
Hi Sotaro,
From the Bug 1120780 Comment 59, do we expect the color converter will fall back on lock_ycbcr for the YCbCr_420_SP_VENUS case? Thanks for the comment.
Comment 17•10 years ago
|
||
(In reply to Vincent Liu[:vliu] from comment #15)
> Created attachment 8593217 [details] [diff] [review]
> WIP-revert-color-converter.diff
>
> I tried to revert some codes in ColorConverter.cpp in stagefright, it can
> make sure the problem we meet.
The patch worked on my master nexus-5-l. But it might be better to analyze why the problem happens. GraphicBuffer::lockYCbCr() is also supported for HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS on android v5.1
http://androidxref.com/5.1.0_r1/xref/hardware/qcom/display/msm8974/libgralloc/mapper.cpp#247
Flags: needinfo?(sotaro.ikeda.g)
Comment 18•10 years ago
|
||
(In reply to Vincent Liu[:vliu] from comment #16)
> Hi Sotaro,
>
> From the Bug 1120780 Comment 59, do we expect the color converter will fall
> back on lock_ycbcr for the YCbCr_420_SP_VENUS case? Thanks for the comment.
Color convert is done like the following sequence. If android::ColorConverter does not support YCbCr_420_SP_VENUS, ConvertVendorYUVFormatToRGB565() do it.
GrallocImage::GetAsSourceSurface()
->ConvertOmxYUVFormatToRGB565()
->// Try color convert by using android::ColorConverter
->android::ColorConverter::convert()
->//If ConvertOmxYUVFormatToRGB565() failed to do color convert
->ConvertVendorYUVFormatToRGB565()
->GraphicBuffer::lockYCbCr()
Comment 19•10 years ago
|
||
moz-build nexus-5-l uses following for GraphicBuffer::lockYCbCr().
https://github.com/mozilla-b2g/hardware_qcom_display/pull/1/files
It works actually same to android 5.1's the following code. It looks like different though.
http://androidxref.com/5.1.0_r1/xref/hardware/qcom/display/msm8974/libgralloc/mapper.cpp#269
Comment 20•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #19)
> It works actually same to android 5.1's the following code. It looks like
> different though.
> http://androidxref.com/5.1.0_r1/xref/hardware/qcom/display/msm8974/
> libgralloc/mapper.cpp#269
Android 5.1's code also caused same problem on nexus-5-l.
Comment 21•10 years ago
|
||
The video size is 560*360. From the color format stride is 640.
From the investigation, when GraphicBuffer of the video is mapped by GraphicBuffer::lockYCbCr(),
ystride and cstride are incorrect values and video data is strangely placed.
ystride seemed like (640-4), cstride seemed like (640-8).
Comment 22•10 years ago
|
||
560 is multiple of 4, but not multiple of 8. It might be related to the problem.
Comment 23•10 years ago
|
||
Change moz-build source to same to android v5.1 and apply a stride quirk. I used the patch to check the stride problem.
Comment 24•10 years ago
|
||
In attachment 8594209 [details] [diff] [review], actually only the following is related to checking the stride problem. By applying the patch, I confirmed the thumbnail's skew was disappeared, but the video was strangely segmented.
----------------------------------------------------------
+ // XXX test code to check stride problem.
+ if (ystride == 640) {
+ ycbcr->ystride = 640 - 4;
+ ycbcr->cstride = 640 - 8;
+ }
Comment 25•10 years ago
|
||
Comment 26•10 years ago
|
||
From comment 21 and comment 25, the problem seems gonk issues.
Comment 27•10 years ago
|
||
By the way, android normally use sw codec for thumbnail generation.
http://androidxref.com/5.0.0_r2/xref/frameworks/av/media/libstagefright/StagefrightMetadataRetriever.cpp#387
Comment 28•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #27)
> By the way, android normally use sw codec for thumbnail generation.
> http://androidxref.com/5.0.0_r2/xref/frameworks/av/media/libstagefright/
> StagefrightMetadataRetriever.cpp#387
IIRC FxOS used to do this too
Comment 29•10 years ago
|
||
At first it allow sw video decoder. But we disable sw video codec since b2g v1.0.0 by Bug 834150.
Comment 30•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #29)
> At first it allow sw video decoder. But we disable sw video codec since b2g
> v1.0.0 by Bug 834150.
Even when gecko request hw video codec, some chip vendors implement it by sw decoder though.
Comment 31•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #26)
> From comment 21 and comment 25, the problem seems gonk issues.
So, it seems like POVB problem.
Assignee | ||
Comment 33•10 years ago
|
||
This issue also cause thumbnail image broken for camera recorded file. From current founding, N5 doesn't this issue on master branch. It happens on v2.2 branch. I'd try some steps to make sure Gecko/Gaia on v2.2 doesn't cause this issue happens.
1. Flash the full image for master branch. Thumbnail image for camera recorded file looks well.
2. Change Gecko/Gaia on v2.2 branch. Thumbnail image for camera recorded file looks well.
3. Flash the full image for v2.2 branch. Thumbnail image for camera recorded file is broken.
The result may lead to POVB problem.
(In reply to Inder from comment #32)
> diego -- can you please confirm?
You can take this bug if the confirmation is positive.
Flags: needinfo?(ikumar)
Comment 34•10 years ago
|
||
Sotaro,
Where are you applying attachment 8594209 [details] [diff] [review] ? I can't find any reference to HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS in hardware/qcom/display/libgralloc/mapper.cpp in my workspace. Is this a project you are forking? If so, where is it hosted?
Flags: needinfo?(dwilson) → needinfo?(sotaro.ikeda.g)
Comment 35•10 years ago
|
||
moz build nexus-5-l uses the following.
https://github.com/mozilla-b2g/hardware_qcom_display/blob/b2g-5.1.0_r1/msm8974/libgralloc/mapper.cpp#L269
It is referenced by the manifest.
https://github.com/mozilla-b2g/b2g-manifest/blob/v2.2/nexus-5-l.xml#L174
Flags: needinfo?(sotaro.ikeda.g)
Comment 36•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #35)
> moz build nexus-5-l uses the following.
> https://github.com/mozilla-b2g/hardware_qcom_display/blob/b2g-5.1.0_r1/
> msm8974/libgralloc/mapper.cpp#L269
>
> It is referenced by the manifest.
> https://github.com/mozilla-b2g/b2g-manifest/blob/v2.2/nexus-5-l.xml#L174
It appears mwu added the HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS support there:
https://github.com/mozilla-b2g/hardware_qcom_display/pull/1
Comment 37•10 years ago
|
||
(In reply to Diego Wilson [:diego] from comment #36)
> (In reply to Sotaro Ikeda [:sotaro] from comment #35)
> > moz build nexus-5-l uses the following.
> > https://github.com/mozilla-b2g/hardware_qcom_display/blob/b2g-5.1.0_r1/
> > msm8974/libgralloc/mapper.cpp#L269
> >
> > It is referenced by the manifest.
> > https://github.com/mozilla-b2g/b2g-manifest/blob/v2.2/nexus-5-l.xml#L174
>
> It appears mwu added the HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS support there:
>
> https://github.com/mozilla-b2g/hardware_qcom_display/pull/1
As in comment 23, comment 24 and comment 25. When the HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS support code is changed to same to android 5.1 aosp, the problem still happens.
Comment 38•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #37)
> As in comment 23, comment 24 and comment 25. When the
> HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS support code is changed to same to
> android 5.1 aosp, the problem still happens.
I see. From where exactly in AOSP 5.1 are you pulling the Venus code?
Flags: needinfo?(ikumar) → needinfo?(sotaro.ikeda.g)
Comment 39•10 years ago
|
||
(In reply to Diego Wilson [:diego] from comment #38)
>
> I see. From where exactly in AOSP 5.1 are you pulling the Venus code?
The following code.
http://androidxref.com/5.1.0_r1/xref/hardware/qcom/display/msm8974/libgralloc/mapper.cpp#269
Flags: needinfo?(sotaro.ikeda.g)
Comment 40•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #39)
> (In reply to Diego Wilson [:diego] from comment #38)
> >
> > I see. From where exactly in AOSP 5.1 are you pulling the Venus code?
>
> The following code.
>
> http://androidxref.com/5.1.0_r1/xref/hardware/qcom/display/msm8974/
> libgralloc/mapper.cpp#269
I'm seeing a similar issue on a different color format. Can you check if the GraphicBuffer stride matches the ycbcr stride?
Just add a query to aBuffer->getStride() here
https://mxr.mozilla.org/mozilla-b2g37_v2_2/source/gfx/layers/GrallocImages.cpp#241
Flags: needinfo?(sotaro.ikeda.g)
Comment 41•10 years ago
|
||
(In reply to Diego Wilson [:diego] from comment #40)
> (In reply to Sotaro Ikeda [:sotaro] from comment #39)
> > (In reply to Diego Wilson [:diego] from comment #38)
> > >
> > > I see. From where exactly in AOSP 5.1 are you pulling the Venus code?
> >
> > The following code.
> >
> > http://androidxref.com/5.1.0_r1/xref/hardware/qcom/display/msm8974/
> > libgralloc/mapper.cpp#269
>
> I'm seeing a similar issue on a different color format. Can you check if the
> GraphicBuffer stride matches the ycbcr stride?
Diego, can you provide actual STR to reproduce it? In which color format?
Flags: needinfo?(sotaro.ikeda.g) → needinfo?(dwilson)
Comment 42•10 years ago
|
||
Some videos have bad thumbnails due to bad stride values on HAL_PIXEL_FORMAT_YCrCb_420_SP frames. This is happening on my prototype L device. I'm not sure if exactly the same issue as what's happening in Nexus-L, but it's probably related.
I have a patch for that which I'll share as soon as I can.
Flags: needinfo?(dwilson)
Comment 43•10 years ago
|
||
This patch fixes a similar issue I was having
Attachment #8599531 -
Flags: feedback?(sotaro.ikeda.g)
Comment 44•10 years ago
|
||
Comment on attachment 8599531 [details] [diff] [review]
Query stride when converting HAL_PIXEL_FORMAT_YCrCb_420_SP
Review of attachment 8599531 [details] [diff] [review]:
-----------------------------------------------------------------
This patch look good! But I thinks it is not related to this bug.
Attachment #8599531 -
Flags: feedback?(sotaro.ikeda.g) → feedback+
Comment 45•10 years ago
|
||
This bug's code path uses ConvertYVU420SPToRGB565() to convert color format. And stride values are got via android::GraphicBuffer::lockYCbCr(). It is actually implemented by gralloc_lock_ycbcr() in gralloc hal. And the problem happens even when gralloc_lock_ycbcr() is replaced to android 5.1 aosp code.
Comment 46•10 years ago
|
||
This bug no longer blocks CAF v2.2. I created bug 110689 for the patch that fixes the CAF v2.2 issue.
Updated•10 years ago
|
No longer blocks: CAF-v2.2-metabug
blocking-b2g: 2.2+ → ---
Updated•10 years ago
|
Whiteboard: [caf priority: p2][v2.2-nexus-5-l][CR 812421] → [v2.2-nexus-5-l]
Updated•10 years ago
|
Attachment #8599531 -
Attachment is obsolete: true
Updated•9 years ago
|
Updated•9 years ago
|
Component: Audio/Video → Audio/Video: Playback
Assignee | ||
Updated•8 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•