summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2006-12-04 22:25:13 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2006-12-04 22:25:13 +0000
commite6d1a700e06ba8a985c29ba212b359c9e33bcc55 (patch)
tree3c98db75ad4f78f4e44c9c6bf974cfff704d1ce2 /src/libffmpeg/libavcodec/ffv1.c
parente8bcf74e1a8a78e15d3d147f1d485c07a5ac3cd6 (diff)
downloadxine-lib-e6d1a700e06ba8a985c29ba212b359c9e33bcc55.tar.gz
xine-lib-e6d1a700e06ba8a985c29ba212b359c9e33bcc55.tar.bz2
trying an updated ffmpeg version (51.25.0)
CVS patchset: 8405 CVS date: 2006/12/04 22:25:13
Diffstat (limited to 'src/libffmpeg/libavcodec/ffv1.c')
-rw-r--r--src/libffmpeg/libavcodec/ffv1.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/libffmpeg/libavcodec/ffv1.c b/src/libffmpeg/libavcodec/ffv1.c
index c987d84f6..62623e591 100644
--- a/src/libffmpeg/libavcodec/ffv1.c
+++ b/src/libffmpeg/libavcodec/ffv1.c
@@ -3,18 +3,20 @@
*
* Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
*
- * This library is free software; you can redistribute it and/or
+ * 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 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
+ * 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 this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
@@ -223,7 +225,7 @@ static inline void put_symbol(RangeCoder *c, uint8_t *state, int v, int is_signe
int i;
if(v){
- const int a= ABS(v);
+ const int a= FFABS(v);
const int e= av_log2(a);
put_rac(c, state+0, 0);
@@ -271,7 +273,7 @@ static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){
static inline void update_vlc_state(VlcState * const state, const int v){
int drift= state->drift;
int count= state->count;
- state->error_sum += ABS(v);
+ state->error_sum += FFABS(v);
drift += v;
if(count == 128){ //FIXME variable
@@ -354,6 +356,7 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int
return ret;
}
+#ifdef CONFIG_ENCODERS
static inline int encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
PlaneContext * const p= &s->plane[plane_index];
RangeCoder * const c= &s->c;
@@ -527,6 +530,7 @@ static void write_header(FFV1Context *f){
for(i=0; i<5; i++)
write_quant_table(c, f->quant_table[i]);
}
+#endif /* CONFIG_ENCODERS */
static int common_init(AVCodecContext *avctx){
FFV1Context *s = avctx->priv_data;
@@ -545,6 +549,7 @@ static int common_init(AVCodecContext *avctx){
return 0;
}
+#ifdef CONFIG_ENCODERS
static int encode_init(AVCodecContext *avctx)
{
FFV1Context *s = avctx->priv_data;
@@ -608,6 +613,7 @@ static int encode_init(AVCodecContext *avctx)
return 0;
}
+#endif /* CONFIG_ENCODERS */
static void clear_state(FFV1Context *f){
@@ -632,6 +638,7 @@ static void clear_state(FFV1Context *f){
}
}
+#ifdef CONFIG_ENCODERS
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
FFV1Context *f = avctx->priv_data;
RangeCoder * const c= &f->c;
@@ -687,6 +694,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
return used_count + (put_bits_count(&f->pb)+7)/8;
}
}
+#endif /* CONFIG_ENCODERS */
static int common_end(AVCodecContext *avctx){
FFV1Context *s = avctx->priv_data;
@@ -1027,5 +1035,6 @@ AVCodec ffv1_encoder = {
encode_init,
encode_frame,
common_end,
+ .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGBA32, -1},
};
#endif