Poster | Thread |
Tuxedo
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 14:00:47
| | [ #21 ] |
|
|
|
Elite Member |
Joined: 28-Nov-2003 Posts: 2341
From: Perugia, ITALY | | |
|
| @Futaura
really interesting! So I can post that considerations on the AmigaOS4.x hyperion forum?
Another thing...maybe that way of work with gfx can be the huge differnce of speed from MOS to AmigaOS4.x?
As described on my old topic regarding the speed of JPG lopading(about 30% on 10mpx images), here the difference was really bigger...
under AOS4.1.4 I get 11.2 for the moon and 5.5 secs for the car under MOS 2.7 I get 5 for the moon and 4.1 for the car
So... For the car the same 30% but for the moon about 100%... Any idea on that? _________________ Simone"Tuxedo"Monsignori, Perugia, ITALY. |
|
Status: Offline |
|
|
Futaura
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 14:11:54
| | [ #22 ] |
|
|
|
Regular Member |
Joined: 10-May-2004 Posts: 253
From: UK | | |
|
| @Wanderer
How are you scaling the image though? I know that strictly speacking OS3.1 doesn't have scaling features in picture.datatype, but the v45 picture.datatype did. If using that feature, picture.datatype scales the image from the raw pixel data (stored in a simple buffer) to the destination bitmap which is allocated at the scaled size.
Another explanation would possibly be that a 24-bit bitmap is being allocated on OS3.1, rather than 32-bit, in which case the width easily fits below the limit. _________________ IBrowse, AmiSSL and Warp Datatype Developer |
|
Status: Offline |
|
|
number6
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 14:19:12
| | [ #23 ] |
|
|
|
Elite Member |
Joined: 25-Mar-2005 Posts: 11540
From: In the village | | |
|
| @Futaura
Quote:
8804 pixels wide is 35216 bytes which is obviously over this limit. |
And yet Severin mentioned loading "24889x1838 pixel size" in another thread. He had a 32 Meg radeon 7000 at the time. He was using registered warp datatype.
source
There's also different behavior mentioned depending on exactly which program is used to load the sample picture Severin links to in the thread.
I really don't understand why everyone else failed to load Severin's sample. He had the least memory and was using the same program "picshow" as most others reporting results. The only obvious difference about what he had/did expressed in the thread was (1)registered warp datatype and (2)Micro as h/w.
#6
Last edited by number6 on 07-Jan-2012 at 02:57 PM.
_________________ This posting, in its entirety, represents solely the perspective of the author. *Secrecy has served us so well* |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 14:19:36
| | [ #24 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12795
From: Norway | | |
|
| |
Status: Offline |
|
|
KimmoK
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 14:22:00
| | [ #25 ] |
|
|
|
Elite Member |
Joined: 14-Mar-2003 Posts: 5211
From: Ylikiiminki, Finland | | |
|
| argh... too interesting thread...
IMHO, in early 90's Amiga was (almost) the king of picture manipulation, , hopefully one day...
IIRC, when some of my friends had bought 486/P1 PCs with 16MB RAM+ SWAP, it was fun to demonstrate how Amiga (2+16M) could easily display Huge pictures that Win(NT?) could not, thanks to HAM8. Oh joy! _________________ - KimmoK // For freedom, for honor, for AMIGA // // Thing that I should find more time for: CC64 - 64bit Community Computer? |
|
Status: Offline |
|
|
Futaura
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 14:23:55
| | [ #26 ] |
|
|
|
Regular Member |
Joined: 10-May-2004 Posts: 253
From: UK | | |
|
| @Tuxedo
Feel free to mention the bitmap limitations on the Hyperion forum. There probably is a good reason for the limit, but that's not to say there is not a solution.
Regarding speed difference, there are so many different factors - it's hard to say where the differences lie. Again referring to the classic days, the CGX picture.datatype was always much faster than the P96 one (more details of that in the WarpDT docs). The MOS picture.datatype is most likely fundamentally very similar in implementation to the old CGX one. IIRC, the OS4 one uses more memory in order to be more flexible - it uses internal copies of the pixel data so that the application can in theory use that same datatype object on different screenmodes, different sizes, etc. That will explain some of the speed difference with larger images. _________________ IBrowse, AmiSSL and Warp Datatype Developer |
|
Status: Offline |
|
|
Futaura
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 14:27:33
| | [ #27 ] |
|
|
|
Regular Member |
Joined: 10-May-2004 Posts: 253
From: UK | | |
|
| Quote:
NutsAboutAmiga wrote: @Futaura
I guess its time to have a replacement for struct Bitmap, I guess it will take time to replace it everywhere in the OS, considering you need to support legacy. |
True, although of course applications have for a long time been encouraged to use the relevant functions to access bitmap fields like width, height, depth, etc, rather than reading directly, because non-native bitmaps don't use that structure anyway._________________ IBrowse, AmiSSL and Warp Datatype Developer |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 14:31:42
| | [ #28 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12795
From: Norway | | |
|
| |
Status: Offline |
|
|
Wanderer
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 15:07:21
| | [ #29 ] |
|
|
|
Cult Member |
Joined: 16-Aug-2008 Posts: 654
From: Germany | | |
|
| @Futaura
As I wrote, it is a 32bit ARGB Bitmap (not 24Bit) derrived from the DT, eating up 270MB of Fast-RAM. Scaling takes place later with this bitmap as the source and another bitmap as the target, using a proprietary function, no DT involved anymore. The scaling is actually only to give the ImageConverter a reason to load the image. I could just do a re-saving or so.
This is the code to allcoate the Bitmap:
\ARGBbitmap_ptr = AllocBitMap_(img_width,img_height,24,#BMF_MINPLANES|#BMF_SPECIALFMT|(#PIXFMT_ARGB32 LSL #BMB_PIXFMT_SHIFTUP),0)
.. and this is the code fragment to suck it out of the DT:
*DTPic._Object = NewDTObjectA_ (&filename.s,tag5) If *DTPic tag5.tag5\ti_Tag = #PDTA_BitMapHeader,&*bmhdp,#TAG_DONE,0 GetDTAttrsA_ *DTPic,tag5 If image_Create{image,*bmhdp\bmh_Width,*bmhdp\bmh_Height} If image_Lock{image}
; try to get as ARGB immediately, good datatpyes support this, but not all! ;If *bmhdp\bmh_Depth>8 ; dont even try if depth <=8 DTM\MethodID = #PDTM_READPIXELARRAY DTM\pbpa_PixelData = \raw_ptr ; /* The pixel data to transfer to/from */ DTM\pbpa_PixelFormat = #PBPAFMT_ARGB ; /* Format of the pixel data (see "Pixel Formats" below) */ DTM\pbpa_PixelArrayMod = \bpr ; /* Number of bytes per row */ DTM\pbpa_Left = 0 ; /* Left edge of the rectangle to transfer pixels to/from */ DTM\pbpa_Top = 0 ; /* Top edge of the rectangle to transfer pixels to/from */ DTM\pbpa_Width = *bmhdp\bmh_Width ; /* Width of the rectangle to transfer pixels to/from */ DTM\pbpa_Height = *bmhdp\bmh_Height If DoMethodA (*DTPic,&DTM) Then succ = True ;End If
Last edited by Wanderer on 07-Jan-2012 at 03:08 PM.
_________________ -- 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 |
|
|
NutsAboutAmiga
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 15:12:04
| | [ #30 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12795
From: Norway | | |
|
| |
Status: Offline |
|
|
Futaura
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 15:19:44
| | [ #31 ] |
|
|
|
Regular Member |
Joined: 10-May-2004 Posts: 253
From: UK | | |
|
| @NutsAboutAmiga
Quote:
NutsAboutAmiga wrote: @Futaura
Anyway is the problem also in struct RenderInfo? |
Yes. There are probably many places this problem exists :(._________________ IBrowse, AmiSSL and Warp Datatype Developer |
|
Status: Offline |
|
|
number6
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 15:51:41
| | [ #32 ] |
|
|
|
Elite Member |
Joined: 25-Mar-2005 Posts: 11540
From: In the village | | |
|
| |
Status: Offline |
|
|
Futaura
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 16:04:31
| | [ #33 ] |
|
|
|
Regular Member |
Joined: 10-May-2004 Posts: 253
From: UK | | |
|
| @Wanderer
It seems to be dependent on whether a friend bitmap is used when allocating the bitmap. With a friend bitmap the allocation fails, and without it succeeds. I should probably be quiet now because I am not familiar with the inner workings and interactions of picture.datatype/graphics.library/rtg.library . On OS4 picture.datatype is using friend bitmap it seems, and maybe on OS3 it isn't (could be a difference in P96 too). _________________ IBrowse, AmiSSL and Warp Datatype Developer |
|
Status: Offline |
|
|
Wanderer
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 16:58:20
| | [ #34 ] |
|
|
|
Cult Member |
Joined: 16-Aug-2008 Posts: 654
From: Germany | | |
|
| @Futaura
Yes, my Bitmap above needs no friends. Especially no Screen-Friends, since it is not directly displayed. _________________ -- 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 |
|
|
number6
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 17:02:14
| | [ #35 ] |
|
|
|
Elite Member |
Joined: 25-Mar-2005 Posts: 11540
From: In the village | | |
|
| @Tuxedo
Just a confirmation about loading and viewing your sample image in a NON datatype loader program...AdPro.
Quote:
Adpro reports the amount of memory required for an image it can not load, which can easily be altered by allocating more in the AdPro tooltype "MAXMEM". When I changed it to 160,000,000 on my Micro, it loaded and displayed at 1600x1200 just fine.
#6
_________________ This posting, in its entirety, represents solely the perspective of the author. *Secrecy has served us so well* |
|
Status: Offline |
|
|
Tuxedo
| |
Re: DataType system big pictures not loadable????? Posted on 7-Jan-2012 20:50:51
| | [ #36 ] |
|
|
|
Elite Member |
Joined: 28-Nov-2003 Posts: 2341
From: Perugia, ITALY | | |
|
| @all
the only thing was that someone from Hyperion will tell us if there was any plan to improve that bad behaviour of grafic system of AmigaOS4.x... And I really hope that someone will tell something to us...I will update my thread on Hyperion support form asap(not today that I'm quite busy).
@wanderer
just for information, do you read my pm or you dont look at it?
@number6
For example also my tool LoView can load usch big images also if it uses DT for loading images...simply have to add "USEWPA" ToolTyp to load image only in fast ram instead in video mem...that was a little bit more slower than native use of graphics library. However the slow performances was for sure related to system design... _________________ Simone"Tuxedo"Monsignori, Perugia, ITALY. |
|
Status: Offline |
|
|
RodTerl
| |
Re: DataType system big pictures not loadable????? Posted on 8-Jan-2012 0:12:37
| | [ #37 ] |
|
|
|
Cult Member |
Joined: 6-Sep-2004 Posts: 589
From: Rossendale | | |
|
| Would th maximum bitmap size be that reported by maximum screen size, 16000*16000 in screen, mode preferences? Where display PAL is 640*512 interlace, no overscan, 720*588 or so interlace maximum overscan?
If you want ease of scaling, its best to see how much processing an FFT of the image data takes, given the easier the manipulation of the data for fractional scaling etc, due to interpolation already taken place?
_________________ The older and more respected a scientist is, the longer it takes to prove him wrong. |
|
Status: Offline |
|
|
Karlos
| |
Re: DataType system big pictures not loadable????? Posted on 8-Jan-2012 10:58:58
| | [ #38 ] |
|
|
|
Elite Member |
Joined: 24-Aug-2003 Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| 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. That puts an absolute limit on the size of a BitMap before any other constraints in the system are applied.
It's important to note that the use of an 16-bit unsigned integer here doesn't necessarily mean you can have any old value up to 65535. First of all, it needs to be a multiple of bytes per pixel. Secondly, there is, IIRC, a 16-pixel minimal rounding imposed by the RTG system. Lastly, and most importantly, if memory serves, the actual limit on this bytes per row is 32768. This value can't be encoded as a signed value in 16 bits, since the limit is 32767. Negative sizes aren't legal anyway, so a UWORD is your ideal type for representing the range 0-32768 inclusive.
Taking 32768 as a limit and dividing by 4 (assuming you had a 32-bit deep BitMap) leaves you with 8192 as your magic number.
-edit-
Just to be clear, the implication is that other parts of the graphics.library may still assume this legacy restriction exists. RTG BitMaps store their actual properties in private structures.
-/edit-
However, there is yet another limitation you need to consider. If a BitMap is allocated displayable, or using a friend BitMap that is displayable, any hardware limitations will also apply. For example, the Permedia2 has no way to represent a BitMap wider than 2048 pixels, irrespective of how many bytes it takes to represent one pixel.
Last edited by Karlos on 08-Jan-2012 at 02:02 PM. Last edited by Karlos on 08-Jan-2012 at 11:01 AM.
_________________ Doing stupid things for fun... |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: DataType system big pictures not loadable????? Posted on 8-Jan-2012 11:06:05
| | [ #39 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12795
From: Norway | | |
|
| |
Status: Offline |
|
|
Wanderer
| |
Re: DataType system big pictures not loadable????? Posted on 8-Jan-2012 11:42:54
| | [ #40 ] |
|
|
|
Cult Member |
Joined: 16-Aug-2008 Posts: 654
From: Germany | | |
|
| @Karlos
Why can bytes-per-row not be up to 0x$FFF0, if its a unsigned 16bit integer?
On OS3, I can allocate a bitmap that holds the Moon picture posted above, which would need 8804*4 bytes = 35216 bytes as bytes-per-row, which is greater than 0x7FF0.
Last edited by Wanderer on 08-Jan-2012 at 11:44 AM.
_________________ -- 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 |
|
|