~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Open Mash Cross Reference
mash/codec/postdct.h

Component: ~ [ mash ] ~ [ apps ] ~ [ gsm ] ~ [ lib ] ~ [ otcl ] ~ [ srm ] ~ [ tcl8.3 ] ~ [ tclcl ] ~ [ tk8.3 ] ~ [ tutorials ] ~

  1 /*
  2  * postdct.h --
  3  *
  4  * Post-DCT Deblocking Algorithms.
  5  *
  6  * Derived from original code provided by Jim Chou. For more information see
  7  * http://www-wavelet.eecs.berkeley.edu/~jimchou/deblock.html. Published in:
  8  *
  9  * <J. Chou, M. Crouse & K. Ramchandran "A simple algorithm for
 10  * removing blocking artifacts in block-transform coded images,"
 11  * Proc. of International Conference on Image Processing, ICIP,
 12  * Chicago, IL, Oct. 1998.>
 13  *
 14  * <J. Chou, M. Crouse & K. Ramchandran "A simple algorithm for
 15  * removing blocking artifacts in block-transform coded images," IEEE
 16  * Signal Processing Letters, Feb. 1998, Vol. 5, No. 2., pp.33-35.>
 17  *
 18  * Copyright (c) 1993-2002 The Regents of the University of California.
 19  * All rights reserved.
 20  *
 21  * Redistribution and use in source and binary forms, with or without
 22  * modification, are permitted provided that the following conditions are met:
 23  *
 24  * A. Redistributions of source code must retain the above copyright notice,
 25  *    this list of conditions and the following disclaimer.
 26  * B. Redistributions in binary form must reproduce the above copyright notice,
 27  *    this list of conditions and the following disclaimer in the documentation
 28  *    and/or other materials provided with the distribution.
 29  * C. Neither the names of the copyright holders nor the names of its
 30  *    contributors may be used to endorse or promote products derived from this
 31  *    software without specific prior written permission.
 32  *
 33  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
 34  * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 35  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 36  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
 37  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 38  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 39  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 40  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 41  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 42  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 43  * POSSIBILITY OF SUCH DAMAGE.
 44  *
 45  * @(#) $Header: /usr/mash/src/repository/mash/mash-1/codec/postdct.h,v 1.4 2003/11/19 19:20:17 aswan Exp $
 46  */
 47 
 48 #ifndef MASH_POSTDCT_H
 49 #define MASH_POSTDCT_H
 50 
 51 #include "rtp/config.h"
 52 
 53 /*
 54  * Define codec types.
 55  */
 56 #define CODEC_ANY  0
 57 #define CODEC_JPEG 1
 58 #define CODEC_H261 2
 59 
 60 /*
 61  * get_threshold returns the calculated image threshold value sqrt(T)
 62  * for the *image based on the 8x8 quantization table *quant. h_size
 63  * and v_size are the dimensions of the image.
 64  *
 65  * The second version of get_threshold returns a heuristic threshold
 66  * value based on the type of codec and the quality value it was
 67  * encoded at.
 68  */
 69 double get_threshold(u_int8_t *image, int h_size, int v_size, const short *quant);
 70 double get_threshold(int codec, int quality);
 71 
 72 /*
 73  * deblock applies some calculations to 8x8 image blocks in the *image
 74  * provided. v_thresh, h_thresh, and vis_thresh are calculation
 75  * thresholds. h_size and v_size are the dimensions of the image.
 76  *
 77  * The second version of deblock is used when you only want to apply
 78  * the deblocking to a certain portion of the image. offset is how far
 79  * into the image we should go before starting to deblock things, and
 80  * strip_length is how far across a row we should deblock. h_size
 81  * should be the same as above, but v_size may be a variable amount
 82  * which indicates how many rows to deblock.
 83  */
 84 void deblock(u_int8_t *image, double v_thresh, double h_thresh, double
 85              vis_thresh, int h_size, int v_size);
 86 void deblock(u_int8_t *image, double v_thresh, double h_thresh, double
 87              vis_thresh, int h_size, int v_size, int offset, int
 88              strip_length);
 89 
 90 #endif // MASH_POSTDCT_H
 91 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.