[FFmpeg-cvslog] r16037 - in trunk/libavcodec: aac.c ac3dec.c avcodec.h eac3dec.c internal.h qcelpdec.c utils.c

stefano subversion
Mon Dec 8 22:21:38 CET 2008


Author: stefano
Date: Mon Dec  8 22:21:38 2008
New Revision: 16037

Log:
Make av_log_missing_feature an internal function, and change its name
to ff_log_missing_feature.


Added:
   trunk/libavcodec/internal.h   (contents, props changed)
Modified:
   trunk/libavcodec/aac.c
   trunk/libavcodec/ac3dec.c
   trunk/libavcodec/avcodec.h
   trunk/libavcodec/eac3dec.c
   trunk/libavcodec/qcelpdec.c
   trunk/libavcodec/utils.c

Modified: trunk/libavcodec/aac.c
==============================================================================
--- trunk/libavcodec/aac.c	(original)
+++ trunk/libavcodec/aac.c	Mon Dec  8 22:21:38 2008
@@ -77,6 +77,7 @@
 
 
 #include "avcodec.h"
+#include "internal.h"
 #include "bitstream.h"
 #include "dsputil.h"
 #include "lpc.h"
@@ -262,7 +263,7 @@ static int decode_ga_specific_config(AAC
     int extension_flag, ret;
 
     if(get_bits1(gb)) {  // frameLengthFlag
-        av_log_missing_feature(ac->avccontext, "960/120 MDCT window is", 1);
+        ff_log_missing_feature(ac->avccontext, "960/120 MDCT window is", 1);
         return -1;
     }
 
@@ -521,7 +522,7 @@ static int decode_ics_info(AACContext * 
                 memset(ics, 0, sizeof(IndividualChannelStream));
                 return -1;
             } else {
-                av_log_missing_feature(ac->avccontext, "Predictor bit set but LTP is", 1);
+                ff_log_missing_feature(ac->avccontext, "Predictor bit set but LTP is", 1);
                 memset(ics, 0, sizeof(IndividualChannelStream));
                 return -1;
             }
@@ -955,7 +956,7 @@ static int decode_ics(AACContext * ac, S
         if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics))
             return -1;
         if (get_bits1(gb)) {
-            av_log_missing_feature(ac->avccontext, "SSR", 1);
+            ff_log_missing_feature(ac->avccontext, "SSR", 1);
             return -1;
         }
     }
@@ -1159,7 +1160,7 @@ static int decode_cce(AACContext * ac, G
  */
 static int decode_sbr_extension(AACContext * ac, GetBitContext * gb, int crc, int cnt) {
     // TODO : sbr_extension implementation
-    av_log_missing_feature(ac->avccontext, "SBR", 0);
+    ff_log_missing_feature(ac->avccontext, "SBR", 0);
     skip_bits_long(gb, 8*cnt - 4); // -4 due to reading extension type
     return cnt;
 }

Modified: trunk/libavcodec/ac3dec.c
==============================================================================
--- trunk/libavcodec/ac3dec.c	(original)
+++ trunk/libavcodec/ac3dec.c	Mon Dec  8 22:21:38 2008
@@ -35,6 +35,7 @@
 #include <string.h>
 
 #include "libavutil/crc.h"
+#include "internal.h"
 #include "ac3_parser.h"
 #include "ac3dec.h"
 #include "ac3dec_data.h"
@@ -826,7 +827,7 @@ static int decode_audio_block(AC3DecodeC
     /* spectral extension strategy */
     if (s->eac3 && (!blk || get_bits1(gbc))) {
         if (get_bits1(gbc)) {
-            av_log_missing_feature(s->avctx, "Spectral extension", 1);
+            ff_log_missing_feature(s->avctx, "Spectral extension", 1);
             return -1;
         }
         /* TODO: parse spectral extension strategy info */
@@ -851,7 +852,7 @@ static int decode_audio_block(AC3DecodeC
             /* check for enhanced coupling */
             if (s->eac3 && get_bits1(gbc)) {
                 /* TODO: parse enhanced coupling strategy info */
-                av_log_missing_feature(s->avctx, "Enhanced coupling", 1);
+                ff_log_missing_feature(s->avctx, "Enhanced coupling", 1);
                 return -1;
             }
 

Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h	(original)
+++ trunk/libavcodec/avcodec.h	Mon Dec  8 22:21:38 2008
@@ -31,7 +31,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR 52
 #define LIBAVCODEC_VERSION_MINOR  6
-#define LIBAVCODEC_VERSION_MICRO  0
+#define LIBAVCODEC_VERSION_MICRO  1
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
@@ -2998,18 +2998,6 @@ int av_parse_video_frame_size(int *width
  */
 int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
 
-/**
- * Logs 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] feature string containing the name of the missing feature
- * @param[in] want_sample indicates if samples are wanted which exhibit this feature.
- * If \p want_sample is non-zero, additional verbage will be added to the log
- * message which tells the user how to report samples to the development
- * mailing list.
- */
-void av_log_missing_feature(void *avc, const char *feature, int want_sample);
-
 /* error handling */
 #if EINVAL > 0
 #define AVERROR(e) (-(e)) /**< Returns a negative error code from a POSIX error code, to return from library functions. */

Modified: trunk/libavcodec/eac3dec.c
==============================================================================
--- trunk/libavcodec/eac3dec.c	(original)
+++ trunk/libavcodec/eac3dec.c	Mon Dec  8 22:21:38 2008
@@ -21,6 +21,7 @@
  */
 
 #include "avcodec.h"
+#include "internal.h"
 #include "ac3.h"
 #include "ac3_parser.h"
 #include "ac3dec.h"
@@ -182,7 +183,7 @@ int ff_eac3_parse_header(AC3DecodeContex
        application can select from. each independent stream can also contain
        dependent streams which are used to add or replace channels. */
     if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) {
-        av_log_missing_feature(s->avctx, "Dependent substream decoding", 1);
+        ff_log_missing_feature(s->avctx, "Dependent substream decoding", 1);
         return AC3_PARSE_ERROR_FRAME_TYPE;
     } else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) {
         av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n");
@@ -194,7 +195,7 @@ int ff_eac3_parse_header(AC3DecodeContex
        associated to an independent stream have matching substream id's. */
     if (s->substreamid) {
         /* only decode substream with id=0. skip any additional substreams. */
-        av_log_missing_feature(s->avctx, "Additional substreams", 1);
+        ff_log_missing_feature(s->avctx, "Additional substreams", 1);
         return AC3_PARSE_ERROR_FRAME_TYPE;
     }
 
@@ -203,7 +204,7 @@ int ff_eac3_parse_header(AC3DecodeContex
            rates in bit allocation.  The best assumption would be that it is
            handled like AC-3 DolbyNet, but we cannot be sure until we have a
            sample which utilizes this feature. */
-        av_log_missing_feature(s->avctx, "Reduced sampling rates", 1);
+        ff_log_missing_feature(s->avctx, "Reduced sampling rates", 1);
         return -1;
     }
     skip_bits(gbc, 5); // skip bitstream id
@@ -460,7 +461,7 @@ int ff_eac3_parse_header(AC3DecodeContex
 
     /* spectral extension attenuation data */
     if (parse_spx_atten_data) {
-        av_log_missing_feature(s->avctx, "Spectral extension attenuation", 1);
+        ff_log_missing_feature(s->avctx, "Spectral extension attenuation", 1);
         for (ch = 1; ch <= s->fbw_channels; ch++) {
             if (get_bits1(gbc)) { // channel has spx attenuation
                 skip_bits(gbc, 5); // skip spx attenuation code
@@ -476,7 +477,7 @@ int ff_eac3_parse_header(AC3DecodeContex
            It is likely the offset of each block within the frame. */
         int block_start_bits = (s->num_blocks-1) * (4 + av_log2(s->frame_size-2));
         skip_bits_long(gbc, block_start_bits);
-        av_log_missing_feature(s->avctx, "Block start info", 1);
+        ff_log_missing_feature(s->avctx, "Block start info", 1);
     }
 
     /* syntax state initialization */

Added: trunk/libavcodec/internal.h
==============================================================================
--- (empty file)
+++ trunk/libavcodec/internal.h	Mon Dec  8 22:21:38 2008
@@ -0,0 +1,39 @@
+/*
+ * 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
+ */
+
+/**
+ * @file internal.h
+ * common internal api header.
+ */
+
+#ifndef AVCODEC_INTERNAL_H
+#define AVCODEC_INTERNAL_H
+
+/**
+ * Logs 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] feature string containing the name of the missing feature
+ * @param[in] want_sample indicates if samples are wanted which exhibit this feature.
+ * If \p want_sample is non-zero, additional verbage will be added to the log
+ * message which tells the user how to report samples to the development
+ * mailing list.
+ */
+void ff_log_missing_feature(void *avc, const char *feature, int want_sample);
+
+#endif /* AVCODEC_INTERNAL_H */

Modified: trunk/libavcodec/qcelpdec.c
==============================================================================
--- trunk/libavcodec/qcelpdec.c	(original)
+++ trunk/libavcodec/qcelpdec.c	Mon Dec  8 22:21:38 2008
@@ -30,6 +30,7 @@
 #include <stddef.h>
 
 #include "avcodec.h"
+#include "internal.h"
 #include "bitstream.h"
 
 #include "qcelpdata.h"
@@ -442,7 +443,7 @@ static void apply_gain_ctrl(float *v_out
             scalefactor = sqrt(ff_dot_productf(v_ref + j, v_ref + j, 40)
                         / scalefactor);
         else
-            av_log_missing_feature(NULL, "Zero energy for gain control", 1);
+            ff_log_missing_feature(NULL, "Zero energy for gain control", 1);
         for(len=j+40; j<len; j++)
             v_out[j] = scalefactor * v_in[j];
     }
@@ -655,7 +656,7 @@ static int determine_bitrate(AVCodecCont
     if(bitrate == SILENCE)
     {
         // FIXME: the decoder should not handle SILENCE frames as I_F_Q frames
-        av_log_missing_feature(avctx, "Blank frame", 1);
+        ff_log_missing_feature(avctx, "Blank frame", 1);
         bitrate = I_F_Q;
     }
     return bitrate;

Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c	(original)
+++ trunk/libavcodec/utils.c	Mon Dec  8 22:21:38 2008
@@ -1508,7 +1508,7 @@ int av_parse_video_frame_rate(AVRational
         return 0;
 }
 
-void av_log_missing_feature(void *avc, const char *feature, int want_sample)
+void ff_log_missing_feature(void *avc, const char *feature, int want_sample)
 {
     av_log(avc, AV_LOG_WARNING, "%s not implemented. Update your FFmpeg "
             "version to the newest one from SVN. If the problem still "




More information about the ffmpeg-cvslog mailing list