[Verse-dev] Bug in bitmap node?

Jiří Hnídek jiri.hnidek at tul.cz
Sun Feb 5 13:20:47 CET 2006


Hi Emil,
your solution is right but it isn't perfect, because you fill space
outside of border with zeros:

if((uint32) tile_x == node->partial_tile_col ||
	(uint32) tile_y == node->partial_tile_row)
		clear_outside(node, tile_x, tile_y, type, data);

... when verse client ignore space outside of border, then you can
rewrite useful data received from client with zeros (when verse client
expect, that verse server does optimization).

We should write in specification, that verse clients have to fill space
outside of border with zeros and don't expect, that verse server do any
optimization!

It wouldn't be too hard to find, if verse client doesn't send data
outside of border filled with zeros ... but it would be hard to get data
to right order in such tile.

... I will do necessary changes in verse-plugin now.

Best regards

Jiri

> Jiří Hnídek wrote:
>> Hi,
>> I propably found bug in verse bitmap node, but I'm not sure. When I
>> received tiles from verse server and width of image wasn't integer
>> multiples of the tile side length (8), then I received damaged data from
>> tiles on right border.
>>
>> You can read this:
>>
>> "Any pixels in a tile that fall outside of the bitmap itself will not be
>> stored and should transmitted as zeroes when transmission is at all
>> required."
>>
>> in core specification:
>>
>> http://verse.blender.org/cms/fileadmin/verse/spec/n-bitmap.html
>>
>> ... when you ignore data outside of the bitmap, then everything is ok.
>> When you expect, that you will receive zeros, then you will have
>> problems (you will receieve damaged data in tiles on right border of
>> image). I noticed this problem only on right side of image
>> (x>image->width), not bellow image (y > image->height).
> 
> That's weird. But I think the problem is indeed there, and the server
> is not conforming to the specification. That's rather silly of it, so
> I wrote (and committed) a patch that changes it.
> 
> The patch simply sits in vs_node_bitmap.c, the server implemenation of
> the bitmap node, and clears any outside pixels in all *incoming* tiles.
> 
> It does this before the tile is stored, and thus any subsequent sending
> of that tile to a subscriber will send a cleaned version.
> 
> I've done some minimal testing and it looks like it's doing the right
> thing, but if you feel like taking a look at the code, that'd be
> appreciated too of course.
> 
> To be specific, I've only tested it with uploaded PNG images, not with
> e.g. the GIMP, but from the server's point of view there should be no
> difference, where an image comes from shouldn't matter.
> 
> Thanks for spotting and reporting this.
> 
> Regards,
> 
> /Emil
> _______________________________________________
> Verse-dev mailing list
> Verse-dev at projects.blender.org
> http://projects.blender.org/mailman/listinfo/verse-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jiri.hnidek.vcf
Type: text/x-vcard
Size: 383 bytes
Desc: not available
Url : http://projects.blender.org/mailman/private/verse-dev/attachments/20060205/7382bf09/jiri.hnidek.vcf


More information about the Verse-dev mailing list