Mercurial > libavcodec.hg
annotate opt.h @ 5172:60a4f209838b libavcodec
Decouple bit context from h264 context in decode_ref_pic_marking()
(done in order to implement slice-level parallel decoding)
Patch by Andreas ªÓman % andreas olebyn nu %
Original thread:
Date: Jun 15, 2007 10:10 PM
Subject: [FFmpeg-devel] [PATCH] h264 parallelized, (was: Parallelized h264 proof-of-concept)
author | gpoirier |
---|---|
date | Tue, 19 Jun 2007 21:34:04 +0000 |
parents | 4394344397d8 |
children | 4623928e3b9e |
rev | line source |
---|---|
3699
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
1 /* |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
2 * AVOptions |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
3 * copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at> |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
4 * |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3702
diff
changeset
|
5 * This file is part of FFmpeg. |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3702
diff
changeset
|
6 * |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3702
diff
changeset
|
7 * FFmpeg is free software; you can redistribute it and/or |
3699
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
9 * License as published by the Free Software Foundation; either |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3702
diff
changeset
|
10 * version 2.1 of the License, or (at your option) any later version. |
3699
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
11 * |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3702
diff
changeset
|
12 * FFmpeg is distributed in the hope that it will be useful, |
3699
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
15 * Lesser General Public License for more details. |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
16 * |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
17 * You should have received a copy of the GNU Lesser General Public |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3702
diff
changeset
|
18 * License along with FFmpeg; if not, write to the Free Software |
3699
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
20 */ |
c537a97eec66
Add official LGPL license headers to the files that were missing them.
diego
parents:
2967
diff
changeset
|
21 |
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
22 #ifndef AVOPT_H |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
23 #define AVOPT_H |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
24 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
25 /** |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
26 * @file opt.h |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
27 * AVOptions |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
28 */ |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
29 |
5162 | 30 #include "rational.h" |
31 | |
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
32 enum AVOptionType{ |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
33 FF_OPT_TYPE_FLAGS, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
34 FF_OPT_TYPE_INT, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
35 FF_OPT_TYPE_INT64, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
36 FF_OPT_TYPE_DOUBLE, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
37 FF_OPT_TYPE_FLOAT, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
38 FF_OPT_TYPE_STRING, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
39 FF_OPT_TYPE_RATIONAL, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
40 FF_OPT_TYPE_CONST=128, |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
41 }; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
42 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
43 /** |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
44 * AVOption. |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
45 */ |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
46 typedef struct AVOption { |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
47 const char *name; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
48 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
49 /** |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
50 * short English text help. |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
51 * @fixme what about other languages |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
52 */ |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
53 const char *help; |
2967 | 54 int offset; ///< offset to context structure where the parsed value should be stored |
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
55 enum AVOptionType type; |
2967 | 56 |
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
57 double default_val; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
58 double min; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
59 double max; |
2967 | 60 |
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
61 int flags; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
62 #define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
63 #define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
64 #define AV_OPT_FLAG_METADATA 4 ///< some data extracted or inserted into the file like title, comment, ... |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
65 #define AV_OPT_FLAG_AUDIO_PARAM 8 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
66 #define AV_OPT_FLAG_VIDEO_PARAM 16 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
67 #define AV_OPT_FLAG_SUBTITLE_PARAM 32 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
68 //FIXME think about enc-audio, ... style flags |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
69 const char *unit; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
70 } AVOption; |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
71 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
72 |
4628
b0016ed89048
make av_find_opt() available to the public and add a mask+flags parameter to search for specific AVOptions
michael
parents:
4369
diff
changeset
|
73 const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags); |
4369
e10acab2322a
Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
lu_zero
parents:
3947
diff
changeset
|
74 const AVOption *av_set_string(void *obj, const char *name, const char *val); |
e10acab2322a
Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
lu_zero
parents:
3947
diff
changeset
|
75 const AVOption *av_set_double(void *obj, const char *name, double n); |
e10acab2322a
Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
lu_zero
parents:
3947
diff
changeset
|
76 const AVOption *av_set_q(void *obj, const char *name, AVRational n); |
e10acab2322a
Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
lu_zero
parents:
3947
diff
changeset
|
77 const AVOption *av_set_int(void *obj, const char *name, int64_t n); |
e10acab2322a
Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
lu_zero
parents:
3947
diff
changeset
|
78 double av_get_double(void *obj, const char *name, const AVOption **o_out); |
e10acab2322a
Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
lu_zero
parents:
3947
diff
changeset
|
79 AVRational av_get_q(void *obj, const char *name, const AVOption **o_out); |
e10acab2322a
Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
lu_zero
parents:
3947
diff
changeset
|
80 int64_t av_get_int(void *obj, const char *name, const AVOption **o_out); |
e10acab2322a
Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
lu_zero
parents:
3947
diff
changeset
|
81 const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len); |
e10acab2322a
Constantize AVOption, solve few warnings, patch from flameeyes@gentoo.org aka "the other Diego"
lu_zero
parents:
3947
diff
changeset
|
82 const AVOption *av_next_option(void *obj, const AVOption *last); |
2876 | 83 int av_opt_show(void *obj, void *av_log_obj); |
3702 | 84 void av_opt_set_defaults(void *s); |
4629
2faa1399dd68
add av_opt_set_defaults2() which sets just defaults from AVOptions whos flags match a user specified & mask = flags
michael
parents:
4628
diff
changeset
|
85 void av_opt_set_defaults2(void *s, int mask, int flags); |
2874
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
86 |
b6def74f5811
flags and named constants with type checking of course for AVOption
michael
parents:
diff
changeset
|
87 #endif |