Results 1 to 16 of 16

Thread: new sr2

  1. #1
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    hi!

    i'm rewriting sr2 to structural (c- style) code and incorporating fpaqd code.

    currently it's in early form. here's the code: http://phpfi.com/286283 . only model is written, coder is not present yet. any ideas on speed improvements are welcomed.

  2. #2
    Moderator

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

  3. #3
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    Please rewrite SR3 to new fpaqd code!

  4. #4
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    nania:
    i'll leave that task for you
    my code is ugly and there is big chance that you won't benefit from it.

    i've added coder but program now crashes (i don't know why). it doesn't even print anything on console.

    http://phpfi.com/286307

    i'm working on pelles c version 4.50.113

  5. #5
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    Pelles C is more faster compared with Dev-cpp ?

  6. #6
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    Detected The Error:
    Is impossible to allocate
    U64 QInv[2 << 12];
    U32 T4[1 << 20], StateMap[(1024 + 64) * 258];
    U16 Stack[10 * 65536];
    U8 Output[2 * 65536];
    in the MAIN procedure!

    these so great variables in the C or C++ declare him to the beginning of the code !

  7. #7
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    thanks francesco!

    now it doesnt crash, but dont work properly

    http://phpfi.com/286326

    Quote Originally Posted by Nania Francesco Antonio
    Pelles C is more faster compared with Dev-cpp ?
    i dont know (i dont even care) but it has imo much better ide (code formatting in dev- cpp annoys me).

  8. #8
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    corrected some errors (still works improperly):
    http://phpfi.com/286329

  9. #9
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    hopefully it produces correct output now:
    http://phpfi.com/286331

    huh, time to write decoder

  10. #10
    Member
    Join Date
    Dec 2006
    Posts
    611
    Thanks
    0
    Thanked 1 Time in 1 Post
    at school we were presented with a recommended choice between dev-cpp and code::blocks... all have chosen c::b

  11. #11
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    huh, it seems that i won't make the decoder (ie. have too many ideas about encoder and too little time for decoder)

    but there are cotinuous improvements

    http://phpfi.com/286340

  12. #12
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    THANKS DONKEY7! VERY GOOD AND FAST JOB!

  13. #13
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    current version (i think it's enough for now):
    http://phpfi.com/286344

    implemented optimization from: http://www.encode.ru/forums/index.php?action=vthre ad&forum=1&topic=589&page=1#msg7299

    removed lookup tables for learning rates (statefactor). used direct calculations instead.

    i have only old version of gcc (almost three years old). it produces slow executables. i'm curious about performance of sr2v2enc compared to sr2 (compiled in good compilers). i know sr2v2 is slower than sr2 but i can't estimate how much using my current compilers

  14. #14
    Member
    Join Date
    Oct 2007
    Location
    Germany, Hamburg
    Posts
    408
    Thanks
    0
    Thanked 5 Times in 5 Posts
    It seems to be a huge gap. I compiled with Visual C++ 7. Didn?t compiled sr2v1 for myselve. But that shouldn?t make a big difference

    timer srv2 test.bin output.svr22

    Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
    29705864 -> 7471130 in 5.13 sec.

    Kernel Time = 0.031 = 00:00:00.031 = 0%
    User Time = 5.078 = 00:00:05.078 = 99%
    Process Time = 5.109 = 00:00:05.109 = 99%
    Global Time = 5.125 = 00:00:05.125 = 100%

    -------------------------------------------------- ----------------------------------

    timer sr2 test.bin output.svr21

    Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
    29705864 -> 7476944 in 1.56 sec.

    Kernel Time = 0.046 = 00:00:00.046 = 3%
    User Time = 1.500 = 00:00:01.500 = 96%
    Process Time = 1.546 = 00:00:01.546 = 99%
    Global Time = 1.562 = 00:00:01.562 = 100%

  15. #15
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    on my system there's no huge difference

    i've written decoder. fortunately there wasn't many problems with it.

    it's here (together with compiled executables) - please mirror it if posible:
    http://asembler.republika.pl/misc/sr2v2.zip (hope i included right files)

    compression is much slower, decompression is little slower (than orignal sr2). maybe this will change when using better compilers.

    cheers!

  16. #16
    Moderator

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

    Mirror: Download

Posting Permissions

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