Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
19 crawler(s) on-line.
 148 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 DiscreetFX:  26 mins ago
 DWolfman:  35 mins ago
 cncparts:  2 hrs 9 mins ago
 saipaman4366:  2 hrs 55 mins ago
 Beajar:  3 hrs 14 mins ago
 Rob:  3 hrs 16 mins ago
 agami:  4 hrs 20 mins ago
 RobertB:  4 hrs 39 mins ago
 OlafS25:  5 hrs 29 mins ago
 Bruce72:  5 hrs 31 mins ago

/  Forum Index
   /  Amiga OS4.x \ Workbench 4.x
      /  DataType system big pictures not loadable?????
Register To Post

Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 Next Page )
PosterThread
Futaura 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 11:45:47
#41 ]
Regular Member
Joined: 10-May-2004
Posts: 253
From: UK

Quote:

NutsAboutAmiga wrote:
@Karlos

Should be easy to fix, just a few extra properties 32bit BytePerRow32 to BitMap and RenderInfo.

I don't believe the BitMap structure even needs to be touched - it should only ever be used for classic "native" 8-bit or less bitmaps anyway, so is irrelevant. All bitmaps allocated through rtg.library should be using a different private structure anyway, and the relevant graphics.library functions used to access that bitmap -this was added for OS3.0 after all, so it's not exactly a new concept.

As for RenderInfo, it's only used by p96ReadPixelArray and p96WritePixelArray externally I think, but if used internally by Picasso96, then it's not going to be so easy to change.

I'm also wondering whether AllocBitMap() should really fail in such cases where a friend bitmap was supplied - if it fails, perhaps it should retry as if a friend bitmap was not supplied. Or maybe that should be the application's responsibility.

_________________
IBrowse, AmiSSL and Warp Datatype Developer

 Status: Offline
Profile     Report this post  
Georg 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 11:45:47
#42 ]
Regular Member
Joined: 14-May-2003
Posts: 451
From: Unknown

@Karlos

Quote:
The graphics.library BitMap structure uses 16-bit unsigned integers to describe the number of rows and bytes per row of an image. That second figure is the width of the BitMap multiplied by however many bytes it takes to represent one pixel.


The BytesPerRow field in BitMap structure is really only for very old (< OS 3..x) apps which only know about planar bitmaps and therefore (at least in AROS) does not contain the real bytes per row used/needed by chunky/hicolor/truecolor/argb bitmaps but instead always ~ align16(bitmapwidth) / 8. So it's always a lot smaller than bitmap width.

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 13:19:02
#43 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

@Futaura

Quote:

Futaura wrote:
Quote:

NutsAboutAmiga wrote:
@Karlos

Should be easy to fix, just a few extra properties 32bit BytePerRow32 to BitMap and RenderInfo.

I don't believe the BitMap structure even needs to be touched - it should only ever be used for classic "native" 8-bit or less bitmaps anyway, so is irrelevant. All bitmaps allocated through rtg.library should be using a different private structure anyway, and the relevant graphics.library functions used to access that bitmap -this was added for OS3.0 after all, so it's not exactly a new concept.


I know, it's a legacy structure, but the point is that there may still be parts of the graphics.library that enforce the limit it imposed, even if the allocator and other functions are patched by rtg.library and a private structure with it's own BitMap area properties is used.

You'd need to test whether or not the image can be opened on the same card running under p96 under OS3.x too. If you can, then the problem is probably elsewhere. If you can't, then it's possible that this 32768 restriction was never patched out.

Quote:
As for RenderInfo, it's only used by p96ReadPixelArray and p96WritePixelArray externally I think, but if used internally by Picasso96, then it's not going to be so easy to change.

I'm also wondering whether AllocBitMap() should really fail in such cases where a friend bitmap was supplied - if it fails, perhaps it should retry as if a friend bitmap was not supplied. Or maybe that should be the application's responsibility.


Well, the main reason I've ever used a friend BitMap was to clone the format of a BitMap associated with a visible display, either to allocate buffers or to ensure an offscreen window buffer was suitable for a direct hardware blit to the screen. In the instances I was using it, I absolutely want it to fail if that isn't possible, since the performance of CPU driven blits from FastRAM to VRAM would render my application unusable in any case.

If it was just a static picture viewer I was working on, however, I might want it to succeed. In that case though, I'd much more likely allocate a BitMap in the same format as the source data (if possible) and perform whatever colourspace conversion is needed when transferring the visible portion of it. If you are going to be stuck with bus-transfer limited bandwidth anyway, you might as well do whatever conversion work is required in a very small buffer (as big as the widest aligned write you can make to successive VRAM locations) and hide the cost of conversion behind that latency.

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 13:39:50
#44 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

Anyway, even if the legacy 32768 limit is not imposed, you still have to put up with any hardware restrictions.

For example, the vast majority of "ideal" set of divisible by 16 widths that the rtg.library cares about are most assuredly not supported on all hardware. Taking Permedia2 again as an example, only widths divisible by 32 are supported and even then, once you get past 320 pixels wide, you start running into unsupported multiples of 32. That's because the hardware registers use 3 successive 3-bit fields to express the width as the sum of 3 "partial products" (shifts of 32) and not a simple integer value.

Picasso96 requires each chip driver to implement a function that calculates the bytes per row required for a given input width for any bitmap that can be rendered to by the hardware. That function should respect any and all limitations imposed by the hardware.

I don't know what the restrictions are for R200 (other than the bytes-per-row is divisible by 8), but if there is a maximum width for a displayable surface, you can expect displayable BitMap allocations to fail if you exceed it, unless the driver is broken, at any rate.

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 14:31:57
#45 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2341
From: Perugia, ITALY

@Karlos

interesting...
However that problems wasnt ehrer in MOS2.7 and all the images works pretty good...other than faster tnah on OS4 oin same machin...so why?

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 15:05:48
#46 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

@Tuxedo

As handy as that is to know, it doesn't really help identify the specific problem. MorphOS is a different OS with a different RTG system and probably a different implementation of Datatypes too. Without being privy to the implementation details of it, we can't even rule out hardware limitations since how the two systems use the hardware is important.

Basically, the problem could be anywhere in the following non-exhaustive list:

1) the specific datatype class needed to decode the format
2) the picture.datatype class itself
3) applications using datatypes (unless using the same 68K app on both systems, for instance)
4) the Picasso96 RTG system generally
5) the specific hardware driver for the chip/board
6) some unpatched/forgotten area of graphics.library

Any one of these could have a limit set on the width/height of the data or even temporarily run out of, or fail to allocate sufficient resources (memory, video memory) during some private operation.

To help identify where the issue is, you could try some meaningful test scenarios.

* Can you, for example, load very wide images (8192 or wider), provided they are very small (say only 8 pixels) vertically?

* Can you load the large image when using a lower resolution screenmode, particularly in 15/16-bits ?

Either of the above would point to a lack of memory for some operation, be that video RAM or system RAM for some temporary buffer or other.

* Can you load wider images provided they are stored in a different format?

That might indicate a problem with the specific datatype.

* Can you not load any image wider than 8192, irrespective of height, depth, screemode, datatype format, etc?

That might indicate a problem with either RTG or a limitation of the implementation of the RTG system on the given hardware.

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 17:24:21
#47 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2341
From: Perugia, ITALY

@Karlos

I made some tests of loading:

- I tryed to load the moon image resized on 88 height size and AmigaOS4.x CANT load it (tryed jpg, iff, png, bmp)

- I CAN load the image (I tryed jpg, bmp, iff, png) if I use 16bit screenmode

I made some speed test under AmigaOS4.1.4 and MOS2.7 since I can use both on same hw (Pegasos2 G4@1131 Radeopn9000pro), (since same hw HAVE to give similar performaces to the user I think):

I trye the imageconvert(same options described earlyer in that thread) program by wanderer and get:

- Under AmigaOS4.x I CANT load the big moon image neither in 16bit screenmode(that's weird since now multiview can load it no?)

- Under MOS I can load it and get load time of 4.007 secs

- with the image, that I can load on both AmigaOS4.1.4 and MOS 2.7 I get:


- MOS 2.7 : 3.176 secs
- AOS 4.1.4 : 4.368 secs

Same pic opened with LoView(so same hollywood player compiled under differnet OSes):


- MOS 2.7 : 4.1 secs
- AOS 4.1.4 : 5.2 secs

So about 1 sec more than the imageconvert load time... I think because maybe Hollywood load the image also to be displayed and imageconvert only decode it...

However the differnce wasnt so big here and in line with the other time differences I measured in other occasions, the real difference was in loading BIG files like the moon where I get times about doubled also considering that moon image will load under MOS in less than a sec more than the other(that was about half Mpx)


Left behind that time problems, I hope my tests on loading images under different screen depth and the imageconvert one can help you figuring out what's the difference.

Last edited by Tuxedo on 08-Jan-2012 at 05:26 PM.
Last edited by Tuxedo on 08-Jan-2012 at 05:25 PM.

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
itix 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 17:34:29
#48 ]
Elite Member
Joined: 22-Dec-2004
Posts: 3398
From: Freedom world

@Karlos

Quote:

MorphOS is a different OS with a different RTG system and probably a different implementation of Datatypes too. Without being privy to the implementation details of it, we can't even rule out hardware limitations since how the two systems use the hardware is important.


You could always examine it running RTG on OS3. But Multiview in MorphOS can load images using Reggae (default) instead of dt system and it can be faster and efficient.

Quote:

1) the specific datatype class needed to decode the format
2) the picture.datatype class itself
3) applications using datatypes (unless using the same 68K app on both systems, for instance)
4) the Picasso96 RTG system generally
5) the specific hardware driver for the chip/board
6) some unpatched/forgotten area of graphics.library


7) memory speed (it can be different even on same machine)

_________________
Amiga Developer
Amiga 500, Efika, Mac Mini and PowerBook

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 17:42:36
#49 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

@Tuxedo

Quote:

Tuxedo wrote:
@Karlos

I made some tests of loading:

- I tryed to load the moon image resized on 88 height size and AmigaOS4.x CANT load it (tryed jpg, iff, png, bmp)

- I CAN load the image (I tryed jpg, bmp, iff, png) if I use 16bit screenmode


Already this makes me think it's a BytesPerRow issue somewhere in the chain of processes. Probably not in the datatype layer per se, unless it's in the root picture.datatype.

Quote:

I made some speed test under AmigaOS4.1.4 and MOS2.7 since I can use both on same hw (Pegasos2 G4@1131 Radeopn9000pro), (since same hw HAVE to give similar performaces to the user I think):

I trye the imageconvert(same options described earlyer in that thread) program by wanderer and get:

- Under AmigaOS4.x I CANT load the big moon image neither in 16bit screenmode(that's weird since now multiview can load it no?)


It's not necessarily weird. All this really tells us is that the two applications handle large images differently, regardless of any BPR restrictions in the system.

Quote:
- with the image,


PORN!

Quote:
that I can load on both AmigaOS4.1.4 and MOS 2.7 I get:


- MOS 2.7 : 3.176 secs
- AOS 4.1.4 : 4.368 secs

Same pic opened with LoView(so same hollywood player compiled under differnet OSes):


- MOS 2.7 : 4.1 secs
- AOS 4.1.4 : 5.2 secs

So about 1 sec more than the imageconvert load time... I think because maybe Hollywood load the image also to be displayed and imageconvert only decode it...

However the differnce wasnt so big here and in line with the other time differences I measured in other occasions, the real difference was in loading BIG files like the moon where I get times about doubled also considering that moon image will load under MOS in less than a sec more than the other(that was about half Mpx)


As I understand it, MorphOS 2.x makes quite pervasive use of AltiVec, which when used appropriately, should be able to give big performance boosts to things like image decoding and colourspace conversion. Given that most of the systems that OS4 presently runs on are without altivec units, it's probable that it's not making use of it everywhere it could.

Quote:
Left behind that time problems, I hope my tests on loading images under different screen depth and the imageconvert one can help you figuring out what's the difference.


Or at least help someone. I found the first test quite telling as the image shouldn't be big enough overall to exhaust the memory (being 88pixels tall). I am strongly suspecting some bit of code is expecting BPR

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 17:45:32
#50 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

@itix

Quote:

itix wrote:
@Karlos

Quote:

MorphOS is a different OS with a different RTG system and probably a different implementation of Datatypes too. Without being privy to the implementation details of it, we can't even rule out hardware limitations since how the two systems use the hardware is important.


You could always examine it running RTG on OS3. But Multiview in MorphOS can load images using Reggae (default) instead of dt system and it can be faster and efficient.


Oddly enough, I was just lamenting the shortcomings of DT over on moo. Reggae seems like the sort of idealized solution I was attempting to describe. No such thing as a new idea, huh?

Quote:

Quote:

1) the specific datatype class needed to decode the format
2) the picture.datatype class itself
3) applications using datatypes (unless using the same 68K app on both systems, for instance)
4) the Picasso96 RTG system generally
5) the specific hardware driver for the chip/board
6) some unpatched/forgotten area of graphics.library


7) memory speed (it can be different even on same machine)


I don't think memory speed is likely to have a bearing on the ability to load an image or not, only how quickly it does it.

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 18:08:32
#51 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2341
From: Perugia, ITALY

@Karlos

well...
Since all that speculations hope that someone at Hyperion devs will put hands in it since only them can solve that issue...

AltiVec opts was foundamental since X1000(and every future high end ppc cpu will) have it...
Also fixing that bad BPR issue will help making a more user-frienldy OS...

However maybe AmigaOS4 devs will solve all that things when WB and 2D graphic sytem will be redesigned...hope that soon...

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
itix 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 18:31:17
#52 ]
Elite Member
Joined: 22-Dec-2004
Posts: 3398
From: Freedom world

@Karlos

Quote:

Oddly enough, I was just lamenting the shortcomings of DT over on moo. Reggae seems like the sort of idealized solution I was attempting to describe. No such thing as a new idea, huh?


Yeah I just skimmed through moobunny to read it. It was good system in 1993, though. Too bad it has not been year 1993 for few years anymore

Quote:

I don't think memory speed is likely to have a bearing on the ability to load an image or not, only how quickly it does it.


Ah sorry I was thinking something different... I read it too fast.

_________________
Amiga Developer
Amiga 500, Efika, Mac Mini and PowerBook

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 8-Jan-2012 20:15:04
#53 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

@itix

It's still a good system if all you want is to moderate amounts of load data without writing the code for it yourself. It's the dimension of the image that seems to have defeated some once-reasonable-seeming limit. It's just clear that better implementations could be achieved. As one moobunnier observed, it was good idea, not-so-well implemented.

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 9-Jan-2012 21:50:03
#54 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

I'm going to test this on my Radeon and BVision with wide images that are small enough vertically not to require inordinate amounts of memory.

If it is a hard limit of 32768 on bytes per row then I would expect both to behave the same. If it is a limit derived from the hardware then the BVision should bomb out much sooner as it can't handle (as in display or render to) surfaces wider than 2048 pixels.

Finding out that there is a hardware limit in effect doesn't necessarily rule out some legacy ceiling elsewhere in the code, but the more information, the better.

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
AliveMOon 
Re: DataType system big pictures not loadable?????
Posted on 9-Jan-2012 22:08:49
#55 ]
Member
Joined: 10-Jan-2008
Posts: 64
From: Hungary

@Tuxedo

This image could not show on Google Chrome on WinXP.
Maybe something in common algorithm is used, many of which can not handle images around it.

_________________
My first prototype game.
Current work on this!

Things I want to buy:
An accelerator card for my A2000

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 9-Jan-2012 22:57:22
#56 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

Right, I have a set of test-case PNG images. There are 8 test case widths below:

1024
1536
2048
3072
4096
6144
8192
12288

All images are 16 pixels tall and exist in 8, 24 and 32-bit variants. I plan to test loading each on an 8, 16 and 32 bit display depths in multiview to see what problems may occur. Anybody else that fancies testing it can download an archive of the images here:

http://extropia.co.uk/bytes_per_row_test.lha

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 9-Jan-2012 23:13:04
#57 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2341
From: Perugia, ITALY

@Karlos

tryed :)

- in 32bit screen depth i can open with multiview only the images smaller than 8192 in any colordepth.

- in 16 bit screen depth I can open all the miages but:

- the 12288-24 and 12288-8 images was opened by multiview but I cant see nothing only greey multiview(of the right size) window as if no image was loaded, the info window reports correctly the dimension and depth of the image however...no problem for the 12288-32 that was correclty displayed

my system Pegaos2/Radeon9000pro

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 9-Jan-2012 23:15:30
#58 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

@Tuxedo

I suppose that's slightly better so far than my OS3.9 test which resulted in graphical corruption of window borders when attempting to open the widest one.

-edit-

On my A1 with R200, I can't open any of the 8192 or wider image in multiview on a 32-bit display. Multiview's title bar reports there's not enough memory. Clearly this is not actually the case, since the largest image (12288-32.png) requires 768KiB of RAM as a raw array of pixels.

In a 16-bit screenmode, I can open the 12288 wide 32-bit image no problem. I get the same grey as you for the 8 and 24-bit versions but there could be something wrong with their encoding.

Anyway, it seems clear that the limit is on bytes per row (somewhere) rather than absolute width, which is what I suspected from your earlier observation.

I now need to test this on my BVision in 4.1. If there are any limits on bytes per row imposed by the driver that are less than 32768, it should become obvious as the P2 can't handle bitmaps wider than 2048 pixels, giving an upper limit for bytes per row of 8192...

Last edited by Karlos on 09-Jan-2012 at 11:28 PM.
Last edited by Karlos on 09-Jan-2012 at 11:15 PM.

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 9-Jan-2012 23:18:56
#59 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2341
From: Perugia, ITALY

@Karlos

well...better yes but not so nice however :P

Why not tested on AmigaOS4.x?

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
Karlos 
Re: DataType system big pictures not loadable?????
Posted on 9-Jan-2012 23:31:14
#60 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

@TuxedoQuote:

Tuxedo wrote:
Why not tested on AmigaOS4.x?


I'm trying to ascertain if the issue pre-dates OS4. OS 3.x with Picasso96 on my mediator/voodoo system clearly has the same problem but doesn't have whatever error checking prevents said corruption in OS4.

-edit-

Same problem in 3.9/P96 on (E-)UAE here too, no errors, just corruption.

-/edit

I've tested it in 4.1 on my R200, see the above post.

Last edited by Karlos on 09-Jan-2012 at 11:33 PM.

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle