Closed Bug 1146221 Opened 9 years ago Closed 9 years ago

[Video][dolphin][FFOS7715 v2.1] fail to parse thumbnail. (caused by bug#1141936)

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
blocking-b2g 2.1S+
Tracking Status
b2g-v2.1 --- unaffected
b2g-v2.1S --- fixed
b2g-v2.2 --- unaffected
b2g-master --- unaffected

People

(Reporter: wchi, Assigned: wchi, Mentored)

References

Details

Attachments

(3 files)

After applying patch of bug#1141936, video app fails to parse thumbnail.
Attachment #8581417 - Flags: review?(vliu)
Attachment #8581417 - Attachment is patch: true
Attachment #8581417 - Attachment mime type: text/x-patch → text/plain
Assignee: nobody → wchi
Blocks: 1141936
Attached patch hg.patchSplinter Review
change OmxMapping of HAL_PIXEL_FORMAT_YCbCr_420_SP to zero to use ConvertVendorYUVFormatToRGB565()
Comment on attachment 8581417 [details] [diff] [review]
fix fail to parse video thumbnail.

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

LGTM.
Attachment #8581417 - Flags: review?(vliu) → review+
This patch intends for bug#1141936. 2.1s?
blocking-b2g: --- → 2.1S?
Flags: needinfo?(styang)
blocking-b2g: 2.1S? → 2.1S+
Flags: needinfo?(styang)
https://hg.mozilla.org/releases/mozilla-b2g34_v2_1s/rev/641335274d31
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
(In reply to wchi from comment #2)
> Created attachment 8581420 [details] [diff] [review]
> hg.patch
> 
> change OmxMapping of HAL_PIXEL_FORMAT_YCbCr_420_SP to zero to use
> ConvertVendorYUVFormatToRGB565()
Dear wenyuan:

After applying the new patch, the thumbnail display default issue and green stripe issue both fixed perfectly, really thanks for your help.

But I just want to know why are we should change OmxMapping of HAL_PIXEL_FORMAT_YCbCr_420_SP to zero to use ConvertVendorYUVFormatToRGB565(), What principle is about this? I want to learn from it, could you have some further detail discription?

Thank you so much!
Flags: needinfo?(wchi)
(In reply to lin.hui@spreadtrum.com from comment #6)
> (In reply to wchi from comment #2)
> > Created attachment 8581420 [details] [diff] [review]
> > hg.patch
> > 
> > change OmxMapping of HAL_PIXEL_FORMAT_YCbCr_420_SP to zero to use
> > ConvertVendorYUVFormatToRGB565()
> Dear wenyuan:
> 
> After applying the new patch, the thumbnail display default issue and green
> stripe issue both fixed perfectly, really thanks for your help.
> 
> But I just want to know why are we should change OmxMapping of
> HAL_PIXEL_FORMAT_YCbCr_420_SP to zero to use
> ConvertVendorYUVFormatToRGB565(), What principle is about this? I want to
> learn from it, could you have some further detail discription?
> 
> Thank you so much!

Hi Lin,

It is reported that there is a green bar in the image. It indicates that there could be something wrong about Y channel and UV channel position.

After digging, I found that the pointer of UV channel queried by GraphicBuffer::lockYCbCr() [1] is different than the pointer computed by libstagefright [2] 

Because of that, I think it is more reasonable to treat HAL_PIXEL_FORMAT_YCbCr_420_SP as a vendor specific format instead of OMX format. That is why I change the mapping to zero.

By doing so, we can use ConvertVendorYUVFormatToRGB565() to handle the vendor specific format. [3]

[1] http://mxr.mozilla.org/mozilla-b2g34_v2_1/source/gfx/layers/GrallocImages.cpp#228
[2] https://github.com/mozilla-b2g/platform_frameworks_av/blob/v2.1s/media/libstagefright/colorconversion/ColorConverter.cpp#L382
[3] http://mxr.mozilla.org/mozilla-b2g34_v2_1/source/gfx/layers/GrallocImages.cpp#404
Flags: needinfo?(wchi)
(In reply to wchi from comment #7)
> It is reported that there is a green bar in the image. It indicates that
> there could be something wrong about Y channel and UV channel position.
> 
> After digging, I found that the pointer of UV channel queried by
> GraphicBuffer::lockYCbCr() [1] is different than the pointer computed by
> libstagefright [2] 
> 
> Because of that, I think it is more reasonable to treat
> HAL_PIXEL_FORMAT_YCbCr_420_SP as a vendor specific format instead of OMX
> format. That is why I change the mapping to zero.
> 
> By doing so, we can use ConvertVendorYUVFormatToRGB565() to handle the
> vendor specific format. [3]
Thanks for your reply about my question, next I will learn this code related.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: