Click Here
home features news forums classifieds faqs links search
5853 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
73 crawler(s) on-line.
 18 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 zipper:  5 mins ago
 PhantomInterrogative:  9 mins ago
 mobileconnect2:  14 mins ago
 terminills:  33 mins ago
 matthey:  41 mins ago
 sTix:  43 mins ago
 LarsB:  44 mins ago
 eliyahu:  58 mins ago
 IRTheBorg:  1 hr 10 mins ago
 kolla:  1 hr 15 mins ago

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

Goto page ( 1 | 2 | 3 | 4 | 5 Next Page )
PosterThread
Tuxedo 
DataType system big pictures not loadable?????
Posted on 4-Jan-2012 22:31:27
#1 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2324
From: Perugia, ITALY

Hi ALL!
I noticed that big picture wasnt loadable since I get "out of memory" but with WarpView I load the image for example so no a memory problem...

I tryed with a 8804x8804 pictures:

http://photojournal.jpl.nasa.gov/jpeg/PIA08353.jpg

Anyone already know that issue or maybe know a solution?

Thank you!

Last edited by Tuxedo on 04-Jan-2012 at 10:32 PM.

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
number6 
Re: DataType system big pictures not loadable?????
Posted on 4-Jan-2012 22:39:42
#2 ]
Elite Member
Joined: 25-Mar-2005
Posts: 10888
From: In the village

@Tuxedo

Quote:
wasnt loadable


In -what- program?

#6

_________________
This posting, in its entirety, represents solely the perspective of the author.
*Secrecy has served us so well*

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 4-Jan-2012 22:43:42
#3 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2324
From: Perugia, ITALY

@number6

ALL programs that uses DataTypes for image loading...

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
number6 
Re: DataType system big pictures not loadable?????
Posted on 4-Jan-2012 22:50:31
#4 ]
Elite Member
Joined: 25-Mar-2005
Posts: 10888
From: In the village

@Tuxedo

Quote:
ALL programs that uses DataTypes for image loading


ok.

Last time we discussed this was here

Futaura suggested rtg.library.

Tetisoft suggested graphic card issue.

#6

_________________
This posting, in its entirety, represents solely the perspective of the author.
*Secrecy has served us so well*

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

@number6

since the picture was loaded fine by WarpView that dont uses DataTypes and also on MOS (same machine) I think was only a software issue (maybe picture.datatye cant hanlde so big pictures?), and so also because that was a VERY old bug I hope that someone from devs will fix that asap...

Was really annoing that I cant load an image also if I have the memory for that...

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
Futaura 
Re: DataType system big pictures not loadable?????
Posted on 4-Jan-2012 23:26:24
#6 ]
Regular Member
Joined: 10-May-2004
Posts: 231
From: UK

@number6

Well remembered! This image is much larger though, but it is only an 8-bit greyscale JPEG. 8804x8804 will equate to requiring at least 74Mb of graphics ram (I don't remember offhand, but if loaded on a 32-bit screenmode, this may possibly equate to an image bitmap requiring 296Mb) in order to fully load the image into a bitmap without any scaling. And at least this is not crashing like before - really it's down to a lack of ram, as the error message says.

I'm guessing WarpView loads images into its own internal raw image data buffers, and blits from these buffers to the screen to render the image, with any additional image processing modes enabled. This buffer can be held in fastram.

Picture.datatype also stores the original raw image data internally in its own buffers in fastram, but when it is displayed this will probably result in a 8804x8804x32 bitmap being created which will need graphics ram and therefore fail unless you are lucky enough to have 296Mb free graphics ram. However, such image data can still be loaded via datatypes and read by an application using the PDTM_READPIXELARRAY method, and rendered internally by that app. MysticView, for example, uses datatypes to load images and can display this large image scaled or a cropped section, whereas something like Multiview or IBrowse cannot because Picture.datatype allocates space for the entire image in graphics memory.

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 4-Jan-2012 23:58:52
#7 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2324
From: Perugia, ITALY

@Futaura

interesting...
However why simply MultiView didnt aso do that?
Was a bit "impossible" to display such pictures with it on AmigaOS4.x system currently... :P
Also because was really a waste of video ram loading all the image when at maximum we can have a fullhd display in general...

PS I noticed that your WarpJPG DT was about 15% faster that the orignial JPEG one but none in all pictures...any idea why?

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
Futaura 
Re: DataType system big pictures not loadable?????
Posted on 5-Jan-2012 23:17:33
#8 ]
Regular Member
Joined: 10-May-2004
Posts: 231
From: UK

@Tuxedo

Well, generally the whole point of datatypes is that the application doesn't have to worry about dealing with decoding and displaying images itself. And, Multiview is not just an image viewer, of course - it can display many different types of file. For images, Multiview always displays it at the original size without limitations, and the AmigaOS way of doing this is by using bitmaps which is the relevant primitive of the graphics system.

Probably, it ultimately comes down to fundamental differences between Picasso96 vs CyberGraphX, which directly translates to OS4 vs MOS in this instance. That's probably why loading large images works better on MOS. It certainly is a waste to locate huge bitmaps in video ram, when only a small portion is to be displayed on screen at a time. But, applications generally have no control over this.

It's all very reminiscent of the classic pre-gfxcard days where the 2Mb chipram limitation was a major issue. Again, in that case, bitmaps needed to be in chipram before they could be blitted to the display. IBrowse took extreme measures to avoid that by not using the OS to allocate bitmaps, and instead used custom code so that fastram could be used to store images instead. For IBrowse, I've many a time pondered whether it needs to do a similar thing on OS4 - it would certainly solve the problem, although really such things should be addressed in rtg.library.

The code base of the OS4 JPEG datatype is not so similar to WarpJPEG as it once was, so it does not surprise me that there are differences in speed. In particular, WarpJPEG uses the 8c version of the IJG JPEG code, whereas the OS4 datatype uses version 7, and this could easily account for differences depending on the image.

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 6-Jan-2012 10:10:46
#9 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2324
From: Perugia, ITALY

@Futaura

thank you for the extensive reply :)
In another thread we talk about an AltiVec optimised version of WarpJPEG, I remember that was some issues to have that, have you done any new work on that?

Have a good day.

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
Futaura 
Re: DataType system big pictures not loadable?????
Posted on 6-Jan-2012 16:48:47
#10 ]
Regular Member
Joined: 10-May-2004
Posts: 231
From: UK

@Tuxedo

There is no doubt that JPEG decoding can be accelerated using AltiVec, because Apple themselves apparently did modify the IJG jpeglib code to use AltiVec. Particularly the IDCT code would benefit from using AltiVec. However, this means rewriting large portions of the JPEG decoder, preferably in asm rather than C. As I think I said at the time, it's no good flipping the switch in GCC to use its own internal AltiVec optimisations as these bring virtually no speed increase. Unfortunately, although I know my way around PPC asm, AltiVec is beyond my knowledge . AFAIK, there is no source code available making use of AltiVec, in the official IJG jpeglib distribution or elsewhere.

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 6-Jan-2012 18:25:22
#11 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2324
From: Perugia, ITALY

@Futaura

Sad news :(
So neither from Linux or similar any AltiVec optimised JPG codec to look in?

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
gregthecanuck 
Re: DataType system big pictures not loadable?????
Posted on 6-Jan-2012 18:54:37
#12 ]
Cult Member
Joined: 30-Dec-2003
Posts: 844
From: Vancouver, Canada

@thread

Some useless trivia...

If I load this image into my IE browser, the memory footprint increases by approximately 227MB. This likely means a 24-bit internal image.


 Status: Offline
Profile     Report this post  
Futaura 
Re: DataType system big pictures not loadable?????
Posted on 6-Jan-2012 19:31:36
#13 ]
Regular Member
Joined: 10-May-2004
Posts: 231
From: UK

@Tuxedo

Google has yet to find anything for me, no

 Status: Offline
Profile     Report this post  
Wanderer 
Re: DataType system big pictures not loadable?????
Posted on 6-Jan-2012 19:41:25
#14 ]
Cult Member
Joined: 16-Aug-2008
Posts: 654
From: Germany

Just in case this is interesting for anybody (I haven't read the whole tread), under OS3.1 on my WinUAE the image loads fine via DT and needs 4,6 secs to load and 270MB of RAM (it is converted to 32bit ARGB).
I have used my ImageConverter for this test on an i5 Laptop.


Workbench:System> imageconverter desktop:/Pictures/PIA08353.jpg -w 128 -h 128 -od ram:
Loading file "desktop:/Pictures/PIA08353.jpg"...#-1
Time for loading: 4620ms
24Bit RGB
Resizing (8804x8804) => (128x128) using window interpolation (quality)...
Time for scaling: 4931ms
Saving image as "ram:_PIA08353.png" (PNG)
Time for saving: 24ms

Done.

_________________
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de

 Status: Offline
Profile     Report this post  
Tuxedo 
Re: DataType system big pictures not loadable?????
Posted on 6-Jan-2012 23:25:35
#15 ]
Elite Member
Joined: 28-Nov-2003
Posts: 2324
From: Perugia, ITALY

@Wanderer

I get that:


Loading file "ram:PIA08353.jpg"...#-1
image_Create : Unable to allocate ARGB bitmap! (8804x8804x32)
Unable to load image "ram:PIA08353.jpg"!
Done.


So there was some problem here...

EDIT:

I tryed withc another pic that can be loaded by datatypes:

Long link shortened considerably.

and repeat the imageconvert test and get a load time of 4.36 secs against 5.5 secs under LoView...
Any idea on why 1.2 secs of difference from 2 program that uses both datatypes to laod images?
mybe because LoView(Hollywood) load the image also in video ram?

Last edited by zerohero on 07-Jan-2012 at 01:39 PM.
Last edited by Tuxedo on 06-Jan-2012 at 11:51 PM.
Last edited by Tuxedo on 06-Jan-2012 at 11:25 PM.

_________________
Simone"Tuxedo"Monsignori, Perugia, ITALY.

 Status: Offline
Profile     Report this post  
Wanderer 
Re: DataType system big pictures not loadable?????
Posted on 7-Jan-2012 11:14:16
#16 ]
Cult Member
Joined: 16-Aug-2008
Posts: 654
From: Germany

@Tuxedo

I dont know. Depends what loview is doing else.

The time messured in Imageconverter is to
- test the fileformat against non-DT loaders (PNG, ILBM, Icon)
- open the file via DT
- allocate the ARGB Bitmap
- copy over the ARGB Bitmap
- close the DT
- Create a Rastport over the Bitmap

_________________
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de

 Status: Offline
Profile     Report this post  
Futaura 
Re: DataType system big pictures not loadable?????
Posted on 7-Jan-2012 11:31:43
#17 ]
Regular Member
Joined: 10-May-2004
Posts: 231
From: UK

@Tuxedo

It's hard to say without seeing the source code of both. Probably since imageconvert doesn't actually display the image, it doesn't need to go through all the stages that LoView does.

I was surprised that the second picture could be loaded since that is pretty huge too. So, I went back to the first one and tried scaling it down and it would seem there is an issue with the width. If I scale it to 8176x100 or 8176x8804 it displays fine, but as soon as I raise the width over 8176 the bitmap allocation fails (even with 8177x100). I tried this using IBrowse, both using the internal decoder and datatypes and the results were identical. This looks like a limitation of some OS component rather than a lack of video ram issue, because even using a simple test program any attempt to allocate a bitmap wider than 8176 pixels, as a friend bitmap of the screen, fails. 8176 seems a strange number, but almost certainly the width is rounded up to a multiple of 16 internally, hence 8177 would end up allocating a bitmap of width 8192. And 8192 is of course not a strange number. This upper limit for the bitmap width is the problem, although I'm not sure where the limit comes from - could be graphics.library, rtg.library or the gfxcard driver. I'm using the Radeon driver FYI.

 Status: Offline
Profile     Report this post  
Futaura 
Re: DataType system big pictures not loadable?????
Posted on 7-Jan-2012 12:02:14
#18 ]
Regular Member
Joined: 10-May-2004
Posts: 231
From: UK

Replying to myself . Bitmaps in OS4 are indeed limited to a width of 32767 bytes because the width is treated as an signed 16-bit integer. So, when the bitmaps are 32-bit, 8804 pixels wide is 35216 bytes which is obviously over this limit. And 8177 pixels wide is 32768 bytes (8177 is rounded up to 8192 internally). This is an inherent limitation of rtg.library (maybe even from the classic graphics.library). I can't comment on how easy it would be to remove this limit - it probably would have been done by now if it wasn't an intrinsic limitation.

It's not actually a bug in datatypes at all, but since they use bitmaps during layout/rendering, they are forced to keep to the limits of bitmaps. As I say though, internally they can handle larger images which can be scaled down by picture.datatype or the raw pixeldata can be read by the application using PDTM_READPIXELARRAY.

 Status: Offline
Profile     Report this post  
Wanderer 
Re: DataType system big pictures not loadable?????
Posted on 7-Jan-2012 13:37:01
#19 ]
Cult Member
Joined: 16-Aug-2008
Posts: 654
From: Germany

@Futaura

So how come that under WinUAE/OS3.1 larger Bitmaps can be handled?
When I scale the image down with ImageConverter and display it, it look fine, no artefacts.

_________________
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de

 Status: Offline
Profile     Report this post  
mailman2 
Re: DataType system big pictures not loadable?????
Posted on 7-Jan-2012 13:54:45
#20 ]
Member
Joined: 6-Mar-2011
Posts: 33
From: Unknown

@Wanderer

Quote:

So how come that under WinUAE/OS3.1 larger Bitmaps can be handled?


I just tried.
System Multiview - I got an error - not enough memory.

 Status: Offline
Profile     Report this post  
Goto 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