[Bug 731773] pnmdec: unsupported bit depth is not checked
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Jun 25 07:56:50 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=731773
GStreamer | gst-plugins-bad | unspecified
Thiago Sousa Santos <thiagossantos> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #278654|none |needs-work
status| |
--- Comment #5 from Thiago Sousa Santos <thiagossantos at gmail.com> 2014-06-25 14:56:45 UTC ---
Review of attachment 278654:
--> (https://bugzilla.gnome.org/review?bug=731773&attachment=278654)
This patch only handles values outside of the range, it should actually convert
from the input range to 0-255 range.
::: gst/pnm/gstpnmdec.c
@@ +250,3 @@
+ for (i = 0; i < total_bytes; i++) {
+ if (omap.data[i] > s->mngr.info.max) {
+ omap.data[i] = 255;
This is not correct, it is only clamping values that are above the max to 255.
Imagine you have an input that has a maximum value of 16.
If a pixel has a value of 8 it should be mapped to 127 on the output.
IMHO it would be better to have something like:
if (s->mngr.info.max == 255) just memcpy
else { iterate all pixels doing the conversion from the input range to 0-255 }
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list