Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#81 | Link |
|
Registered User
Join Date: Mar 2002
Posts: 1,075
|
LOCO-I in it's original form wont work all that well for anime ... so if anyone feels adventurous and wants to host a LOCO-I based codec on CoreCodec Id call it CorePURE or something, in the end it will probably be pretty heavily modified anyway.
It would be very little work to take one of the existing open source JPEG-LS implementations (there are plenty, and JPEG-LS <=> LOCO-I) and hack it into CorePNG. |
|
|
|
|
|
#82 | Link | |
|
Registered User
Join Date: Nov 2001
Posts: 92
|
Quote:
So, the scan I gave jccston was this quadrantscan, which is basicly a rotationless hilbert. He reported that zipping a bmp usually produced better compession using my scan, but a png of both images usually produced better compression on the standard (raster) scan. Which leads me to suspect that png has some optimizations that take things like horizontal resolution into account before calling zlib. |
|
|
|
|
|
|
#83 | Link |
|
Registered User
Join Date: Mar 2002
Posts: 1,075
|
Which filter-type does CorePNG use?
|
|
|
|
|
|
#84 | Link |
|
XviD fan
Join Date: Jun 2002
Location: France
Posts: 907
|
huhu a new lossless codec. fun because i started again to play with that a few days ago ^^.
and to be honest i don't see how zlib compression on images could be _that_ good ^^;; seems there is a yv12 version, i eager to try it out. ^^ we'll soon see if CorePNG outperform both a unrestricted huffyuv in yv12 and a little guy's (me) poor-man's compression lossless stuff =) EDIT : CoreCodec.org seems down here in france T_T... could s.o. attach the last working yv12 version please :) Last edited by Marc FD; 10th November 2003 at 23:03. |
|
|
|
|
|
#85 | Link | |||
|
Matroska Dev
Join Date: Sep 2002
Location: Texas, USA
Posts: 230
|
Quote:
You can choose in the codec options which filters will be enabled and used or if any at all will be used. Quote:
Quote:
__________________
The Matroska Effect |
|||
|
|
|
|
|
#87 | Link |
|
XviD fan
Join Date: Jun 2002
Location: France
Posts: 907
|
hum, isn't impressive in yv12.
some % under vble & huffyuv (3-5%), but much more than 10x slower ^^; but the test clip i use for lossless coding is a very hard one, even video codecs don't compress it much ^^. |
|
|
|
|
|
#88 | Link | |
|
Registered User
Join Date: Apr 2002
Posts: 201
|
Quote:
first number is the jpeg-ls, second is the png frame from akira: 226k/240k frames from simpsons: 262k/291k 343k/399k 260k/296k though the sources for the test were from divx encodes so there is artifacting in there. And this is using adaptive filtering for png Last edited by TheXung; 11th November 2003 at 05:25. |
|
|
|
|
|
|
#90 | Link |
|
Registered User
Join Date: Dec 2002
Location: Great White North
Posts: 522
|
Wow, what a coincidence. It appears that JPEG-LS was developed at my university. If you like I may be able to track down the people who wrote this and direct them to you if you are interested in writting an encoder.
|
|
|
|
|
|
#91 | Link | |
|
Registered User
Join Date: Nov 2001
Posts: 92
|
Quote:
Here's a couple examples to play with if you like: http://www.gldm.net/orig.png http://www.gldm.net/quadrant.png and the function, if anyone wants to play with that too: Code:
void QuadrantScan(int** order, int hmin, int vmin,
int hmax, int vmax, int size, int ¤t)
{
int hmintemp, vmintemp, hmaxtemp, vmaxtemp;
if (size == 1) // 1x1 array
if(order[vmin][hmin] != 0)
{
order[vmin][hmin] = current; // store order seen
current++;
}
else
; // don't store if marked out
else{
size /= 2;
hmintemp = hmin;
vmintemp = vmin;
hmaxtemp = hmax - size;
vmaxtemp = vmax - size;
QuadrantScan(order, hmintemp, vmintemp,
hmaxtemp, vmaxtemp, size, current);
hmintemp = hmin;
vmintemp = vmin + size;
hmaxtemp = hmax - size;
vmaxtemp = vmax;
QuadrantScan(order, hmintemp, vmintemp,
hmaxtemp, vmaxtemp, size, current);
hmintemp = hmin + size;
vmintemp = vmin + size;
hmaxtemp = hmax;
vmaxtemp = vmax;
QuadrantScan(order, hmintemp, vmintemp,
hmaxtemp, vmaxtemp, size, current);
hmintemp = hmin + size;
vmintemp = vmin;
hmaxtemp = hmax;
vmaxtemp = vmax - size;
QuadrantScan(order, hmintemp, vmintemp,
hmaxtemp, vmaxtemp, size, current);
}
return;
}
int** order is a 2D array of ints initialized to 1s used as a lookup table, to know what linear order a given 2D pixel falls in. Note that the array must be SQUARE and POWER of 2. Note int size is the length of the SIDE of the square array, not is entire area. If you need to handle cases with non-square areas or anything that doesn't fit perfect, load 1s in the area you plan to use, and 0s in the area you want masked out. For example, on a 512x512 array, if your image is 512x384, fill the first 384 lines with 1s, and the last 128 with 0s to generate a proper lookup table. This works for any pixel mask including random. Once the table is made, forward transform looks like this: destination[order[i][j]] = source[i][j]; reverse transform: destination[i][j] = source[order[i][j]]; Note the 2D->1D translation by the table. If you want 2D->2D or some other combintation I'll leave the / and % conversion of 2D coordinates to and from a linear index for your own coding fun. |
|
|
|
|
|
|
#92 | Link | |
|
Registered User
Join Date: Apr 2002
Posts: 201
|
Quote:
GLDM, that sure is a fancy scan you got going. However wouldn't a scan that makes objects only a pixel tall have a negative effect on prediction accuracy? |
|
|
|
|
|
|
#93 | Link | |
|
Registered User
Join Date: Nov 2001
Posts: 92
|
Quote:
The scan looks fancy but it's really a simple idea. You just take a square, and divide it into 4 parts. Then divide each of those into 4 parts, until your squares are only 1 pixel big. Then as the recursive functions return, they each assign a square a number in the order that they return. The hilbert and peano space-filling curves do the same, except in their scan each subdivision can be a rotation (90/-90/180 degrees) of the order of the caller. Mine always uses the same order at every level so it's more likely to produce the same results for similar features in the image. What this does is produce a scan order that gives you a 1x1 pixel, surrounded by its neighbors that compose a 2x2 square, surrounded by 3 other 2x2s to make a 4x4, then an 8x8, 16x16, etc. This way, when you compress the resulting stream of pixels, large areas of similar color should be all next to each other in a line. Which I would think would be easier to compress but apparently not. |
|
|
|
|
|
|
#94 | Link |
|
XviD fan
Join Date: Jun 2002
Location: France
Posts: 907
|
finished my stuff. it's funny because it looks a lot like LOCO-I, (well it's less complex) but i didn't have read anything about LOCO when i designed the algo. i had only tested felics (which behaved bad but gave me good ideas)
tested in yv12, it compress more than the corePNG codec (about -10%) and is 2.5x faster. (iframes only coding) still plain C and lazily optimised. i'll do some asm-ing, to see how fast it could be ^^. btw, sorry if you feel i hijack the thread, i'd like to keep clear it's not my intention at all, just the discution seemed to turn around lossless coding so ... ^^ |
|
|
|
|
|
#96 | Link |
|
Registered User
Join Date: Mar 2002
Posts: 1,075
|
I think the dictionary based coding is better at representing reoccuring long runs of the same color. A 2D oriented RLE can help here.
For truly synthetic images there are also dither patterns which dictionary based coding can deal better with, and gradients which can be perfectly predicted. Having long strings of perfectly predicted pixels isnt a good case for JPEG-LS, if you wanted to support near lossless coding you would really want to fix that too. GLDM, if you do that to the pattern it is no longer a continuous curve ... I dont think that is a good idea. Last edited by MfA; 11th November 2003 at 23:50. |
|
|
|
|
|
#97 | Link | |
|
Registered User
Join Date: Nov 2001
Posts: 92
|
Quote:
There's situations in which either algorithm has advantages and disadvantages. |
|
|
|
|
|
|
#98 | Link |
|
Registered User
Join Date: Oct 2001
Location: france
Posts: 521
|
I'm having trouble to access the website associated with the codec.
Can someone confirme if the site is down until further notice, or if it should be back up in time or somewhere else? (--> how i get the codec )esby |
|
|
|
|
|
#99 | Link | |
|
Seņor Member
Join Date: May 2002
Location: Austin, Texas
Posts: 915
|
Quote:
|
|
|
|
|
|
|
#100 | Link | ||
|
Matroska Dev
Join Date: Sep 2002
Location: Texas, USA
Posts: 230
|
Quote:
Quote:
__________________
The Matroska Effect |
||
|
|
|
![]() |
|
|