summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-06-22 16:55:45 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-06-22 16:55:45 +0000
commit433f5e8fbd2e87a9517e7676d5c02ae3042632f4 (patch)
tree6f628e25442a1888d7546f3be137877eee30d5fb /src
parent198f019a123344584b470ece3b9d847e0466a2a8 (diff)
downloadxine-lib-433f5e8fbd2e87a9517e7676d5c02ae3042632f4.tar.gz
xine-lib-433f5e8fbd2e87a9517e7676d5c02ae3042632f4.tar.bz2
readd some missing patches from diff_to_ffmpeg_cvs.txt, resulting in
motion_est.c being obsolete again (reduces compile time) CVS patchset: 5089 CVS date: 2003/06/22 16:55:45
Diffstat (limited to 'src')
-rw-r--r--src/libffmpeg/diff_to_ffmpeg_cvs.txt14
-rw-r--r--src/libffmpeg/libavcodec/Makefile.am1
-rw-r--r--src/libffmpeg/libavcodec/mjpeg.c2
-rw-r--r--src/libffmpeg/libavcodec/mpegvideo.c8
4 files changed, 16 insertions, 9 deletions
diff --git a/src/libffmpeg/diff_to_ffmpeg_cvs.txt b/src/libffmpeg/diff_to_ffmpeg_cvs.txt
index d7bbd663e..8e5b3be6c 100644
--- a/src/libffmpeg/diff_to_ffmpeg_cvs.txt
+++ b/src/libffmpeg/diff_to_ffmpeg_cvs.txt
@@ -542,7 +542,7 @@ retrieving revision 1.61
diff -u -r1.61 mjpeg.c
--- libavcodec/mjpeg.c 23 May 2003 16:04:24 -0000 1.61
+++ libavcodec/mjpeg.c 23 May 2003 18:18:53 -0000
-@@ -1135,7 +1160,7 @@
+@@ -1471,7 +1471,7 @@
4bytes field_size
4bytes field_size_less_padding
*/
@@ -558,7 +558,7 @@ retrieving revision 1.31
diff -u -r1.31 mpegvideo.c
--- libavcodec/mpegvideo.c 9 May 2003 23:54:05 -0000 1.31
+++ libavcodec/mpegvideo.c 25 May 2003 18:29:52 -0000
-@@ -761,7 +761,9 @@
+@@ -763,7 +763,9 @@
if (MPV_common_init(s) < 0)
return -1;
@@ -568,7 +568,7 @@ diff -u -r1.31 mpegvideo.c
#ifdef CONFIG_ENCODERS
#ifdef CONFIG_RISKY
-@@ -1437,8 +1439,10 @@
+@@ -1550,8 +1552,10 @@
if (s->out_format == FMT_MJPEG)
mjpeg_picture_trailer(s);
@@ -579,7 +579,7 @@ diff -u -r1.31 mpegvideo.c
for(i=0; i<4; i++){
avctx->error[i] += s->current_picture_ptr->error[i];
-@@ -3014,6 +3018,7 @@
+@@ -3137,6 +3141,7 @@
/* Estimate motion for every MB */
s->mb_intra=0; //for the rate distoration & bit compare functions
if(s->pict_type != I_TYPE){
@@ -587,7 +587,7 @@ diff -u -r1.31 mpegvideo.c
if(s->pict_type != B_TYPE){
if((s->avctx->pre_me && s->last_non_b_pict_type==I_TYPE) || s->avctx->pre_me==2){
s->me.pre_pass=1;
-@@ -3051,6 +3056,7 @@
+@@ -3174,6 +3179,7 @@
ff_estimate_p_frame_motion(s, mb_x, mb_y);
}
}
@@ -595,7 +595,7 @@ diff -u -r1.31 mpegvideo.c
}else /* if(s->pict_type == I_TYPE) */{
/* I-Frame */
//FIXME do we need to zero them?
-@@ -3085,6 +3091,7 @@
+@@ -3208,6 +3214,7 @@
//printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum);
}
@@ -603,7 +603,7 @@ diff -u -r1.31 mpegvideo.c
if(!s->umvplus){
if(s->pict_type==P_TYPE || s->pict_type==S_TYPE) {
s->f_code= ff_get_best_fcode(s, s->p_mv_table, MB_TYPE_INTER);
-@@ -3109,6 +3116,7 @@
+@@ -3232,6 +3239,7 @@
ff_fix_long_b_mvs(s, s->b_bidir_back_mv_table, s->b_code, MB_TYPE_BIDIR);
}
}
diff --git a/src/libffmpeg/libavcodec/Makefile.am b/src/libffmpeg/libavcodec/Makefile.am
index a2f814d62..17307c0c2 100644
--- a/src/libffmpeg/libavcodec/Makefile.am
+++ b/src/libffmpeg/libavcodec/Makefile.am
@@ -38,7 +38,6 @@ libavcodec_la_SOURCES = \
mace.c \
mem.c \
mjpeg.c \
- motion_est.c \
mpeg12.c \
mpegaudiodec.c \
mpegvideo.c \
diff --git a/src/libffmpeg/libavcodec/mjpeg.c b/src/libffmpeg/libavcodec/mjpeg.c
index ec8046446..7cab01c74 100644
--- a/src/libffmpeg/libavcodec/mjpeg.c
+++ b/src/libffmpeg/libavcodec/mjpeg.c
@@ -1471,7 +1471,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
4bytes field_size
4bytes field_size_less_padding
*/
- s->buggy_avid = 1;
+// s->buggy_avid = 1;
// if (s->first_picture)
// printf("mjpeg: workarounding buggy AVID\n");
s->interlace_polarity = get_bits(&s->gb, 8);
diff --git a/src/libffmpeg/libavcodec/mpegvideo.c b/src/libffmpeg/libavcodec/mpegvideo.c
index 9aa258f95..83a481e9f 100644
--- a/src/libffmpeg/libavcodec/mpegvideo.c
+++ b/src/libffmpeg/libavcodec/mpegvideo.c
@@ -763,7 +763,9 @@ int MPV_encode_init(AVCodecContext *avctx)
if (MPV_common_init(s) < 0)
return -1;
+#ifdef CONFIG_ENCODERS_FULL
ff_init_me(s);
+#endif
#ifdef CONFIG_ENCODERS
#ifdef CONFIG_RISKY
@@ -1550,8 +1552,10 @@ int MPV_encode_picture(AVCodecContext *avctx,
if (s->out_format == FMT_MJPEG)
mjpeg_picture_trailer(s);
+#ifdef CONFIG_ENCODERS_FULL
if(s->flags&CODEC_FLAG_PASS1)
ff_write_pass1_stats(s);
+#endif
for(i=0; i<4; i++){
avctx->error[i] += s->current_picture_ptr->error[i];
@@ -3137,6 +3141,7 @@ static void encode_picture(MpegEncContext *s, int picture_number)
/* Estimate motion for every MB */
s->mb_intra=0; //for the rate distoration & bit compare functions
if(s->pict_type != I_TYPE){
+#ifdef CONFIG_ENCODERS_FULL
if(s->pict_type != B_TYPE){
if((s->avctx->pre_me && s->last_non_b_pict_type==I_TYPE) || s->avctx->pre_me==2){
s->me.pre_pass=1;
@@ -3174,6 +3179,7 @@ static void encode_picture(MpegEncContext *s, int picture_number)
ff_estimate_p_frame_motion(s, mb_x, mb_y);
}
}
+#endif
}else /* if(s->pict_type == I_TYPE) */{
/* I-Frame */
//FIXME do we need to zero them?
@@ -3208,6 +3214,7 @@ static void encode_picture(MpegEncContext *s, int picture_number)
//printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum);
}
+#ifdef CONFIG_ENCODERS_FULL
if(!s->umvplus){
if(s->pict_type==P_TYPE || s->pict_type==S_TYPE) {
s->f_code= ff_get_best_fcode(s, s->p_mv_table, MB_TYPE_INTER);
@@ -3232,6 +3239,7 @@ static void encode_picture(MpegEncContext *s, int picture_number)
ff_fix_long_b_mvs(s, s->b_bidir_back_mv_table, s->b_code, MB_TYPE_BIDIR);
}
}
+#endif
if (s->fixed_qscale)
s->frame_qscale = s->current_picture.quality;