Apple Pixlet Codec: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
(")
(This codec have been fully reverse engineered)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
* FOURCCs: PXLT
* FOURCCs: PXLT
* Samples: [http://www.mplayerhq.hu/MPlayer/samples/V-codecs/pxlt-ApplePixlet/ http://www.mplayerhq.hu/MPlayer/samples/V-codecs/pxlt-ApplePixlet/]
* Samples: [http://samples.mplayerhq.hu/V-codecs/pxlt-ApplePixlet/ http://samples.mplayerhq.hu/V-codecs/pxlt-ApplePixlet/]


Pixar/[[Apple]] Pixlet codec.  Reportedly based on a wavelet transform and encodes only I-frames.  No open source decoder.  This codec was designed as an editing format and is rarely used for media distribution.
Pixar/[[Apple]] Pixlet codec.  Reportedly based on a wavelet transform and encodes only I-frames.  FFmpeg have open source decoder.  This codec was designed as an editing format and is rarely used for media distribution.


[[Category:Undiscovered Video Codecs]]
=== Frame Format ===
[[Category:Video Codecs]]
 
==== Frame Header ====
 
All values are 32-bit big-endian words.
 
  0- 3  -- frame size
  4- 7  -- version, supposed to be 1
  8-11  -- ???
  12-15  -- should be 0x01000000
  16-19  -- ???
  20-23  -- width
  24-27  -- height
  28-31  -- number of levels (should be 4)
  32-35  -- ???
  36-39  -- some number * 1000
  40-43  -- coded planes size?
 
Each plane starts with (level*2) words that contain scaling parameters used in wavelet reconstruction (horizontal/vertical) multiplied by 1000000 followed by lowpass subband and (level*3) highpass subbands.
 
==== Lowpass subband coding ====
 
Decoding order:
* top left pixel (as 16-bit BE, no special coding)
* top row (without the first pixel)
* left column (without the first pixel)
* the rest of pixels
 
After decoding pixel data is top+left predicted, i.e. <code>dst[x][y] += dst[x-1][y] + dst[x][y-1];</code>
 
Coefficients are decoded as adaptive Rice codes in form of <code>val, [skip]</code>:
 
  flag = 0;
  rparam      = 3;
  quant      = 120;
  max_length  = 14;
  max_zlength =
  while (!done) {
    nbits = log2((rparam >> 8) + 3);
    if (nbits > max_length)
      nbits = max_length;
    if (show_bits(8) == 0xFF) {
      skip_bits(8);
      val = get_bits(16);
    } else {
      pfx = show_unary(); // like 111110 -> 5
      val = ((1 << nbits) - 1) * pfx + get_bits(nbits) - 1;
    }
    val += flag;
    if (val & 1)
      *dst++ = -((val + 1) >> 1);
    else
      *dst++ =  (val + 1) >> 1;
 
    rparam += quant * (val - (rparam >> 8));
    flag = 0;
 
    if (rparam * 4 > 0xFF && dst < dst_end) {
      nbits = log2(rparam) + ((rparam + 8) >> 5) - 24;
      if (nbits > max_zlength)
        nbits = max_zlength;
      if (show_bits(8) == 0xFF) {
        skip_bits(8);
        val = get_bits(16);
      } else {
        pfx = show_unary(); // like 111110 -> 5
        val = ((1 << nbits) - 1) * pfx + get_bits(nbits) - 1;
      }
      rparam = 0;
      if (val <= 0xFFFE)
        flag = 1;
      dst += val;
    }
  }
 
==== Highpass subbands coding ====
 
Header:
 
  0- 3 -- some negative value
  4- 7 -- some positive value
  8-11 -- some parameter
  12-15 -- some parameter 2
  16-19 -- 0xDEADBEEF
 
Coefficients decoding is done similarly to the lowpass subband decoding except that some parameters are taken from the subband header.
 
=== Wavelet filters ===
 
Edges:


  -0.07576144003329376
  0.8586296626673486
  -0.07576144003329376


  0.3535533905932737
  0.3535533905932737


Main:


  -0.01515228715813062
  0.3687056777514043
  0.3687056777514043
  -0.01515228715813062
   
   
  0.07071067811865475
  -0.8485281374238569
  0.07071067811865475


 
[[Category:Wavelet Video Codecs]]
<div id="nolabel" style="overflow:auto;height:1px;">
[[Category:Video Codecs]]
Pharmacy:
[[Category:Formats missing in MPlayer]]
You wouldn't be asking [http://buy-cheap-xanax.umaxnet.com/ buy cheap xanax] [http://www.zorpia.com/xfarm tramadol online] How did not sold and he! It seemed unaware
[http://www.geocities.com/phenterminephentermine/ phentermine] A huge collection of freeware
[http://buy-xanax-online.umaxnet.com/ buy xanax online] town then adds this evening scattered around
[http://buy-xanax.umaxnet.com/ buy xanax]  
[http://xanax-on-line.umaxnet.com/ xanax on line]
[http://2mg-xanax.umaxnet.com/ 2mg xanax] [http://generic-xanax.umaxnet.com/ generic xanax]  
</div>

Latest revision as of 08:30, 6 January 2017

Pixar/Apple Pixlet codec. Reportedly based on a wavelet transform and encodes only I-frames. FFmpeg have open source decoder. This codec was designed as an editing format and is rarely used for media distribution.

Frame Format

Frame Header

All values are 32-bit big-endian words.

  0- 3  -- frame size
  4- 7  -- version, supposed to be 1
  8-11  -- ???
 12-15  -- should be 0x01000000
 16-19  -- ???
 20-23  -- width
 24-27  -- height
 28-31  -- number of levels (should be 4)
 32-35  -- ???
 36-39  -- some number * 1000
 40-43  -- coded planes size?

Each plane starts with (level*2) words that contain scaling parameters used in wavelet reconstruction (horizontal/vertical) multiplied by 1000000 followed by lowpass subband and (level*3) highpass subbands.

Lowpass subband coding

Decoding order:

  • top left pixel (as 16-bit BE, no special coding)
  • top row (without the first pixel)
  • left column (without the first pixel)
  • the rest of pixels

After decoding pixel data is top+left predicted, i.e. dst[x][y] += dst[x-1][y] + dst[x][y-1];

Coefficients are decoded as adaptive Rice codes in form of val, [skip]:

 flag = 0;
 rparam      = 3;
 quant       = 120;
 max_length  = 14;
 max_zlength = 
 while (!done) {
   nbits = log2((rparam >> 8) + 3);
   if (nbits > max_length)
     nbits = max_length;
   if (show_bits(8) == 0xFF) {
     skip_bits(8);
     val = get_bits(16);
   } else {
     pfx = show_unary(); // like 111110 -> 5
     val = ((1 << nbits) - 1) * pfx + get_bits(nbits) - 1;
   }
   val += flag;
   if (val & 1)
     *dst++ = -((val + 1) >> 1);
   else
     *dst++ =   (val + 1) >> 1;
 
   rparam += quant * (val - (rparam >> 8));
   flag = 0;
 
   if (rparam * 4 > 0xFF && dst < dst_end) {
     nbits = log2(rparam) + ((rparam + 8) >> 5) - 24;
     if (nbits > max_zlength)
       nbits = max_zlength;
     if (show_bits(8) == 0xFF) {
       skip_bits(8);
       val = get_bits(16);
     } else {
       pfx = show_unary(); // like 111110 -> 5
       val = ((1 << nbits) - 1) * pfx + get_bits(nbits) - 1;
     }
     rparam = 0;
     if (val <= 0xFFFE)
       flag = 1;
     dst += val;
   }
 }

Highpass subbands coding

Header:

  0- 3 -- some negative value
  4- 7 -- some positive value
  8-11 -- some parameter
 12-15 -- some parameter 2
 16-19 -- 0xDEADBEEF

Coefficients decoding is done similarly to the lowpass subband decoding except that some parameters are taken from the subband header.

Wavelet filters

Edges:

 -0.07576144003329376
  0.8586296626673486
 -0.07576144003329376
  0.3535533905932737
  0.3535533905932737

Main:

 -0.01515228715813062
  0.3687056777514043
  0.3687056777514043
 -0.01515228715813062

  0.07071067811865475
 -0.8485281374238569
  0.07071067811865475