Re: [libav-user] D10/IMX Encoding Crash

2009-06-23 Thread Matthew Hallin
2009/6/17 Baptiste Coudurier baptiste.coudur...@gmail.com

 Matthew Hallin wrote:
  2009/6/17 Baptiste Coudurier baptiste.coudur...@gmail.com
 
  Hi,
 
  On 6/17/2009 9:09 AM, Matthew Hallin wrote:
  Here is the output from gdb
 
  Program received signal SIGSEGV, Segmentation fault.
  ff_set_qscale (s=0xa5113d0, qscale=value optimized out)
  at libavcodec/mpegvideo.c:2356
  2356s-y_dc_scale= s-y_dc_scale_table[ qscale ];
  Current language:  auto; currently c
  (gdb) backtrace
  #0  ff_set_qscale (s=0xa5113d0, qscale=value optimized out)
  at libavcodec/mpegvideo.c:2356
  #1  0x0814a385 in encode_thread (c=0xa511020, arg=0xa5114a4)
  at libavcodec/mpegvideo_enc.c:2060
  #2  0x080dbbda in avcodec_default_execute (c=0xa511020,
  func=0x8149fd0 encode_thread, arg=0xa5114a4, ret=0x0, count=1,
  size=4)
  at libavcodec/utils.c:411
  #3  0x081340bf in MPV_encode_picture (avctx=0xa511020, buf=0xb7b04008
 ,
  buf_size=829440, data=0xa559a90) at libavcodec/mpegvideo_enc.c:2923
  #4  0x080dd790 in avcodec_encode_video (avctx=0xa511020, buf=0xb7b04008
  ,
  buf_size=829440, pict=0xa559a90) at libavcodec/utils.c:527
  #5  0x0804a310 in main () at ffmpeg-test2.cpp:175
 
  I tried to rebuild with --disable-optimizations with the hope that it
 may
  then show me the value of qscale but it would not build.
  One file needs -O1 because of register allocation failing, you should be
  able to compile it manually, yes it's annoying. Sorry for that.
  You can add also --enable-debug=gdb3
 
  PS: please do not top-post on this mailing list. Thanks for your
  understanding.
 
 
  Thanks for your reply, but I am not sure I understand.
  I you saying that I need to compile a single file with -O1 option? If so
  which file? mpegvideo.c ?

 The one not compiling, I don't think it is mpegvideo.c but dsputil_mmx.c

  I will try it tomorrow and let you know.

 Ok.

  Thanks for you great help.
  I hope this is bottom posted!

 Yes, it is, thanks.

 --
 Baptiste COUDURIER  GnuPG Key Id: 0x5C1ABAAA
 Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
 FFmpeg maintainer  http://www.ffmpeg.org
 ___
 libav-user mailing list
 libav-user@mplayerhq.hu
 https://lists.mplayerhq.hu/mailman/listinfo/libav-user


Hello, I am afraid I need more help with this. I do not understand. Are you
saying that a file did not compile or just that I need to recompile with
different options? (or both?). How can I tell which file did not compile?
make completed and the binaries were created so I assumed it was ok.
How can I compile a specific file with -O1, I assume I will need all the
other complier options used in a normal build. Can you give me the actual
commands?
Let me know
Thanks
Matt

-- 
Gee Broadcast Systems
Telephone: +44 1256 810123
Web: www.geebroadcast.co.uk
___
libav-user mailing list
libav-user@mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/libav-user


Re: [libav-user] D10/IMX Encoding Crash

2009-06-17 Thread Matthew Hallin
Hello,
I did not call avcodec_get_context_defaults2 I am not familar with the
function I will give it a try.
Don't have gdb output as I am using Windows but will try it on a Linux
machine and let you know
Thanks
Matt

2009/6/16 Baptiste Coudurier baptiste.coudur...@gmail.com

 Hi,

 On 6/16/2009 8:36 AM, Matthew Hallin wrote:
  I am new to ffmpeg and am trying to encode to MPEG2 D10
  I am using revision 19203.
  I found the following on the web, and if I run it it creates the output
 file
  no problem.
 
  ffmpeg -i t:\temp\pal-YUY2.mov -vcodec mpeg2video -r 25 -pix_fmt yuv422p
  -minrate 5k -maxrate 5k -b 5k -intra -flags +ildct+low_delay
 -dc
  10 -flags2 +ivlc+non_linear_q -ps 1 -qmin 1 -qmax 3 -top 1 -bufsize
 200
  -rc_init_occupancy 200 -rc_buf_aggressivity 0.25 -loglevel 48 -an
  t:\temp\output.m2v
 
  Trouble is when I do what I think is the same thing from my code it
 crashes
  when I call avcodec_encode_video
  My AVCodecContext parameters are below:
 
  pContext-bit_rate = 5000;
  pContext-time_base.num = 1;
  pContext-time_base.den = 25;
  pContext-width = 720;
  pContext-height = 576;
  pContext-gop_size = 0;
  pContext-pix_fmt = PIX_FMT_YUV422P;
  pContext-flags = CODEC_FLAG_LOW_DELAY | CODEC_FLAG_INTERLACED_DCT;
  pContext-flags2 = CODEC_FLAG2_INTRA_VLC | CODEC_FLAG2_NON_LINEAR_QUANT;
  pContext-qmax = 3;
  pContext-qmin = 1;
  pContext-rtp_payload_size = 1;
  pContext-rc_max_rate = pContext-bit_rate;
  pContext-rc_min_rate = pContext-bit_rate;
  pContext-intra_dc_precision = 10;
  pContext-rc_buffer_size = 200;
  pContext-rc_initial_buffer_occupancy = pContext-rc_buffer_size;
 
  I have set the log level to AV_LOG_DEBUG and see no errors in my calls to
  the previous av functions
  Any idea what I am doing wrong?

 Not really, did you call avcodec_get_context_defaults2 ?
 Otherwise if you can supply gdb output it would be easier to find out
 where the crash happens, if it happens in libavcodec.

 --
 Baptiste COUDURIER  GnuPG Key Id: 0x5C1ABAAA
 Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
 FFmpeg maintainer  http://www.ffmpeg.org
 ___
 libav-user mailing list
 libav-user@mplayerhq.hu
 https://lists.mplayerhq.hu/mailman/listinfo/libav-user




-- 
Gee Broadcast Systems
Telephone: +44 1256 810123
Web: www.geebroadcast.co.uk
___
libav-user mailing list
libav-user@mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/libav-user


Re: [libav-user] D10/IMX Encoding Crash

2009-06-17 Thread Matthew Hallin
Here is the output from gdb

Program received signal SIGSEGV, Segmentation fault.
ff_set_qscale (s=0xa5113d0, qscale=value optimized out)
at libavcodec/mpegvideo.c:2356
2356s-y_dc_scale= s-y_dc_scale_table[ qscale ];
Current language:  auto; currently c
(gdb) backtrace
#0  ff_set_qscale (s=0xa5113d0, qscale=value optimized out)
at libavcodec/mpegvideo.c:2356
#1  0x0814a385 in encode_thread (c=0xa511020, arg=0xa5114a4)
at libavcodec/mpegvideo_enc.c:2060
#2  0x080dbbda in avcodec_default_execute (c=0xa511020,
func=0x8149fd0 encode_thread, arg=0xa5114a4, ret=0x0, count=1, size=4)
at libavcodec/utils.c:411
#3  0x081340bf in MPV_encode_picture (avctx=0xa511020, buf=0xb7b04008 ,
buf_size=829440, data=0xa559a90) at libavcodec/mpegvideo_enc.c:2923
#4  0x080dd790 in avcodec_encode_video (avctx=0xa511020, buf=0xb7b04008 ,
buf_size=829440, pict=0xa559a90) at libavcodec/utils.c:527
#5  0x0804a310 in main () at ffmpeg-test2.cpp:175

I tried to rebuild with --disable-optimizations with the hope that it may
then show me the value of qscale but it would not build.

Let me know what you think
Thanks
Matt

2009/6/16 Baptiste Coudurier baptiste.coudur...@gmail.com

 Hi,

 On 6/16/2009 8:36 AM, Matthew Hallin wrote:
  I am new to ffmpeg and am trying to encode to MPEG2 D10
  I am using revision 19203.
  I found the following on the web, and if I run it it creates the output
 file
  no problem.
 
  ffmpeg -i t:\temp\pal-YUY2.mov -vcodec mpeg2video -r 25 -pix_fmt yuv422p
  -minrate 5k -maxrate 5k -b 5k -intra -flags +ildct+low_delay
 -dc
  10 -flags2 +ivlc+non_linear_q -ps 1 -qmin 1 -qmax 3 -top 1 -bufsize
 200
  -rc_init_occupancy 200 -rc_buf_aggressivity 0.25 -loglevel 48 -an
  t:\temp\output.m2v
 
  Trouble is when I do what I think is the same thing from my code it
 crashes
  when I call avcodec_encode_video
  My AVCodecContext parameters are below:
 
  pContext-bit_rate = 5000;
  pContext-time_base.num = 1;
  pContext-time_base.den = 25;
  pContext-width = 720;
  pContext-height = 576;
  pContext-gop_size = 0;
  pContext-pix_fmt = PIX_FMT_YUV422P;
  pContext-flags = CODEC_FLAG_LOW_DELAY | CODEC_FLAG_INTERLACED_DCT;
  pContext-flags2 = CODEC_FLAG2_INTRA_VLC | CODEC_FLAG2_NON_LINEAR_QUANT;
  pContext-qmax = 3;
  pContext-qmin = 1;
  pContext-rtp_payload_size = 1;
  pContext-rc_max_rate = pContext-bit_rate;
  pContext-rc_min_rate = pContext-bit_rate;
  pContext-intra_dc_precision = 10;
  pContext-rc_buffer_size = 200;
  pContext-rc_initial_buffer_occupancy = pContext-rc_buffer_size;
 
  I have set the log level to AV_LOG_DEBUG and see no errors in my calls to
  the previous av functions
  Any idea what I am doing wrong?

 Not really, did you call avcodec_get_context_defaults2 ?
 Otherwise if you can supply gdb output it would be easier to find out
 where the crash happens, if it happens in libavcodec.

 --
 Baptiste COUDURIER  GnuPG Key Id: 0x5C1ABAAA
 Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
 FFmpeg maintainer  http://www.ffmpeg.org
 ___
 libav-user mailing list
 libav-user@mplayerhq.hu
 https://lists.mplayerhq.hu/mailman/listinfo/libav-user




-- 
Gee Broadcast Systems
Telephone: +44 1256 810123
Web: www.geebroadcast.co.uk
___
libav-user mailing list
libav-user@mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/libav-user


Re: [libav-user] D10/IMX Encoding Crash

2009-06-17 Thread Baptiste Coudurier
Matthew Hallin wrote:
 2009/6/17 Baptiste Coudurier baptiste.coudur...@gmail.com
 
 Hi,

 On 6/17/2009 9:09 AM, Matthew Hallin wrote:
 Here is the output from gdb

 Program received signal SIGSEGV, Segmentation fault.
 ff_set_qscale (s=0xa5113d0, qscale=value optimized out)
 at libavcodec/mpegvideo.c:2356
 2356s-y_dc_scale= s-y_dc_scale_table[ qscale ];
 Current language:  auto; currently c
 (gdb) backtrace
 #0  ff_set_qscale (s=0xa5113d0, qscale=value optimized out)
 at libavcodec/mpegvideo.c:2356
 #1  0x0814a385 in encode_thread (c=0xa511020, arg=0xa5114a4)
 at libavcodec/mpegvideo_enc.c:2060
 #2  0x080dbbda in avcodec_default_execute (c=0xa511020,
 func=0x8149fd0 encode_thread, arg=0xa5114a4, ret=0x0, count=1,
 size=4)
 at libavcodec/utils.c:411
 #3  0x081340bf in MPV_encode_picture (avctx=0xa511020, buf=0xb7b04008 ,
 buf_size=829440, data=0xa559a90) at libavcodec/mpegvideo_enc.c:2923
 #4  0x080dd790 in avcodec_encode_video (avctx=0xa511020, buf=0xb7b04008
 ,
 buf_size=829440, pict=0xa559a90) at libavcodec/utils.c:527
 #5  0x0804a310 in main () at ffmpeg-test2.cpp:175

 I tried to rebuild with --disable-optimizations with the hope that it may
 then show me the value of qscale but it would not build.
 One file needs -O1 because of register allocation failing, you should be
 able to compile it manually, yes it's annoying. Sorry for that.
 You can add also --enable-debug=gdb3

 PS: please do not top-post on this mailing list. Thanks for your
 understanding.

 
 Thanks for your reply, but I am not sure I understand.
 I you saying that I need to compile a single file with -O1 option? If so
 which file? mpegvideo.c ?

The one not compiling, I don't think it is mpegvideo.c but dsputil_mmx.c

 I will try it tomorrow and let you know.

Ok.

 Thanks for you great help.
 I hope this is bottom posted!

Yes, it is, thanks.

-- 
Baptiste COUDURIER  GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer  http://www.ffmpeg.org
___
libav-user mailing list
libav-user@mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/libav-user