diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-09-14 22:07:35 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-09-14 22:07:35 +0000 |
commit | 5596c60cceaee5f59ea67d71601f86c49b21d4fa (patch) | |
tree | 2ce8ef80c5be852304ab69dbaeb9b653b9d400d7 /libavcodec | |
parent | b7c27ee601009168f874e9367286ae6a815d13b9 (diff) | |
download | ffmpeg-5596c60cceaee5f59ea67d71601f86c49b21d4fa.tar.gz |
dont store version for bit-exact tests
Originally committed as revision 948 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dsputil.c | 3 | ||||
-rw-r--r-- | libavcodec/h263.c | 15 | ||||
-rw-r--r-- | libavcodec/mjpeg.c | 18 | ||||
-rw-r--r-- | libavcodec/mpegvideo.h | 2 |
4 files changed, 24 insertions, 14 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 9ee585c4d7..eb8592352e 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -44,6 +44,8 @@ op_pixels_abs_func pix_abs8x8_x2; op_pixels_abs_func pix_abs8x8_y2; op_pixels_abs_func pix_abs8x8_xy2; +int ff_bit_exact=0; + UINT8 cropTbl[256 + 2 * MAX_NEG_CROP]; UINT32 squareTbl[512]; @@ -1697,6 +1699,7 @@ void dsputil_init(void) /* remove any non bit exact operation (testing purpose) */ void avcodec_set_bit_exact(void) { + ff_bit_exact=1; #ifdef HAVE_MMX dsputil_set_bit_exact_mmx(); #endif diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 5ccb343181..c9a0a9d308 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -1420,14 +1420,17 @@ static void mpeg4_encode_vol_header(MpegEncContext * s) put_bits(&s->pb, 1, 0); /* reduced res vop */ } put_bits(&s->pb, 1, 0); /* scalability */ - + ff_mpeg4_stuffing(&s->pb); - put_bits(&s->pb, 16, 0); - put_bits(&s->pb, 16, 0x1B2); /* user_data */ - sprintf(buf, "FFmpeg%sb%s", FFMPEG_VERSION, LIBAVCODEC_BUILD_STR); - put_string(&s->pb, buf); - ff_mpeg4_stuffing(&s->pb); + /* user data */ + if(!ff_bit_exact){ + put_bits(&s->pb, 16, 0); + put_bits(&s->pb, 16, 0x1B2); /* user_data */ + sprintf(buf, "FFmpeg%sb%s", FFMPEG_VERSION, LIBAVCODEC_BUILD_STR); + put_string(&s->pb, buf); + ff_mpeg4_stuffing(&s->pb); + } } /* write mpeg4 VOP header */ diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index cfd5307fbb..6cfd83160e 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -390,16 +390,18 @@ static void jpeg_put_comments(MpegEncContext *s) } /* comment */ - put_marker(p, COM); - flush_put_bits(p); - ptr = pbBufPtr(p); - put_bits(p, 16, 0); /* patched later */ + if(!ff_bit_exact){ + put_marker(p, COM); + flush_put_bits(p); + ptr = pbBufPtr(p); + put_bits(p, 16, 0); /* patched later */ #define MJPEG_VERSION "FFmpeg" LIBAVCODEC_VERSION "b" LIBAVCODEC_BUILD_STR - put_string(p, MJPEG_VERSION); - size = strlen(MJPEG_VERSION)+3; + put_string(p, MJPEG_VERSION); + size = strlen(MJPEG_VERSION)+3; #undef MJPEG_VERSION - ptr[0] = size >> 8; - ptr[1] = size; + ptr[0] = size >> 8; + ptr[1] = size; + } } void mjpeg_picture_header(MpegEncContext *s) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index ee184b1406..2caccce8a8 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -496,6 +496,8 @@ void ff_conceal_past_errors(MpegEncContext *s, int conceal_all); void ff_copy_bits(PutBitContext *pb, UINT8 *src, int length); void ff_clean_intra_table_entries(MpegEncContext *s); +extern int ff_bit_exact; + /* motion_est.c */ void ff_estimate_p_frame_motion(MpegEncContext * s, int mb_x, int mb_y); |