/* * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/** * Access a field in a structure by its offset.
*/ #define FF_FIELD_AT(type, off, obj) (*(type *)((char *)&(obj) + (off)))
/** * Return NULL if CONFIG_SMALL is true, otherwise the argument * without modification. Used to disable the definition of strings.
*/ #if CONFIG_SMALL # define NULL_IF_CONFIG_SMALL(x) NULL #else # define NULL_IF_CONFIG_SMALL(x) x #endif
/** * Log a generic warning message about a missing feature. * * @param[in] avc a pointer to an arbitrary struct of which the first * field is a pointer to an AVClass struct * @param[in] msg string containing the name of the missing feature
*/ void avpriv_report_missing_feature(void *avc, constchar *msg, ...) av_printf_format(2, 3);
/** * Log a generic warning message about a missing feature. * Additionally request that a sample showcasing the feature be uploaded. * * @param[in] avc a pointer to an arbitrary struct of which the first field is * a pointer to an AVClass struct * @param[in] msg string containing the name of the missing feature
*/ void avpriv_request_sample(void *avc, constchar *msg, ...) av_printf_format(2, 3);
// For debuging we use signed operations so overflows can be detected (by ubsan) // For production we use unsigned so there are no undefined operations #ifdef CHECKED #define SUINT int #define SUINT32 int32_t #else #define SUINT unsigned #define SUINT32 uint32_t #endif
static av_always_inline av_const int avpriv_mirror(int x, int w)
{ if (!w) return 0;
while ((unsigned)x > (unsigned)w) {
x = -x; if (x < 0)
x += 2 * w;
} return x;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.