annotate bfin/bswap.h @ 733:6676b1979b68 libavutil

Add missing '*' to av_tree_insert() doxy.
author stefano
date Sat, 09 May 2009 23:00:46 +0000
parents 70bdd5501662
children 4d9ad0ed07d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
582
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
1 /*
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
2 * Copyright (C) 2007 Marc Hoffman
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
3 *
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
4 * This file is part of FFmpeg.
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
5 *
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
10 *
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
14 * Lesser General Public License for more details.
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
15 *
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
19 */
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
20
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
21 /**
642
70bdd5501662 Use full internal pathname in doxygen @file directives.
diego
parents: 582
diff changeset
22 * @file libavutil/bfin/bswap.h
582
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
23 * byte swapping routines
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
24 */
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
25
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
26 #ifndef AVUTIL_BFIN_BSWAP_H
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
27 #define AVUTIL_BFIN_BSWAP_H
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
28
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
29 #include <stdint.h>
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
30 #include "config.h"
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
31 #include "libavutil/common.h"
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
32
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
33 #define bswap_32 bswap_32
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
34 static av_always_inline av_const uint32_t bswap_32(uint32_t x)
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
35 {
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
36 unsigned tmp;
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
37 __asm__("%1 = %0 >> 8 (V); \n\t"
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
38 "%0 = %0 << 8 (V); \n\t"
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
39 "%0 = %0 | %1; \n\t"
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
40 "%0 = PACK(%0.L, %0.H); \n\t"
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
41 : "+d"(x), "=&d"(tmp));
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
42 return x;
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
43 }
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
44
57da90f7c680 split bswap.h into per-arch files
mru
parents:
diff changeset
45 #endif /* AVUTIL_BFIN_BSWAP_H */