]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ivi_common.h
dv: Initialize encoder tables during encoder init.
[ffmpeg] / libavcodec / ivi_common.h
index 803c0580bed2306ae7bc4b45bdad2069f3e9d340..4b2ae063b1514f8adbc615628c451e7cd8cff1c7 100644 (file)
@@ -3,20 +3,20 @@
  *
  * Copyright (c) 2009 Maxim Poliakovski
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav 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,
+ * Libav 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
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -33,8 +33,6 @@
 #include "get_bits.h"
 #include <stdint.h>
 
-#define IVI_DEBUG 0
-
 #define IVI_VLC_BITS 13 ///< max number of bits of the ivi's huffman codes
 
 /**
@@ -53,7 +51,7 @@ typedef struct {
                             /// or "7" for custom one
     VLC         *tab;       /// pointer to the table associated with tab_sel
 
-    //! the following are used only when tab_sel == 7
+    /// the following are used only when tab_sel == 7
     IVIHuffDesc cust_desc;  /// custom Huffman codebook descriptor
     VLC         cust_tab;   /// vlc table for custom codebook
 } IVIHuffTab;
@@ -197,10 +195,10 @@ typedef struct {
 /** compare some properties of two pictures */
 static inline int ivi_pic_config_cmp(IVIPicConfig *str1, IVIPicConfig *str2)
 {
-    return (str1->pic_width    != str2->pic_width    || str1->pic_height    != str2->pic_height    ||
-            str1->chroma_width != str2->chroma_width || str1->chroma_height != str2->chroma_height ||
-            str1->tile_width   != str2->tile_width   || str1->tile_height   != str2->tile_height   ||
-            str1->luma_bands   != str2->luma_bands   || str1->chroma_bands  != str2->chroma_bands);
+    return str1->pic_width    != str2->pic_width    || str1->pic_height    != str2->pic_height    ||
+           str1->chroma_width != str2->chroma_width || str1->chroma_height != str2->chroma_height ||
+           str1->tile_width   != str2->tile_width   || str1->tile_height   != str2->tile_height   ||
+           str1->luma_bands   != str2->luma_bands   || str1->chroma_bands  != str2->chroma_bands;
 }
 
 /** calculate number of tiles in a stride */
@@ -221,7 +219,7 @@ static inline int ivi_scale_mv(int mv, int mv_scale)
 
 /**
  *  Generate a huffman codebook from the given descriptor
- *  and convert it into the FFmpeg VLC table.
+ *  and convert it into the Libav VLC table.
  *
  *  @param[in]   cb    pointer to codebook descriptor
  *  @param[out]  vlc   where to place the generated VLC table
@@ -340,7 +338,6 @@ void ff_ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band,
  */
 void ff_ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, int dst_pitch);
 
-#if IVI_DEBUG
 /**
  *  Calculate band checksum from band data.
  */
@@ -350,6 +347,5 @@ uint16_t ivi_calc_band_checksum (IVIBandDesc *band);
  *  Verify that band data lies in range.
  */
 int ivi_check_band (IVIBandDesc *band, const uint8_t *ref, int pitch);
-#endif
 
 #endif /* AVCODEC_IVI_COMMON_H */