# HG changeset patch # User michaelni # Date 1032041255 0 # Node ID c3bdb00a98a9abc4baf74e9178010dd734cb80aa # Parent 9008cbe229ceca65b8f5adb15e2ab09734bae802 dont store version for bit-exact tests diff -r 9008cbe229ce -r c3bdb00a98a9 dsputil.c --- a/dsputil.c Sat Sep 14 19:00:09 2002 +0000 +++ b/dsputil.c Sat Sep 14 22:07:35 2002 +0000 @@ -44,6 +44,8 @@ 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 @@ /* 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 -r 9008cbe229ce -r c3bdb00a98a9 h263.c --- a/h263.c Sat Sep 14 19:00:09 2002 +0000 +++ b/h263.c Sat Sep 14 22:07:35 2002 +0000 @@ -1420,14 +1420,17 @@ 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 -r 9008cbe229ce -r c3bdb00a98a9 mjpeg.c --- a/mjpeg.c Sat Sep 14 19:00:09 2002 +0000 +++ b/mjpeg.c Sat Sep 14 22:07:35 2002 +0000 @@ -390,16 +390,18 @@ } /* 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 -r 9008cbe229ce -r c3bdb00a98a9 mpegvideo.h --- a/mpegvideo.h Sat Sep 14 19:00:09 2002 +0000 +++ b/mpegvideo.h Sat Sep 14 22:07:35 2002 +0000 @@ -496,6 +496,8 @@ 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);