annotate sh4/sh4.h @ 10345:294c444866f7 libavcodec

Make avcodec_open set codec_id and codec_type if they haven't been set. This fixes the API breakage introduced by the check that avctx codec id and type match the opened codec and should make (almost?) all applications work again.
author reimar
date Thu, 01 Oct 2009 15:54:55 +0000
parents 2494834954ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8177
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
1 /*
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
2 * Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
3 *
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
4 * This file is part of FFmpeg.
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
5 *
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
10 *
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
14 * Lesser General Public License for more details.
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
15 *
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
19 */
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
20
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
21 #ifndef AVCODEC_SH4_SH4_H
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
22 #define AVCODEC_SH4_SH4_H
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
23
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
24 #ifdef __SH4__
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
25 # define fp_single_enter(fpscr) \
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
26 do { \
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
27 __asm__ volatile ("sts fpscr, %0 \n\t" \
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
28 "and %1, %0 \n\t" \
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
29 "lds %0, fpscr \n\t" \
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
30 : "=&r"(fpscr) : "r"(~(1<<19))); \
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
31 } while (0)
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
32
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
33 # define fp_single_leave(fpscr) \
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
34 do { \
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
35 __asm__ volatile ("or %1, %0 \n\t" \
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
36 "lds %0, fpscr \n\t" \
8555
2494834954ea SH4: fix typo in asm constraint
mru
parents: 8177
diff changeset
37 : "+r"(fpscr) : "r"(1<<19)); \
8177
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
38 } while (0)
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
39 #else
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
40 # define fp_single_enter(fpscr) ((void)fpscr)
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
41 # define fp_single_leave(fpscr)
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
42 #endif
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
43
484c83d8e9a8 SH4: add macros for setting and restoring FPSCR.PR bit
mru
parents:
diff changeset
44 #endif /* AVCODEC_SH4_SH4_H */