annotate libschroedinger.h @ 9871:4433ce8ef249 libavcodec

Simplify run level decoding: - remove unneeded vlc code < 0 check - reorder vlc code handling so that the unlikely escape decoding part comes last - move overflow check out of the decode loop - branchless sign conversion
author faust3
date Sat, 20 Jun 2009 11:06:48 +0000
parents e9d9d946f213
children acbb86a779b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6738
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
1 /*
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
2 * Copyright (c) 2008 BBC, Anuradha Suraparaju <asuraparaju at gmail dot com >
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
3 *
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
4 * This file is part of FFmpeg.
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
5 *
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
10 *
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
14 * Lesser General Public License for more details.
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
15 *
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
19 */
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
20
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
21 /**
8718
e9d9d946f213 Use full internal pathname in doxygen @file directives.
diego
parents: 8590
diff changeset
22 * @file libavcodec/libschroedinger.h
6738
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
23 * data structures common to libschroedingerdec.c and libschroedingerenc.c
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
24 */
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
25
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 6738
diff changeset
26 #ifndef AVCODEC_LIBSCHROEDINGER_H
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 6738
diff changeset
27 #define AVCODEC_LIBSCHROEDINGER_H
6738
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
28
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
29 #include "config.h"
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
30
8590
7a463923ecd1 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 7760
diff changeset
31 #if CONFIG_LIBSCHROEDINGER
6738
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
32
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
33 #include <schroedinger/schrobitstream.h>
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
34 #include <schroedinger/schroframe.h>
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
35 #include "avcodec.h"
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
36
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
37 static const struct {
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
38 enum PixelFormat ff_pix_fmt;
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
39 SchroChromaFormat schro_pix_fmt;
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
40 SchroFrameFormat schro_frame_fmt;
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
41 } ffmpeg_schro_pixel_format_map[] = {
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
42 { PIX_FMT_YUV420P, SCHRO_CHROMA_420, SCHRO_FRAME_FORMAT_U8_420 },
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
43 { PIX_FMT_YUV422P, SCHRO_CHROMA_422, SCHRO_FRAME_FORMAT_U8_422 },
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
44 { PIX_FMT_YUV444P, SCHRO_CHROMA_444, SCHRO_FRAME_FORMAT_U8_444 },
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
45 };
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
46
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
47 /**
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
48 * Returns the video format preset matching the input video dimensions and
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
49 * time base.
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
50 */
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
51 SchroVideoFormatEnum ff_get_schro_video_format_preset (AVCodecContext *avccontext);
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
52
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
53 /**
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
54 * Sets the Schroedinger frame format corresponding to the Schro chroma format
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
55 * passed. Returns 0 on success, -1 on failure.
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
56 */
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
57 int ff_get_schro_frame_format (SchroChromaFormat schro_chroma_fmt,
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
58 SchroFrameFormat *schro_frame_fmt);
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
59
bdacae101076 Add Dirac support through libschroedinger.
diego
parents:
diff changeset
60 #endif /* CONFIG_LIBSCHROEDINGER */
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 6738
diff changeset
61 #endif /* AVCODEC_LIBSCHROEDINGER_H */