|
From: adland123 <adl...@ya...> - 2005-04-24 23:45:19
|
Stephen Torri <storri <at> torri.org> writes: > > I have been unable to compile mpegvideo.c in a optimized build. Below > are the error messages and the gcc that I used. xine does build with > 'make debug'. If this happens to be a gcc bug I would appreciate some > help creating a sample test program to send with the bug. > > Stephen > > compiled okay last week but had the same issue with mpegvideo.c ever since CVS version 1.45 5 days tmmm sync to FFmpeg build 4752. CPU is pegged at 100% and you can wait 10 minutes for this one file and it does not compile yet. Able to finally get a compile with reasonable delay but only using my own file version with a minimal set of the changes from 1.44 to 1.45 upgrade. Unsure which of the others changes makes the problem or if result was functional. Athlon 1800+ Debian sid Linux unknown 2.6.11.7 gcc version 3.3.5 (Debian 1:3.3.5-12) libc-2.3.2.so GNU ld version 2.15 ./autogen.sh --disable-opengl --prefix=/home/user/xinebuild make make install diff -Naur 1.44/mpegvideo.c patch/mpegvideo.c --- 1.44/mpegvideo.c 2005-04-24 19:11:58.000000000 -0400 +++ patch/mpegvideo.c 2005-04-23 22:43:59.000000000 -0400 @@ -728,9 +728,6 @@ CHECKED_ALLOCZ(s->coded_block_base, y_size); s->coded_block= s->coded_block_base + s->b8_stride + 1; - /* divx501 bitstream reorder buffer */ - CHECKED_ALLOCZ(s->bitstream_buffer, BITSTREAM_BUFFER_SIZE); - /* cbp, ac_pred, pred_dir */ CHECKED_ALLOCZ(s->cbp_table , mb_array_size * sizeof(uint8_t)) CHECKED_ALLOCZ(s->pred_dir_table, mb_array_size * sizeof(uint8_t)) @@ -1263,12 +1260,16 @@ #endif //CONFIG_ENCODERS -void init_rl(RLTable *rl) +void init_rl(RLTable *rl, int use_static) { int8_t max_level[MAX_RUN+1], max_run[MAX_LEVEL+1]; uint8_t index_run[MAX_RUN+1]; int last, run, level, start, end, i; + /* If table is static, we can quit if rl->max_level[0] is not NULL */ + if(use_static && rl->max_level[0]) + return; + /* compute max_level[], max_run[] and index_run[] */ for(last=0;last<2;last++) { if (last == 0) { @@ -1292,10 +1293,19 @@ if (run > max_run[level]) max_run[level] = run; } + if(use_static) + rl->max_level[last] = av_mallocz_static(MAX_RUN + 1); + else rl->max_level[last] = av_malloc(MAX_RUN + 1); memcpy(rl->max_level[last], max_level, MAX_RUN + 1); + if(use_static) + rl->max_run[last] = av_mallocz_static(MAX_LEVEL + 1); + else rl->max_run[last] = av_malloc(MAX_LEVEL + 1); memcpy(rl->max_run[last], max_run, MAX_LEVEL + 1); + if(use_static) + rl->index_run[last] = av_mallocz_static(MAX_RUN + 1); + else rl->index_run[last] = av_malloc(MAX_RUN + 1); memcpy(rl->index_run[last], index_run, MAX_RUN + 1); } @@ -5855,79 +5865,6 @@ } } -static const AVOption mpeg4_options[] = -{ - AVOPTION_CODEC_INT("bitrate", "desired video bitrate", bit_rate, 4, 240000 000, 800000), - AVOPTION_CODEC_INT("ratetol", "number of bits the bitstream is allowed to diverge from the reference" - "the reference can be CBR (for CBR pass1) or VBR (for pass2)", - bit_rate_tolerance, 4, 240000000, 8000), - AVOPTION_CODEC_INT("qmin", "minimum quantizer", qmin, 1, 31, 2), - AVOPTION_CODEC_INT("qmax", "maximum quantizer", qmax, 1, 31, 31), - AVOPTION_CODEC_STRING("rc_eq", "rate control equation", - rc_eq, "tex^qComp,option1,options2", 0), - AVOPTION_CODEC_INT("rc_minrate", "rate control minimum bitrate", - rc_min_rate, 4, 24000000, 0), - AVOPTION_CODEC_INT("rc_maxrate", "rate control maximum bitrate", - rc_max_rate, 4, 24000000, 0), - AVOPTION_CODEC_DOUBLE("rc_buf_aggresivity", "rate control buffer aggresivi ty", - rc_buffer_aggressivity, 4, 24000000, 0), - AVOPTION_CODEC_DOUBLE("rc_initial_cplx", "initial complexity for pass1 rat econtrol", - rc_initial_cplx, 0., 9999999., 0), - AVOPTION_CODEC_DOUBLE("i_quant_factor", "qscale factor between p and i fra mes", - i_quant_factor, 0., 0., 0), - AVOPTION_CODEC_DOUBLE("i_quant_offset", "qscale offset between p and i fra mes", - i_quant_factor, -999999., 999999., 0), - AVOPTION_CODEC_INT("dct_algo", "dct alghorithm", - dct_algo, 0, 5, 0), // fixme - "Auto,FastInt,Int,MMX,MLib,Altivec" - AVOPTION_CODEC_DOUBLE("lumi_masking", "luminance masking", - lumi_masking, 0., 999999., 0), - AVOPTION_CODEC_DOUBLE("temporal_cplx_masking", "temporary complexity maski ng", - temporal_cplx_masking, 0., 999999., 0), - AVOPTION_CODEC_DOUBLE("spatial_cplx_masking", "spatial complexity masking" , - spatial_cplx_masking, 0., 999999., 0), - AVOPTION_CODEC_DOUBLE("p_masking", "p block masking", - p_masking, 0., 999999., 0), - AVOPTION_CODEC_DOUBLE("dark_masking", "darkness masking", - dark_masking, 0., 999999., 0), - AVOPTION_CODEC_INT("idct_algo", "idct alghorithm", - idct_algo, 0, 8, 0), // fixme - "Auto,Int,Simple,SimpleMMX,LibMPEG2MM X,PS2,MLib,ARM,Altivec" - - AVOPTION_CODEC_INT("mb_qmin", "minimum MB quantizer", - mb_qmin, 0, 8, 0), - AVOPTION_CODEC_INT("mb_qmax", "maximum MB quantizer", - mb_qmin, 0, 8, 0), - - AVOPTION_CODEC_INT("me_cmp", "ME compare function", - me_cmp, 0, 24000000, 0), - AVOPTION_CODEC_INT("me_sub_cmp", "subpixel ME compare function", - me_sub_cmp, 0, 24000000, 0), - - - AVOPTION_CODEC_INT("dia_size", "ME diamond size & shape", - dia_size, 0, 24000000, 0), - AVOPTION_CODEC_INT("last_predictor_count", "amount of previous MV predicto rs", - last_predictor_count, 0, 24000000, 0), - - AVOPTION_CODEC_INT("pre_me", "pre pass for ME", - pre_me, 0, 24000000, 0), - AVOPTION_CODEC_INT("me_pre_cmp", "ME pre pass compare function", - me_pre_cmp, 0, 24000000, 0), - - AVOPTION_CODEC_INT("me_range", "maximum ME search range", - me_range, 0, 24000000, 0), - AVOPTION_CODEC_INT("pre_dia_size", "ME pre pass diamod size & shape", - pre_dia_size, 0, 24000000, 0), - AVOPTION_CODEC_INT("me_subpel_quality", "subpel ME quality", - me_subpel_quality, 0, 24000000, 0), - AVOPTION_CODEC_INT("me_range", "maximum ME search range", - me_range, 0, 24000000, 0), - AVOPTION_CODEC_FLAG("psnr", "calculate PSNR of compressed frames", - flags, CODEC_FLAG_PSNR, 0), - AVOPTION_CODEC_RCOVERRIDE("rc_override", "ratecontrol override (=startfram e,endframe,qscale,quality_factor)", - rc_override), - AVOPTION_SUB(avoptions_common), - AVOPTION_END() -}; #ifdef CONFIG_ENCODERS #ifdef CONFIG_RISKY @@ -5979,7 +5916,8 @@ MPV_encode_init, MPV_encode_picture, MPV_encode_end, - .options = mpeg4_options, + .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1}, + .capabilities= CODEC_CAP_DELAY, }; AVCodec msmpeg4v1_encoder = { @@ -5990,7 +5928,7 @@ MPV_encode_init, MPV_encode_picture, MPV_encode_end, - .options = mpeg4_options, + .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1}, }; AVCodec msmpeg4v2_encoder = { @@ -6001,7 +5939,7 @@ MPV_encode_init, MPV_encode_picture, MPV_encode_end, - .options = mpeg4_options, + .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1}, }; AVCodec msmpeg4v3_encoder = { @@ -6012,7 +5950,7 @@ MPV_encode_init, MPV_encode_picture, MPV_encode_end, - .options = mpeg4_options, + .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1}, }; AVCodec wmv1_encoder = { @@ -6023,7 +5961,7 @@ MPV_encode_init, MPV_encode_picture, MPV_encode_end, - .options = mpeg4_options, + .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1}, }; #endif @@ -6036,6 +5974,7 @@ MPV_encode_init, MPV_encode_picture, MPV_encode_end, + .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1}, }; #endif //CONFIG_ENCODERS |