bugGnash - The GNU Flash player - Bugs: bug #34625, Bogus interpretation of 15-bit RGB...

 
 

bug #34625: Bogus interpretation of 15-bit RGB bitmaps (wrong colors in Camtasia videos)

Submitter:  Gabriele Giacone <gg0>
Submitted:  Sun 23 Oct 2011 01:53:38 AM UTC
   
 
Category:  parser Severity:  3 - Normal
Release:  master Status:  Fixed
Privacy:  Public Assigned to:  strk
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 10 Mar 2012 04:06:59 PM UTC, comment #11: 
Sandro Santilli <strk>
Group Member
Sat 10 Mar 2012 03:00:02 PM UTC, comment #10: 


Test added:
http://git.savannah.gnu.org/cgit/gnash.git/commit/?id=135f254

Next stop: write a text runner

I noticed gnash still renders it slightly wrong (there's an artefact on the boundary)

Sandro Santilli <strk>
Group Member
Thu 16 Feb 2012 04:10:30 PM UTC, comment #9: 
Gabriele Giacone <gg0>
Group Member
Sun 23 Oct 2011 02:49:24 PM UTC, comment #8: 

Fixed by cc0432d
http://git.savannah.gnu.org/cgit/gnash.git/commit/?id=cc0432d

Still needs an automated testcase.

Sandro Santilli <strk>
Group Member
Sun 23 Oct 2011 01:52:46 PM UTC, comment #7: 

Indeed the 16bit interpretation should be 15bit instead!
I have a working patch locally, just need to increase luminosity (I guess it's the 5bit vs. 8bit which would require multiplication of the value by a factor).

In any case I'd like to have a testcase setup first.
The testcase should contain a palette of colors, including
the full red, green, blue ones and white (a few others are fine as long as they are easily computed numerically, like 128/128/0 and the like).

I'll need such bitmaps to be encoded with the LOSSLESS format 4 (aka 15bit) and used as bitmap fills for shapes.

A single bitmap with multiple colors would be fine.
A single shape will be fine too.
The shape must be rendered big enough for pixel checking to be
possible (each square or circle must allow for containing a circle with 5 pixel radius at least).

Sandro Santilli <strk>
Group Member
Sun 23 Oct 2011 12:36:03 PM UTC, comment #6: 

Another possibility is that Gnash is write about no-palette and SWFTools is wrong, but the problem relies on interpretation of the color. This is a comment in gnash, on the code interpreting the colors:

       // How is the data packed??? Whoever wrote this was
       // just guessing here that it's 565!

This is in libcore/swf/DefineBitsTag.cpp:531

Sandro Santilli <strk>
Group Member
Sun 23 Oct 2011 12:33:49 PM UTC, comment #5: 

I was wrong, Gnash actually does have support for palette reading, but dosn't use it for the 16-bit case.

I guess it'd be time to prepare testcases for this.
The simplest testcase would be a single SWF with
different flavors of Bitmaps encoding, with simple colors,
with palette and no palette, and an accompaining test runner
using pixel checking.

Volunteers for this task ?

Sandro Santilli <strk>
Group Member
Sun 23 Oct 2011 12:31:50 PM UTC, comment #4: 

swfextract (from swftools) is unable to extract those bitmaps:

strk@gnash:/usr/src/gnash/tests/swf8$ swfextract -j 19145 IT_110929_xPC.swf
Object 19145 is not a JPEG picture!
strk@gnash:/usr/src/gnash/tests/swf8$ swfextract -p 19145 IT_110929_xPC.swf
Can't handle 16-bit palette images yet (image 19145)

Bitmap format 4 (as reported by Ming) means 16-bit RGB according to Gnash, but 16-bit palette according to swfextract.

Gnash surely doesn't support any palette, threating the 16-bit version like the 24-bit one (RGB).

Sandro Santilli <strk>
Group Member
Sun 23 Oct 2011 12:25:40 PM UTC, comment #3: 

The SWF contains custom tags (tag id: 700) which seem to be used to advertise the version of the software used:

  TechSmit h Camtasia Studio 7.1.1

The video seems to be implemented by a sequence of bitmap fills, bitmaps being LOSSLESS (format 4).

Sandro Santilli <strk>
Group Member
Sun 23 Oct 2011 12:16:56 PM UTC, comment #2: 

The video was produced with http://www.techsmith.com/camtasia/

Sandro Santilli <strk>
Group Member
Sun 23 Oct 2011 12:04:48 PM UTC, comment #1: 

from the original bug item:

> the sound come out fine but the colors are somehow "inverted".


This is an SWF8, might be using bitmap filters (but I didn't check).

Sandro Santilli <strk>
Group Member
Sun 23 Oct 2011 01:53:38 AM UTC, original submission:  


Forwarding http://bugs.debian.org/634867

Attached debug script to reproduce it.

Gabriele Giacone <gg0>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24188:  gnash-debug-6.sh added by gg0 (907B - text/x-sh)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by gg0
  • -email is unavailable- added by gg0 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-03-10 strk StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2011-10-23 strk StatusIn Progress Ready For Test
    2011-10-23 strk Categoryrenderer parser
        Summarywrong colors Bogus interpretation of 15-bit RGB bitmaps (wrong colors in Camtasia videos)
    2011-10-23 strk StatusConfirmed In Progress
        Assigned toNone strk
    2011-10-23 strk CategoryNone renderer
        StatusNone Confirmed
    2011-10-23 gg0 Carbon-Copy- Added -email is unavailable-
    2011-10-23 gg0 Attached File- Added gnash-debug-6.sh, #24188

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code