media/libvpx/vp8/common/invtrans.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /*
     2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
     3  *
     4  *  Use of this source code is governed by a BSD-style license
     5  *  that can be found in the LICENSE file in the root of the source
     6  *  tree. An additional intellectual property rights grant can be found
     7  *  in the file PATENTS.  All contributing project authors may
     8  *  be found in the AUTHORS file in the root of the source tree.
     9  */
    12 #ifndef __INC_INVTRANS_H
    13 #define __INC_INVTRANS_H
    15 #include "vpx_config.h"
    16 #include "vp8_rtcd.h"
    17 #include "blockd.h"
    18 #include "onyxc_int.h"
    20 #if CONFIG_MULTITHREAD
    21 #include "vpx_mem/vpx_mem.h"
    22 #endif
    24 static void eob_adjust(char *eobs, short *diff)
    25 {
    26     /* eob adjust.... the idct can only skip if both the dc and eob are zero */
    27     int js;
    28     for(js = 0; js < 16; js++)
    29     {
    30         if((eobs[js] == 0) && (diff[0] != 0))
    31             eobs[js]++;
    32         diff+=16;
    33     }
    34 }
    36 static void vp8_inverse_transform_mby(MACROBLOCKD *xd)
    37 {
    38     short *DQC = xd->dequant_y1;
    40     if (xd->mode_info_context->mbmi.mode != SPLITMV)
    41     {
    42         /* do 2nd order transform on the dc block */
    43         if (xd->eobs[24] > 1)
    44         {
    45             vp8_short_inv_walsh4x4
    46                 (&xd->block[24].dqcoeff[0], xd->qcoeff);
    47         }
    48         else
    49         {
    50             vp8_short_inv_walsh4x4_1
    51                 (&xd->block[24].dqcoeff[0], xd->qcoeff);
    52         }
    53         eob_adjust(xd->eobs, xd->qcoeff);
    55         DQC = xd->dequant_y1_dc;
    56     }
    57     vp8_dequant_idct_add_y_block
    58                     (xd->qcoeff, DQC,
    59                      xd->dst.y_buffer,
    60                      xd->dst.y_stride, xd->eobs);
    61 }
    62 #endif

mercurial