Page 3 of 59 FirstFirst 123451353 ... LastLast
Results 61 to 90 of 1754

Thread: paq8px

  1. #61
    Programmer Jan Ondrus's Avatar
    Join Date
    Sep 2008
    Location
    Rychnov nad Kněžnou, Czech Republic
    Posts
    278
    Thanks
    33
    Thanked 137 Times in 49 Posts
    Quote Originally Posted by Simon Berger View Post
    I added a validation that the directory isn't on offset 8 then the probability for image block starting there is good.
    Don't understand what is problem with directory on offset 8?
    Code:
    bswap(buf0)!=8
    Why you added this check?

  2. #62
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Is much more fun to integrate new things into paq. Excellent work Jan
    The tga detection excludes files with an image id cause the leading byte would be unusable for identification.
    8-bit tga's should be easy but not often used?!?

    What's with a 32-bit image model? See them almost as often as 24-bit.

  3. #63
    Programmer osmanturan's Avatar
    Join Date
    May 2008
    Location
    Mersin, Turkiye
    Posts
    651
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Simon Berger View Post
    8-bit tga's should be easy but not often used?!?
    Mostly used in games as alpha map for blending or as height map for per-pixel shading or terrain construction (they are all greyscale).
    BIT Archiver homepage: www.osmanturan.com

  4. #64
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by Jan Ondrus View Post
    Don't understand what is problem with directory on offset 8?
    This detection only works if the image data starts at offset 8 or am I wrong? On implementations other then LibTiff/IrfanView it often starts at 8. Those can immediately be discarded.

  5. #65
    Programmer Jan Ondrus's Avatar
    Join Date
    Sep 2008
    Location
    Rychnov nad Kněžnou, Czech Republic
    Posts
    278
    Thanks
    33
    Thanked 137 Times in 49 Posts
    Quote Originally Posted by Simon Berger View Post
    This detection only works if the image data starts at offset 8 or am I wrong? On implementations other then LibTiff/IrfanView it often starts at 8. Those can immediately be discarded.
    Actually it reads offset from directory. It reads value marked with tag StripOffsets (273) = pointer to list of offsets. Than seeks to that position and reads first value = pointer to first strip.
    But it needs to have all image parts concatenated (in the right order and without data between)
    Code:
    if (tag==273) tifofs=tagval;
    Code:
    fseek(in, start+tiff+tifofs-3, SEEK_SET);
    Last edited by Jan Ondrus; 8th May 2009 at 21:10.

  6. #66
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    You are right I missed this part then this surely is a bad check and should be removed in the next version.
    Last edited by Simon Berger; 8th May 2009 at 21:22.

  7. #67
    Member
    Join Date
    Dec 2008
    Location
    Poland, Warsaw
    Posts
    962
    Thanks
    573
    Thanked 397 Times in 295 Posts

    Tiff recognison

    @Simon, thanks for information. My testbed tiffs should be one of kind you mention and due to this aren't recognised.
    TGA 24bit compression works great and gives one of the best scores for my testfile:
    b.tga original: 2'872'818
    after paq8px v9 -6: 823'158
    after paq9px v10 -6: 457'020
    winrk3.03b max, 1.7GB: 442'700
    Darek

  8. #68
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    paq8px_v11

    Code:
    Added tga (8-bit) UNTESTED - please verify. Didn't find any 8-bit tga file
    Fixed tiff reading of offset stored by value (partcount=1)
    Fixed now the tiff stream won't be read if offsets stored in 16-bit (also not worth to implement)
    Removed bad tiff directory check
    @Darek
    My answer wasn't right sorry. I missed some "features" of Jans implementation.
    There are some possibilities it could fail if you could give me the file I will have a look. I fixed one thing it could be in this version so please check again.
    Only to be sure. The tiff file is uncompressed?
    Last edited by Simon Berger; 9th May 2009 at 02:54.

  9. #69
    Member
    Join Date
    Dec 2008
    Location
    Poland, Warsaw
    Posts
    962
    Thanks
    573
    Thanked 397 Times in 295 Posts
    @Simon,
    in my testbed I use three tiff files, first is 24 bit and not compressed internally, second is 8 bit, either uncompressed, and third 8 bit compressed LZW. Paq isn't recognise none of them, but I didn't test v.11 yet. If it wouldn't work I'll send you my file.
    Darek

  10. #70
    Member
    Join Date
    Dec 2008
    Location
    Poland, Warsaw
    Posts
    962
    Thanks
    573
    Thanked 397 Times in 295 Posts
    @Simon
    in attached files are two tga examples - 8 bit tga from my testbed (but it's compressed rle), and the same picture as 8 bit tga uncompressed (I think ).
    Darek
    Attached Files Attached Files

  11. #71
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Re-uploaded v11 which works now with one tested 8-bit tga file.
    Had some troubles parsing the tga header.

    @Darek
    Could you try if your tiff files are working with my TiffPrecompression?
    Tiffprecompression->paq8px_v9 or v10.
    Thanks for the tga files. I also get it to work with a 8-bit Tiff files which I converted. But nowhere found something to create one.

    EDIT:
    Works without problems.
    Absolutely better to have such a picture without any compression or am I wrong?
    Attached Files Attached Files
    Last edited by Simon Berger; 9th May 2009 at 03:30.

  12. #72
    Member
    Join Date
    Dec 2008
    Location
    Poland, Warsaw
    Posts
    962
    Thanks
    573
    Thanked 397 Times in 295 Posts
    @Simon,
    unfortunately tiffprecompresson didn't run on my machine. I've tried all versions. My system return information that this program is "not properly installed" - strange....
    Darek

  13. #73
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Thumbs up

    Thanks Simon!

    Compiled...

    EDIT: Attachment "paq8px_v11.zip" removed.

  14. #74
    Member
    Join Date
    Dec 2008
    Location
    Poland, Warsaw
    Posts
    962
    Thanks
    573
    Thanked 397 Times in 295 Posts
    @Simon,
    here you are some examples of tiffs (c - 8 bit uncompressed, e - 8 bit compressed lzw). Both are in similar style (sorry) but it becomes from the same album of Boris Vallejo, who was my favourite artists 12 years ago when I was creating this testbed.
    Darek
    Attached Files Attached Files

  15. #75
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    It's exactly the problem I mentioned. This is fixed in v11 release. Many bad implementations of the Tiff standard only use 1 image block or read them like one block.

    For TiffPrecompression you have to install the VC++ 2008 Redistributable package. I linked it at the first post.
    It's really bad that so many haven't installed it yet. I have to use mingw next time.

    @LovePimple
    Thank you for all your compiled versions.

  16. #76
    Member
    Join Date
    Dec 2008
    Location
    Poland, Warsaw
    Posts
    962
    Thanks
    573
    Thanked 397 Times in 295 Posts
    Thanks for LovePimple for compilation!

    @Simon
    Version 11 properly recognised all uncompressed tiff and tga files. Thanks for enchancements, which are very impressive!
    Scores for -6 option:
    A.TIF - org.: 2'870'552, v9: 874'429, v11: 498'354 (43% of improvement)
    B.TGA - org.: 2'872'818, v9: 823'158, v11: 457'020 (44% of improvement)
    C.TIF - org.: 896'094, v9: 334'985, v11: 308'102 (8% of improvement)
    Darek

  17. #77
    Member
    Join Date
    Jun 2008
    Location
    USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Simon Berger View Post
    For TiffPrecompression you have to install the VC++ 2008 Redistributable package. I linked it at the first post.
    It's really bad that so many haven't installed it yet. I have to use mingw next time.
    While I still don't know why nobody has fixed MinGW to not use MSVCRT's broken tmpfile(), at least somebody unofficially compiled a MinGW-hosted GCC 4.4.0 !! (I still prefer DJGPP, OpenWatcom, and Cygwin, though, for various reasons.)

    http://www.tdragon.net/recentgcc/

  18. #78
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,422
    Thanks
    222
    Thanked 1,051 Times in 564 Posts
    @Simon Berger:
    You can just compile stuff statically, without dynamic libraries (/MT switch).
    Or, like I do, you can use libraries from VC6, which only require msvcrt.dll.

  19. #79
    Programmer Jan Ondrus's Avatar
    Join Date
    Sep 2008
    Location
    Rychnov nad Kněžnou, Czech Republic
    Posts
    278
    Thanks
    33
    Thanked 137 Times in 49 Posts
    paq8px_v12
    -fixed bug in TGA detection
    -some code changed in BMP,RGB and TIFF detection

    m1l10002.tga (24-bit) - not detected by v11
    M1.TGA (8-bit) - detected by v11 but with wrong data offset

    m1l10002.tga - 196626 bytes
    M1.TGA - 5544 bytes
    m1l10002.tga.paq8px_v11 - 66983 bytes
    M1.TGA.paq8px_v11 - 1760 bytes
    m1l10002.tga.paq8px_v12 - 58377 bytes
    M1.TGA.paq8px_v12 - 1686 bytes
    Last edited by Jan Ondrus; 11th June 2009 at 14:07.

  20. #80
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Thumbs up

    Thanks Jan!

    Compiled...

    EDIT: Attachment "paq8px_v12.zip" removed.

  21. #81
    Tester
    Black_Fox's Avatar
    Join Date
    May 2008
    Location
    [CZE] Czechia
    Posts
    471
    Thanks
    26
    Thanked 9 Times in 8 Posts
    Quote Originally Posted by Rugxulo View Post
    ...at least somebody unofficially compiled a MinGW-hosted GCC 4.4.0 !!
    http://www.tdragon.net/recentgcc/
    Thanks! I'll finally get an update after a year
    I am... Black_Fox... my discontinued benchmark
    "No one involved in computers would ever say that a certain amount of memory is enough for all time? I keep bumping into that silly quotation attributed to me that says 640K of memory is enough. There's never a citation; the quotation just floats like a rumor, repeated again and again." -- Bill Gates

  22. #82
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    @Jan
    The tga detection works for both of my test files, but you still worked a new mistake in:
    image format 3 is monochrome and won't work.


    I have no new ideas at the moment so won't change it myself.

  23. #83
    Programmer Jan Ondrus's Avatar
    Join Date
    Sep 2008
    Location
    Rychnov nad Kněžnou, Czech Republic
    Posts
    278
    Thanks
    33
    Thanked 137 Times in 49 Posts
    Quote Originally Posted by Simon Berger View Post
    @Jan
    The tga detection works for both of my test files, but you still worked a new mistake in:
    image format 3 is monochrome and won't work.
    Yes, you are right.
    a) fixed - monochrome TGA works again
    b) some code modified in TIFF detection

    WhiteFlare1.tga - Monochrome TGA (4140 bytes)
    WhiteFlare1.tga.paq8px_v11 - 1005 bytes
    WhiteFlare1.tga.paq8px_v12 - 1270 bytes
    WhiteFlare1.tga.paq8px_v13 - 1005 bytes
    Last edited by Jan Ondrus; 11th June 2009 at 14:07.

  24. #84
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Thumbs up

    Fantastic, I'm looking forward to the next release. Thanks Jan!

    Compiled...

    EDIT: Attachment "paq8px_v13.zip" removed.

  25. #85
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Jan could you create a image 32bit model? I have many tga files using this. It's Alpha|Red|Green|Blue. The paq core is still over my head.
    This could also be used to compress special 32-bit bmps.

  26. #86
    Programmer Jan Ondrus's Avatar
    Join Date
    Sep 2008
    Location
    Rychnov nad Kněžnou, Czech Republic
    Posts
    278
    Thanks
    33
    Thanked 137 Times in 49 Posts
    Quote Originally Posted by Simon Berger View Post
    Jan could you create a image 32bit model? I have many tga files using this. It's Alpha|Red|Green|Blue. The paq core is still over my head.
    This could also be used to compress special 32-bit bmps.
    I am not author of image models and don't know how to write one too.

  27. #87
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Graphic formats still in my mind, to add:

    1) PSD - would be nice to add. But I still stuck on fully understanding the file format. Size values don't make sense to me on many places. Also where what picture data will be saved. If someone knows more it would be fine.
    Second problem is that most images are saved with RLE compression (same as in TIFF). But this could maybe also be done and at least with something like TiffPrecompress.

    2) DDS - Like it. But it's good (lossless compressed). Also paq still compresses it well. A first attempt to convert it to a bmp showed no better result.

  28. #88
    Programmer osmanturan's Avatar
    Join Date
    May 2008
    Location
    Mersin, Turkiye
    Posts
    651
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Simon Berger View Post
    2) DDS - Like it. But it's good (lossless compressed). Also paq still compresses it well. A first attempt to convert it to a bmp showed no better result.
    You are not completely right in here. Because, DDS files may have lossy compression. It's actually a container format as DirectDraw textures. They are coded in native graphics accelerator pixel storage. So, they have several pixel format including lossy. DirectX library has built-in loading capabalities of them (for both DirectDraw and Direct3D). Also, in OpenGL; S3TC, DXT1-5 etc like lossy compressed textures can be directly uploaded to graphics accelerator too (of course, if hardware support them - though only some ancient GPUs don't support them). So, that's why they're mainly used in games. Note that, DDS files can even store cube map textures (set of 6 equal size textures for sky mapping, environment mapping etc) and volume textures (3D textures). As a summary, DDS files are not easy to handle. Because, GPU world advance quickly. But, still mostly DXT1-5 lossy compressed textures and cubemaps are used in many games. On the other hand, by pixel shading becoming popular in many games, ATI's 3Dc compression for normalmaps could be popular in near future (personally I'm not satisfied with it's current popularity until now).

    Another thing you should know about DDS files is that mipmapping. GPUs needs multi-resolution representation of uploaded textures for eliminating aliasing problems on rasterized surfaces. And in here mipmapping is used. Mipmapping also reduces required transfer rate between texture memory and GPU. Now, let's assume you want to upload a texture which is 512x512 pixels. If you want to enable mipmapping, you should upload also 256x256, 128x128, ... , 1x1 copies too (todays GPUs have automatic mipmapping feature on uploads via SGIS_generate_mipmap extension). As you could easily guessed, a typical DDS file can store all mipmap levels
    BIT Archiver homepage: www.osmanturan.com

  29. #89
    Programmer Jan Ondrus's Avatar
    Join Date
    Sep 2008
    Location
    Rychnov nad Kněžnou, Czech Republic
    Posts
    278
    Thanks
    33
    Thanked 137 Times in 49 Posts
    Quote Originally Posted by Jan Ondrus View Post
    -do same thing like for images also for audio (wav model)
    -uncompressed audio 8-bit/16-bit mono/stereo is now compressed in separate AUDIO blocks
    -wave file is divided into HDR and AUDIO block (images into HDR and IMAGEx)
    -extra information (like width for images) saved in compressed stream is BitsPerSample+Channels (possible values are 9, 10, 17, 1
    -found and fixed problem for images blocks - metadata (=size of block, image width) were compressed using special models (image models)
    Last edited by Jan Ondrus; 11th June 2009 at 14:07.

  30. #90
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Thumbs up

    Thanks Jan!

    Compiled...

    EDIT: Attachment "paq8px_v14.zip" removed.

Page 3 of 59 FirstFirst 123451353 ... LastLast

Similar Threads

  1. FrontPAQ - GUI frontend for PAQ8PF and PAQ8PX
    By LovePimple in forum Download Area
    Replies: 26
    Last Post: 17th January 2019, 14:36
  2. Alternative paq8px builds
    By M4ST3R in forum Download Area
    Replies: 20
    Last Post: 25th June 2010, 17:19
  3. Optimized paq7asm.asm code not compatible with paq8px?
    By M4ST3R in forum Data Compression
    Replies: 7
    Last Post: 3rd June 2009, 16:34

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •