Closed Bug 1077235 Opened 5 years ago Closed 2 years ago

[dolphin][video][Browser] Go to Browser,using youtube play any video, the video at the bottom displays 2mm wide mosaic

Categories

(Firefox OS Graveyard :: General, defect, critical)

ARM
Gonk (Firefox OS)
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: lin.hui, Unassigned)

References

Details

(Whiteboard: [SPRD 357518])

Attachments

(8 files)

DEFECT DESCRIPTION:
  Play any video Using youtube,Bottom of the screen appears 2mm Mosaic

Steps to reproduce:
----------------------------------------------------
1.Go to Browser, Open youtube website
2.Using youtube to play video
3.The bottom of the video screen display 2mm wide mosaic

Actual result:
----------------------------------------------------
The bottom of the video screen display 2mm wide mosaic

Expected result:
--------------------------------------- 
The bottom of the video screen should be no mosaic

Additional info:
--------------------------------------
Reproduce rate:  5/5
[Blocking Requested - why for this release]: block 1.4
blocking-b2g: --- → 1.4?
Flags: needinfo?(vchen)
Whiteboard: [SPRD 357518]
Hi Shawn, per discussion, please help to find someone to check this one, thanks
Flags: needinfo?(vchen) → needinfo?(sku)
Hi Vincent:
 Please help track this issue.
Thanks!!
Shawn
Flags: needinfo?(sku) → needinfo?(vliu)
ni? myself for issue tracking.
Flags: needinfo?(sku)
Flame can also reproduce this issue. From observing this issue by Layer scope, it contains in Image Layer, which means Mosaic might also attach in the output of video decoder.
Flags: needinfo?(vliu)
Sotaro, Do you have any input on this issue?
Flags: needinfo?(sotaro.ikeda.g)
lin.hui, can you provide a screenshot of the problem?
Flags: needinfo?(sotaro.ikeda.g) → needinfo?(lin.hui)
To analyze the problem we need to make clear about the following.
- If the problem happens on browser view on OpenGL composition.
- If the problem happens on full screen view on HwComposer composition.
- If the problem happens on full screen view on OpenGL composition.
There seems 2 possibilities.
-[1] Youtube sent such data.
-[2] Clip setting is not correct.
(In reply to Sotaro Ikeda [:sotaro] from comment #8)
> To analyze the problem we need to make clear about the following.
> - If the problem happens on browser view on OpenGL composition.
> - If the problem happens on full screen view on HwComposer composition.
> - If the problem happens on full screen view on OpenGL composition.

It might be better also compare between normal videos and HQ videos.
On dolphin, I tried to capture yuv data into a file in the below link. Two cases were included 

http://dxr.mozilla.org/mozilla-central/source/gfx/layers/GrallocImages.cpp#139

Case 1 : Played youtube in browser app.
Case 2 : Downloaded a youbute file and played in Video app

The attached zip file contains a snapshot for above two cases when I played them on PC. From these attached pictures, it is clear that Mosaic contains in the output data of video decoder. We need partner's help to figure out for this point of view.
Hi Siiaceon -

As mentioned in Comment#11, since like the video data we get from your video decoder already contains the mosaic, so could you help to check with your video decoder part first?

Thanks

Vance
Flags: needinfo?(siiaceon.cao)
It seems clear that this is not a Gaia bug, so switching the component so that it does not appear in the triage queue for the Media Apps team.  Vance: I'm not sure what the correct component is for this kind of driver issue...
Component: Gaia::Video → General
(In reply to Vincent Liu[:vliu] from comment #5)
> Flame can also reproduce this issue. From observing this issue by Layer
> scope, it contains in Image Layer, which means Mosaic might also attach in
> the output of video decoder.

vliu, are you saying that you can see the problem only on layer scope? Can you see the problem on flame's display?

When video is decoded by hw codec, gralloc buffer size and actual valid size could be different. Out side of valid video area, gralloc buffer could be rendered like "mosaic". But it is outside of valid video area, compositor does composition by setting clip area. Then, these invalid area is not rendered on display. Similar problem was fixed by Bug 994889.
Flags: needinfo?(vliu)
If the bug is similar to Bug 994889, the problem exist somewhere related to Comment 14.
It might be better to check about kKeyCropRect meta data on dolphin.
remove ni? for myself since ppl are handling this issue now.
Flags: needinfo?(sku)
(In reply to Sotaro Ikeda [:sotaro] from comment #14)
> (In reply to Vincent Liu[:vliu] from comment #5)
> > Flame can also reproduce this issue. From observing this issue by Layer
> > scope, it contains in Image Layer, which means Mosaic might also attach in
> > the output of video decoder.
> 
> vliu, are you saying that you can see the problem only on layer scope? Can
> you see the problem on flame's display?
> 

Actually I can also see this problem on flame's display. The case I saw in flame is more thinner then dolphin. The bar displayed on Flame is more transparent than dolphin. The link I used is as follows

http://www.youtube.com/watch?v=ym3EwGMZO8c&feature=youtu.be

You may also try this link on Flame.

> When video is decoded by hw codec, gralloc buffer size and actual valid size
> could be different. Out side of valid video area, gralloc buffer could be
> rendered like "mosaic". But it is outside of valid video area, compositor
> does composition by setting clip area. Then, these invalid area is not
> rendered on display. Similar problem was fixed by Bug 994889.

Since the patch of Bug 994889 didn't land into 1.4 branch. I'd apply this patch locally ,and it turns out that the issue has improved. In other words, with this patch, This bar showed on dolphin is as thin as flame. Would you suggest I mark 1.4 affected in Bug 994889 and keep further tracking?
Flags: needinfo?(vliu) → needinfo?(sotaro.ikeda.g)
Attached image masaic.png
Flags: needinfo?(lin.hui)
Attached image masaic1.png
Attached image masaic2.png
(In reply to Sotaro Ikeda [:sotaro] from comment #7)
> lin.hui, can you provide a screenshot of the problem?

Hi Sotaro:
  I've uploaded a screenshot, you can see from the attachment, thanks!
Status: NEW → ASSIGNED
Hi Lin.hui -

Could you try the following patch to see if you can still observe the Mosaic?

https://bug994889.bugzilla.mozilla.org/attachment.cgi?id=8408323

Thanks for your help

Vance
Flags: needinfo?(lin.hui)
(In reply to Vance Chen [:vchen][vchen@mozilla.com] from comment #23)
> Hi Lin.hui -
> 
> Could you try the following patch to see if you can still observe the Mosaic?
> 
> https://bug994889.bugzilla.mozilla.org/attachment.cgi?id=8408323
> 
> Thanks for your help
> 
> Vance

Hi Vance:

    I have checked the patch, mosaic effect has decreased, but on youtube, the bottom of some video interface remains one millimeter of mosaics, and in gaia video seems to introduce new problems in the list interface, some thumbnails appear at the top a green bar, there are screenshots, please recheck it,thanks a lot!
Flags: needinfo?(lin.hui)
Attached image green bar_thumbnail.png
Green bar thumbnail seems similar to Bug 1079251 and Bug 1075077. The offset of cb/cr channel seems not correct. I am not sure which code path in GrallocImage is used on dolphin.
Flags: needinfo?(sotaro.ikeda.g)
Depends on: 994889
> Since the patch of Bug 994889 didn't land into 1.4 branch. I'd apply this
> patch locally ,and it turns out that the issue has improved. In other words,
> with this patch, This bar showed on dolphin is as thin as flame. Would you
> suggest I mark 1.4 affected in Bug 994889 and keep further tracking?

I just nominated Bug 994889 to "b2g-v1.4+".
(In reply to Sotaro Ikeda [:sotaro] from comment #26)
> Green bar thumbnail seems similar to Bug 1079251 and Bug 1075077. The offset
> of cb/cr channel seems not correct. I am not sure which code path in
> GrallocImage is used on dolphin.

It might be better to handle the thumbnail problem in another new bug.
If some problems still exists even when Bug 994889 is applied, composition side might have a problem. If rendering area is a bit larger than the expected size, a similar problem could happen.
(In reply to Sotaro Ikeda [:sotaro] from comment #29)
> If some problems still exists even when Bug 994889 is applied, composition
> side might have a problem. If rendering area is a bit larger than the
> expected size, a similar problem could happen.

Or, scaling is a bit smaller than necessary.
(In reply to Sotaro Ikeda [:sotaro] from comment #26)
> Green bar thumbnail seems similar to Bug 1079251 and Bug 1075077. The offset
> of cb/cr channel seems not correct. I am not sure which code path in
> GrallocImage is used on dolphin.

For thumbnail case on dolphin, the code path should go with below line.

https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/file/aae7c12029c2/gfx/layers/GrallocImages.cpp#l286
> For thumbnail case on dolphin, the code path should go with below line.
> 
> https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/file/aae7c12029c2/gfx/
> layers/GrallocImages.cpp#l286

related functions are only GraphicBuffer::lockYCbCr() and ConvertYVU420SPToRGB565(). From the symptom, cr/cb address offset seems not correct. Offset of Y size seem not correctly calculated. From it, it might be better to check if GraphicBuffer::lockYCbCr()'s cb/cr addresses are correct. Its actual implementation exists in gralloc hal implementation.

And it might be helpful to read ColorConverter's implementation. It should do correct color conversion.
(In reply to Sotaro Ikeda [:sotaro] from comment #32)
> 
> related functions are only GraphicBuffer::lockYCbCr() and
> ConvertYVU420SPToRGB565(). From the symptom, cr/cb address offset seems not
> correct.

Hw decoder often add additional restriction to video data alignment. Therefore, even when color format says YUV420SP, it might not be same to standard color format. Alignment and stride of YCbCr might have some additional restrictions. It is a hardware dependent thing.
blocking-b2g: 1.4? → ---
Hi Vance & Sotaro:
  -This issue currently has new progress? 
  -Can it be solved? 
  -Look forward to your reply. 
  -Thanks a lot!
Flags: needinfo?(vchen)
Flags: needinfo?(sotaro.ikeda.g)
(In reply to lin.hui@spreadtrum.com from comment #34)
> Hi Vance & Sotaro:
>   -This issue currently has new progress? 
>   -Can it be solved? 
>   -Look forward to your reply. 
>   -Thanks a lot!

Hi Lin hui -

Could you help to check first to see if the patch of Bug 1079251 and Bug 1075077 can help to solve the problem you observed? As Comment#31 mentioned, it should go to :

https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/file/aae7c12029c2/gfx/layers/GrallocImages.cpp#l286

Please ni me and Vincent if you have any problem applying the patch

Thanks
Flags: needinfo?(vchen)
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(siiaceon.cao)
(In reply to Vance Chen [:vchen][vchen@mozilla.com] from comment #35)
> (In reply to lin.hui@spreadtrum.com from comment #34)
> > Hi Vance & Sotaro:
> >   -This issue currently has new progress? 
> >   -Can it be solved? 
> >   -Look forward to your reply. 
> >   -Thanks a lot!
> 
> Hi Lin hui -
> 
> Could you help to check first to see if the patch of Bug 1079251 and Bug
> 1075077 can help to solve the problem you observed? As Comment#31 mentioned,
> it should go to :
> 
> https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/file/aae7c12029c2/gfx/
> layers/GrallocImages.cpp#l286
> 
> Please ni me and Vincent if you have any problem applying the patch
> 
> Thanks

Hi Vance:
  I checked the patch you provided, but they are v2.0 or later. And V1.4 version logic is different, there is a big difference. So it can not applying the patch, could you provide v1.4 patch for me?
  Thanks for your help.
Flags: needinfo?(vchen)
Hi Vincent -

Could you kindly provide some suggestions for Lin hui regarding how to apply the patch of Bug#1079251 and Bug#1075077?

Thanks

Vance
Flags: needinfo?(vchen) → needinfo?(vliu)
Does the green line issue still exist? I couldn't reproduce this issue with today's sync.
Flags: needinfo?(vliu)
Hi Vincent - 

Are you using the newest 1.4?

Thanks
Flags: needinfo?(vliu)
(In reply to Vance Chen [:vchen][vchen@mozilla.com] from comment #39)
> Hi Vincent - 
> 
> Are you using the newest 1.4?
> 
> Thanks

I'd sync to latest on v1.4, but I still can't see green-line issue. The issue I can only see is mosaic on Youtube. I'd attached a patch which came from bug 994889 for 1.4 branch.
Flags: needinfo?(vliu)
(In reply to Vincent Liu[:vliu] from comment #40)
> Created attachment 8508471 [details] [diff] [review]
> patch-for-bug-994889-v1.4.patch
> 
> (In reply to Vance Chen [:vchen][vchen@mozilla.com] from comment #39)
> > Hi Vincent - 
> > 
> > Are you using the newest 1.4?
> > 
> > Thanks
> 
> I'd sync to latest on v1.4, but I still can't see green-line issue. The
> issue I can only see is mosaic on Youtube. I'd attached a patch which came
> from bug 994889 for 1.4 branch.

Hi Vincent -

Guess there are some misunderstandings here. The greenline will appear only after you apply the 994889 patch for the Mosaic issue.

As Comment#24 mentioned, the greenline is introduced by the patch of 994889. And in Comment#26 Sotaro suggest to try patch of Bug#1079251 and Bug#1075077 for the greenline issue

So the current situation is, Lin Hui don't know how to apply patch of Bug#1079251 and Bug#1075077, since they are not for 1.4 or 2.0

Is there any way you can help on that?
Flags: needinfo?(vliu)
Attached image screencap-dolphin.png
(In reply to Vance Chen [:vchen][vchen@mozilla.com] from comment #41)

> 
> Hi Vincent -
> 
> Guess there are some misunderstandings here. The greenline will appear only
> after you apply the 994889 patch for the Mosaic issue.
> 
> As Comment#24 mentioned, the greenline is introduced by the patch of 994889.
> And in Comment#26 Sotaro suggest to try patch of Bug#1079251 and Bug#1075077
> for the greenline issue
> 

Actually I didn't see greenline after applying the patch of bug 994889. Please see the attached png file.
Flags: needinfo?(vliu)
(In reply to Vincent Liu[:vliu] from comment #42)
> Created attachment 8508531 [details]
> screencap-dolphin.png
> 
> (In reply to Vance Chen [:vchen][vchen@mozilla.com] from comment #41)
> 
> > 
> > Hi Vincent -
> > 
> > Guess there are some misunderstandings here. The greenline will appear only
> > after you apply the 994889 patch for the Mosaic issue.
> > 
> > As Comment#24 mentioned, the greenline is introduced by the patch of 994889.
> > And in Comment#26 Sotaro suggest to try patch of Bug#1079251 and Bug#1075077
> > for the greenline issue
> > 
> 
> Actually I didn't see greenline after applying the patch of bug 994889.
> Please see the attached png file.


Dear Vincent:
    I See the attachment you provided, your video are almost created by camera, those video does not appear green stripes, and other non-captured video, after playing the video, there will be a green stripe, Please verify again.
    After applying the patch of bug 994889 in FFOS_v1.4, Please click on the thumbnail to play the video(not created by camera), and then return to the video list to see if there is a green stripe?
    Thanks!
Flags: needinfo?(vliu)
After playing the first video clips which is not recorded by camera and then back to thumbnail, I still not seeing green line.
Flags: needinfo?(vliu)
Dear Vincent:
   I have provided a video resources, you can use these for further testing, resource Address:

      http://pan.baidu.com/s/1bntmlVD
   
   I‘m so sorry to trouble you again!
Flags: needinfo?(vliu)
Attached image screenshot.png
(In reply to lin.hui@spreadtrum.com from comment #45)
> Dear Vincent:
>    I have provided a video resources, you can use these for further testing,
> resource Address:
> 
>       http://pan.baidu.com/s/1bntmlVD
>    
>    I‘m so sorry to trouble you again!

I tried to push the files you offered, and I still can't see greenline in thumbnail before and after playing one of these files.
Flags: needinfo?(vliu)
(In reply to Vincent Liu[:vliu] from comment #46)
> Created attachment 8509168 [details]
> screenshot.png
> 
> (In reply to lin.hui@spreadtrum.com from comment #45)
> > Dear Vincent:
> >    I have provided a video resources, you can use these for further testing,
> > resource Address:
> > 
> >       http://pan.baidu.com/s/1bntmlVD
> >    
> >    I‘m so sorry to trouble you again!
> 
> I tried to push the files you offered, and I still can't see greenline in
> thumbnail before and after playing one of these files.

Dear Vincent:
  We conducted a number of checks on the patch, there still has been a green stripe, so I guess whether mozilla V1.4 with SPRD V1.4 different cause?
  Thanks for your help.
Duplicate of this bug: 1077233
(In reply to Vincent Liu[:vliu] from comment #46)
> Created attachment 8509168 [details]
> screenshot.png
> 
> (In reply to lin.hui@spreadtrum.com from comment #45)
> > Dear Vincent:
> >    I have provided a video resources, you can use these for further testing,
> > resource Address:
> > 
> >       http://pan.baidu.com/s/1bntmlVD
> >    
> >    I‘m so sorry to trouble you again!
> 
> I tried to push the files you offered, and I still can't see greenline in
> thumbnail before and after playing one of these files.


Dear Vincent:
  I am so sorry to trouble you again.
  I think you need to try to play other video I provided, and then observe whether there will be a greenline, we applied the patch(patch-for-bug-994889-v1.4.patch) you provided in plurality of versions, there are still greenline.
  And you say ”still can't see greenline in thumbnail before and after playing one of these files“,If this is the case,where do you think would be a problem?
Flags: needinfo?(vliu)
As I know there are some patches in sprd folder in your mainifest file. Currently we don't apply these patches. I guess that's the different part between us. You might try to figure out from these difference.
Flags: needinfo?(vliu)
Firefox OS is not being worked on
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.