speed-up GetResidualCost()

+ misc cosmetics and code polishing

Change-Id: I5830cd2f268d64c072b1cbccc0a4674833875055
This commit is contained in:
Pascal Massimino
2012-01-23 00:58:09 -08:00
parent 378086bd0a
commit 28a9d9b41a
10 changed files with 163 additions and 144 deletions

View File

@ -136,13 +136,13 @@ static WebPEncodingError PutVP8FrameHeader(const WebPPicture* const pic,
| (profile << 1) // profile (3b)
| (1 << 4) // visible (1b)
| ((uint32_t)size0 << 5); // partition length (19b)
vp8_frm_hdr[0] = bits & 0xff;
vp8_frm_hdr[1] = (bits >> 8) & 0xff;
vp8_frm_hdr[0] = (bits >> 0) & 0xff;
vp8_frm_hdr[1] = (bits >> 8) & 0xff;
vp8_frm_hdr[2] = (bits >> 16) & 0xff;
// signature
vp8_frm_hdr[3] = (KSIGNATURE >> 16) & 0xff;
vp8_frm_hdr[4] = (KSIGNATURE >> 8) & 0xff;
vp8_frm_hdr[5] = (KSIGNATURE >> 0) & 0xff;
vp8_frm_hdr[4] = (KSIGNATURE >> 8) & 0xff;
vp8_frm_hdr[5] = (KSIGNATURE >> 0) & 0xff;
// dimensions
vp8_frm_hdr[6] = pic->width & 0xff;
vp8_frm_hdr[7] = pic->width >> 8;