Closed Bug 957525 Opened 12 years ago Closed 7 years ago

[Flatfish][Video] H264 MP4/3GPP Thumbnail color inverted

Categories

(Firefox OS Graveyard :: Gaia::Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ericcc, Unassigned)

References

Details

(Whiteboard: [flatfish][TCP=feature-p2])

Attachments

(5 files)

GECKO_REV=3a5c8b3e9cb12b868616997fd89cfdeec628292e GAIA_REV=45860a3651eb9f860c59f2273028f921f2ef338b GECKO_BRANCH=mozillaorg/master GAIA_BRANCH=mozillaorg/master BUILD_TAG=jenkins-B2G.master.flatfish-109 BuildID=20140108064521 1. Push some H264 MP4/3GPP files onto Flatfish 2. Open "Video". 3. Check thumbnail on the left. See ColorInvertedFlatfish.png
Attached image NormalThumbnailBURI.png
Flags: needinfo?(frlee)
hi John, are you able to check this issue?
Flags: needinfo?(frlee)
I need device to do the test.
This bug is caused by the drawImage API of canvas element with video element. The right panel of the attachment shows the canvas for creating the thumbnail. In this attachment, we can find the canvas draws the image with wrong color to the canvas. It looks like the color space of video and canvas are different and we use wrong settings to draw the video onto canvas. This may need to check with hardware codec and canvas element. BTW, this issue only happened to MP4 with h.264 codec. It works correctly with webm, 3gpp, and ogg files.
I have no idea about this bug. Please help to find graphics team and codec team to check this. BTW, I had showed this issue to jerry. It seems not a general r-g swapping bug but only related to specific codec.
Flags: needinfo?(frlee)
We might have r-b channel swap problem when we enable hardware composer, but we don't use hardware composer to render in this case. I think that might be other problem.
Video's color format is converted to RGB565 at GrallocImage::GetAsSurface(). The function seems not working correctly because of hw dependent reason. http://mxr.mozilla.org/mozilla-central/source/gfx/layers/GrallocImages.cpp
(In reply to Jerry Shih[:jerry] from comment #6) > We might have r-b channel swap problem when we enable hardware composer, but > we don't use hardware composer to render in this case. I think that might be > other problem. I can still see this issue even disabling hw composer in Settings app.
Hi John, Can you just provide a template app and just draw the thumbnail? I will try to trace the path of converting to RGB56 path.
Flags: needinfo?(johu)
It's possible. Please give me times to do that.
Flags: needinfo?(johu)
Attached file test app
Jerry, This is the test app which is based on template app, you know it. There are two buttons in it, play video and draw image. When play video is tapped, it loads video into Video element. When draw image is tapped, it uses offscreen video element to draw its screenshot on the canvas and attached to screen.
Jerry is checking on this, no need to ask francis
Flags: needinfo?(frlee)
One more thing: The difference is the globe icon at the left-bottom corner which should be "blue" but drawn as "orange". (In reply to John Hu [:johnhu] from comment #11) > Created attachment 8358251 [details] > test app > > Jerry, > > This is the test app which is based on template app, you know it. > > There are two buttons in it, play video and draw image. When play video is > tapped, it loads video into Video element. When draw image is tapped, it > uses offscreen video element to draw its screenshot on the canvas and > attached to screen.
Attached image 2014-04-26 13.49.52.jpg
Preview for normal gallery photos is fine (as you can see). Preview for videos in gallery appears with a purple hue
Whiteboard: [Flatfish only][developer+] → [flatfish][TCP]
Whiteboard: [flatfish][TCP] → [flatfish][TCP=feature-p2]
Blocks: flatfish
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: