libstagefright video decoding renders frame with gray borders

RESOLVED INCOMPLETE

Status

()

Core
Audio/Video
RESOLVED INCOMPLETE
6 years ago
3 years ago

People

(Reporter: cajbir, Assigned: cajbir)

Tracking

Trunk
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:-)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Some MP4 videos rendered with the libstagefright backend have grey borders around the video.

Steps to reproduce:

1) Visit http://cd.pn/b2
2) Play video

Results:

1) Video plays but with grey border on the bottom of the video

What should result:

1) Full frame shown with no gray border

The border does not appear when playing on android with the Android browser. I can't test in Fennec since it doesn't support MP4.
(Assignee)

Updated

6 years ago
blocking-basecamp: --- → ?
blocking-kilimanjaro: --- → ?
(Assignee)

Updated

6 years ago
Assignee: nobody → chris.double
Status: NEW → ASSIGNED
(Assignee)

Comment 1

6 years ago
Created attachment 635164 [details] [diff] [review]
Support crop rectangles in video payback
Attachment #635164 - Flags: review?(eflores)
Comment on attachment 635164 [details] [diff] [review]
Support crop rectangles in video payback

Review of attachment 635164 [details] [diff] [review]:
-----------------------------------------------------------------

::: media/omx-plugin/OmxPlugin.cpp
@@ +391,5 @@
> +    mVideoCropHeight = cropBottom - cropTop + 1;
> +  }
> +
> +  mVideoWidth = mVideoCropWidth;
> +  mVideoHeight = mVideoCropHeight;

Do we really need mVideoCrop{Width,Height} if we're doing this?

r+ on fix/clarification.
Attachment #635164 - Flags: review?(eflores) → review+
What devices does this effect?
Does this still occur?

It only blocks basecamp if it occurs on Otoro devices running B2G. Please renominate if that's the case.
blocking-basecamp: ? → -
blocking-kilimanjaro: ? → ---

Comment 4

6 years ago
bug 766395 is blocking this bug, as mp4 playback still does not work.
Blocks: 766395
(Assignee)

Comment 5

6 years ago
The code this patch affects has been completely rewritten in bug 759506. One that bug is complete we'll retest to see if the issue still exists. It currently affects all B2G devices that use hardware decoders, including Otoro.
Depends on: 759506
(In reply to Edwin Flores [:eflores] [:edwin] from comment #2)
> Comment on attachment 635164 [details] [diff] [review]
> Support crop rectangles in video payback
> 
> 
> ::: media/omx-plugin/OmxPlugin.cpp
> @@ +391,5 @@
> > +    mVideoCropHeight = cropBottom - cropTop + 1;
> > +  }
> > +
> > +  mVideoWidth = mVideoCropWidth;
> > +  mVideoHeight = mVideoCropHeight;
> 
> Do we really need mVideoCrop{Width,Height} if we're doing this?
> 

Until gingerbread, "kKeyWidth" and "kKeyHeight" metadata say "video width" and "video height". But from ICS(Honycomb), meanings of some metadata were changed within stagefright like following without notice...

"kKeyWidth" -> decoded video buffer width
"kKeyHeight" -> decoded video buffer height
"kKeyCropRect" -> valid video rect area 

Until gingerbread, there were 2 interfaces to draw video. "push buffer surface" and "Overlay". After ICS(Honycomb), the interfaces are unified into one interface "ANativeWindow". I assume that it caused the metadata-change.

In ICS, stagefright calculate video width and height like following.
http://androidxref.com/4.0.4/xref/frameworks/base/media/libstagefright/AwesomePlayer.cpp#980

http://androidxref.com/4.0.4/xref/frameworks/base/media/libstagefright/colorconversion/SoftwareRenderer.cpp#33
doublec, do you have a device for investigating this bug?

kbrosnan lent me an HTC Desire HD running GB 2.3.5 that supposedly reproduced this issue, but I can't get the phone to play your http://cd.pn/b2 test video (even with the stagefright.force-enabled=true pref).
(Assignee)

Comment 8

5 years ago
Any device that plays H.264 video should show it.
(Assignee)

Comment 9

4 years ago
Does this still occur?
(Assignee)

Comment 10

3 years ago
No reply to comment 9. Please open a new bug if it still occurs.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.