intel / libyami-utils

Libyami Utilities
Apache License 2.0
24 stars 45 forks source link

jpegd: skip APP payloads while scanning for start code #105

Closed uartie closed 6 years ago

uartie commented 6 years ago

JPEG APP payloads are notorious for having SOI and EOI markers in them. Thus skip over their payloads so we don't erroneously return an invalid decode unit/image.

VIZ-8219

Signed-off-by: U. Artie Eoff ullysses.a.eoff@intel.com

xuguangxin commented 6 years ago

@uartie , this will force the user to skip app play load, will this create a problem for the really user? Is it possible handling the app payload well in libyami?

uartie commented 6 years ago

@xuguangxin the APP "payload" only holds application-specific metadata in a JPEG image. We need to skip it at this level to properly split JPEG/MJPEG bitstreams on "actual" SOI/EOI markers. The whole image (including APP payload) is still passed into the decoder/parser to be handled.

uartie commented 6 years ago

In other words, SOI and EOI bytes in an APP payload are not real JPEG markers. The problem was that the image/frame splitter in yamidecode was treating them as "real" markers.

uartie commented 6 years ago

@xuguangxin any update?

xuguangxin commented 6 years ago

hi @uartie , thanks for explaining. It's clear to me know