Autor Beitrag
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Mi 16.02.05 14:41 
Was meint ihr ist die beste Methode, Daten, welche aus einer XOR-Verknüpfung von zwei Bildern hervorgegangen sind zu komprimieren? Lineares Run-Length-Encoding hab ich schon probiert, bringt nicht viel und bläht öfters auch mal auf. Hat sich schon jemand von Euch mit Packbits beschäftigt?
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mi 16.02.05 15:00 
uses zlib;
ScorpionKing
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1150

Win XP

BeitragVerfasst: Mi 16.02.05 15:05 
Suche in: Delphi-Forum, Delphi-Library ZLIB + Suche in: Delphi-Forum, Delphi-Library ZIP

MfG, Scorpion!

_________________
Aus dem Urlaub zurück!
Spaceguide Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Mi 16.02.05 15:24 
Ist eindeutig zu langsam.
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mi 16.02.05 15:27 
zlib ist nicht wirklich langsam -> kommt drauf an was du machen willst, vielleicht paar mehr infos?
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Mi 16.02.05 15:49 
zlib in der aktuellen Version soll deutlich schneller sein. Größer werden die Daten nie.

Und wenn du mal was richtig langsames sehen willst, nimm bzip2, wenn der in Software implementiert ist, kann man ihm beim komprimieren zugucken :mrgreen:

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
Spaceguide Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Mi 16.02.05 15:58 
Nein, zLib ist schon sehr schnell für diese Kompressionsmethode. Mit RLE oder ähnlichen simplen und schnellen Verfahren werde ich wohl nicht auf eine Kompressionsrate von 1:2 kommen wie ich es mit zLib erreiche (gerade getestet).

Was ich konkret machen will: Um Schritte bei Bildbearbeitung rückgängig machen zu können muss man sich die Veränderungen merken mit Altes-Bild XOR Neues-Bild. Das kann aber ziemlich auf den Speicher gehen, z.B. Bild = 4000x4000xRGB = ~46MB pro Schritt. Ich habe es zwar soweit optimiert, dass ich das Bild in Kacheln zerlege und nur veränderte Kacheln abspeichere, jedoch kommt es oft genug vor, dass alle Kacheln verändert wurden.
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Mi 16.02.05 16:03 
Spaceguide hat folgendes geschrieben:
Nein, zLib ist schon sehr schnell für diese Kompressionsmethode.
[...]
jedoch kommt es oft genug vor, dass alle Kacheln verändert wurden.
Was willst du uns jetzt damit sagen? Bist du mit zlib zufrieden, oder suchst du noch was anderes?

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
Spaceguide Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Mi 16.02.05 16:36 
Ja was besseres werde ich kaum finden. 40MB Daten packt er mir hier in zwei Sekunden, das ist doch ein sehr guter Wert. Das untere Geschwafel war für uall, er hatte nach mehr Infos gefragt.

Noch eine Frage zu zLib: Wenn ich in einen TMemoryStream hineinkomprimieren, dann wird das sehr langsam, wenn ich den Stream nicht vorher auf eine Größe setze, da anscheinend viele Reallocs vorkommen. Das Problem ist nun, woher weiss ich, wie gross ich den MemoryStream machen soll? Größe des Inputs? Halbe Größe des Inputs? Gibt es eine Schätzen-Funktion?