OSDN Git Service

Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 30 Dec 2013 10:23:32 +0000 (11:23 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 30 Dec 2013 10:23:32 +0000 (11:23 +0100)
* qatar/master:
  lavu: Move preprocessor macros in a separate file

Conflicts:
libavutil/avutil.h
libavutil/utils.c
libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavutil/Makefile
libavutil/avutil.h
libavutil/macros.h
libavutil/utils.c
libavutil/version.h

Simple merge
@@@ -274,49 -272,9 +280,50 @@@ char av_get_picture_type_char(enum AVPi
   * @}
   */
  
 +#include "common.h"
  #include "error.h"
  #include "version.h"
+ #include "macros.h"
 +#include "mathematics.h"
 +#include "rational.h"
 +#include "log.h"
 +#include "pixfmt.h"
 +
 +/**
 + * Return x default pointer in case p is NULL.
 + */
 +static inline void *av_x_if_null(const void *p, const void *x)
 +{
 +    return (void *)(intptr_t)(p ? p : x);
 +}
 +
 +/**
 + * Compute the length of an integer list.
 + *
 + * @param elsize  size in bytes of each list element (only 1, 2, 4 or 8)
 + * @param term    list terminator (usually 0 or -1)
 + * @param list    pointer to the list
 + * @return  length of the list, in elements, not counting the terminator
 + */
 +unsigned av_int_list_length_for_size(unsigned elsize,
 +                                     const void *list, uint64_t term) av_pure;
 +
 +/**
 + * Compute the length of an integer list.
 + *
 + * @param term  list terminator (usually 0 or -1)
 + * @param list  pointer to the list
 + * @return  length of the list, in elements, not counting the terminator
 + */
 +#define av_int_list_length(list, term) \
 +    av_int_list_length_for_size(sizeof(*(list)), list, term)
 +
 +/**
 + * Open a file using a UTF-8 filename.
 + * The API of this function matches POSIX fopen(), errors are returned through
 + * errno.
 + */
 +FILE *av_fopen_utf8(const char *path, const char *mode);
  
  /**
   * @}
index 0000000,bf3eb9b..4465323
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,48 +1,48 @@@
 - * This file is part of Libav.
+ /*
 - * Libav is free software; you can redistribute it and/or
++ * This file is part of FFmpeg.
+  *
 - * Libav is distributed in the hope that it will be useful,
++ * 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.
+  *
 - * License along with Libav; if not, write to the Free Software
++ * 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
+  */
+ /**
+  * @file
+  * @ingroup lavu
+  * Utility Preprocessor macros
+  */
+ #ifndef AVUTIL_MACROS_H
+ #define AVUTIL_MACROS_H
+ /**
+  * @addtogroup preproc_misc Preprocessor String Macros
+  *
+  * String manipulation macros
+  *
+  * @{
+  */
+ #define AV_STRINGIFY(s)         AV_TOSTRING(s)
+ #define AV_TOSTRING(s) #s
+ #define AV_GLUE(a, b) a ## b
+ #define AV_JOIN(a, b) AV_GLUE(a, b)
+ /**
+  * @}
+  */
+ #define AV_PRAGMA(s) _Pragma(#s)
+ #endif /* AVUTIL_MACROS_H */
   */
  
  #include "config.h"
- #include "version.h"
+ #include "avutil.h"
 +#include "avassert.h"
 +#include "samplefmt.h"
 +#include "pixdesc.h"
  
  /**
   * @file
Simple merge