aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-01-06 21:16:59 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-01-06 21:16:59 +0000
commit85e3374798c6d694983cbdd3a0d7a005f68b3c80 (patch)
tree2bde4c7bfc82a695b9239214a33087e2c447c29b
parentaf547ce5a4a0db8640adb7969156d33bc248c6b6 (diff)
downloadffmpeg-85e3374798c6d694983cbdd3a0d7a005f68b3c80.tar.gz
mpeg1 overflowing dc coeff fix
Originally committed as revision 2674 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--output_example.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/output_example.c b/output_example.c
index 8f3dcd6928..2fba8fc6a8 100644
--- a/output_example.c
+++ b/output_example.c
@@ -197,11 +197,16 @@ AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
c->frame_rate = STREAM_FRAME_RATE;
c->frame_rate_base = 1;
c->gop_size = 12; /* emit one intra frame every twelve frames at most */
- if (c->codec_id == CODEC_ID_MPEG1VIDEO ||
- c->codec_id == CODEC_ID_MPEG2VIDEO) {
+ if (c->codec_id == CODEC_ID_MPEG2VIDEO) {
/* just for testing, we also add B frames */
c->max_b_frames = 2;
}
+ if (c->codec_id == CODEC_ID_MPEG1VIDEO){
+ /* needed to avoid using macroblocks in which some coeffs overflow
+ this doesnt happen with normal video, it just happens here as the
+ motion of the chroma plane doesnt match the luma plane */
+ c->mb_decision=2;
+ }
// some formats want stream headers to be seperate
if(!strcmp(oc->oformat->name, "mp4") || !strcmp(oc->oformat->name, "mov") || !strcmp(oc->oformat->name, "3gp"))
c->flags |= CODEC_FLAG_GLOBAL_HEADER;