Closed Bug 762697 Opened 12 years ago Closed 9 years ago

libstagefright video decoding renders frame with gray borders

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE
blocking-basecamp -

People

(Reporter: cajbir, Assigned: cajbir)

References

Details

Attachments

(1 file)

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.
blocking-basecamp: --- → ?
blocking-kilimanjaro: --- → ?
Assignee: nobody → chris.double
Status: NEW → ASSIGNED
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: ? → ---
bug 766395 is blocking this bug, as mp4 playback still does not work.
Blocks: 766395
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).
Any device that plays H.264 video should show it.
Does this still occur?
No reply to comment 9. Please open a new bug if it still occurs.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: