summaryrefslogtreecommitdiff
path: root/audio_codec/libcook/rasl.h (plain)
blob: 9eff86611c77cb3f43b34c379742d25da23499d4
1/* ***** BEGIN LICENSE BLOCK *****
2 * Source last modified: $Id: rasl.h,v 1.1.1.1.2.1 2005/05/04 18:21:33 hubbe Exp $
3 *
4 * REALNETWORKS CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM
5 * Portions Copyright (c) 1995-2005 RealNetworks, Inc.
6 * All Rights Reserved.
7 *
8 * The contents of this file, and the files included with this file,
9 * are subject to the current version of the Real Format Source Code
10 * Porting and Optimization License, available at
11 * https://helixcommunity.org/2005/license/realformatsource (unless
12 * RealNetworks otherwise expressly agrees in writing that you are
13 * subject to a different license). You may also obtain the license
14 * terms directly from RealNetworks. You may not use this file except
15 * in compliance with the Real Format Source Code Porting and
16 * Optimization License. There are no redistribution rights for the
17 * source code of this file. Please see the Real Format Source Code
18 * Porting and Optimization License for the rights, obligations and
19 * limitations governing use of the contents of the file.
20 *
21 * RealNetworks is the developer of the Original Code and owns the
22 * copyrights in the portions it created.
23 *
24 * This file, and the files included with this file, is distributed and
25 * made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND,
26 * EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL
27 * SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT
29 * OR NON-INFRINGEMENT.
30 *
31 * Technology Compatibility Kit Test Suite(s) Location:
32 * https://rarvcode-tck.helixcommunity.org
33 *
34 * Contributor(s):
35 *
36 * ***** END LICENSE BLOCK ***** */
37
38#ifndef RASL_H
39#define RASL_H
40
41#include "helix_types.h"
42
43/* Must regenerate table if these are changed! */
44#define RA50_NCODEBYTES 18.5 /* bytes per 5.0kbps sl frame */
45#define RA65_NCODEBYTES 14.5 /* bytes per 6.5kbps sl frame */
46#define RA85_NCODEBYTES 19 /* bytes per 8.5kbps sl frame */
47#define RA160_NCODEBYTES 20 /* bytes per 16.0kbps sl frame */
48
49#define RA50_NCODEBITS 148 /* bits per 5.0kbps sl frame */
50#define RA65_NCODEBITS 116 /* bits per 6.5kbps sl frame */
51#define RA85_NCODEBITS 152 /* bits per 8.5kbps sl frame */
52#define RA160_NCODEBITS 160 /* bits per 16.0kbps sl frame */
53
54#define RASL_MAXCODEBYTES 20 /* max bytes per sl frame */
55#define RASL_NFRAMES 16 /* frames per block - must match codec */
56#define RASL_NBLOCKS 6 /* blocks to interleave across */
57#define RASL_BLOCK_NUM(i) ((i) >> 4) /* assumes RASL_NFRAMES = 16 */
58#define RASL_BLOCK_OFF(i) ((i) & 0xf) /* assumes RASL_NFRAMES = 16 */
59
60
61void RASL_DeInterleave(char *buf, unsigned long ulBufSize, int type, ULONG32 * pFlags);
62
63void ra_bitcopy(unsigned char* toPtr,
64 unsigned long ulToBufSize,
65 unsigned char* fromPtr,
66 unsigned long ulFromBufSize,
67 int bitOffsetTo,
68 int bitOffsetFrom,
69 int numBits);
70
71#endif /* #ifndef RASL_H */
72