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.

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

mercurial