[Desktop-packages] [Bug 1159760] Re: av_rescale_q() returns wrong value on Precise amd64

2013-03-30 Thread Reinhard Tartler
thanks for clarifying the issue

** Changed in: libav (Ubuntu)
   Status: New = Invalid

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libav in Ubuntu.
https://bugs.launchpad.net/bugs/1159760

Title:
  av_rescale_q() returns wrong value on Precise amd64

Status in “libav” package in Ubuntu:
  Invalid

Bug description:
  I found a bug with the function av_rescale_q() in the latest versions
  on Precise LTS  Lucid LTS on amd64 processor.

  Below is my test code (to be linked against libavutilXX):
  uint64_t av_rescale_q_test(uint64_t a, AVRational b, AVRational c)
  {
uint64_t num = b.num * c.den;
uint64_t den = b.den * c.num;
return ( a * num + (den1)) / den;
  }

  void test()
  {
uint64_t out, out2, pts=30305290;
AVRational base = { 1, 14112000};
AVRational bq = { 1, 10};

out = av_rescale_q(pts, base, bq);
out2 = av_rescale_q_test(pts, base, bq);
printf(pts=0x%lX, out=0x%lX, out2=0x%lX\n, pts, out, out2);
  }

  
  And the output is: 
  pts=0x1CE6C0A, out=0x8036, out2=0x8036

  Obviously av_rescale_q() gives wrong answer.

  
  The interesting thing is: if I pull the source code of av_rescale_q() and all 
the invoked functions together from libav into my test code, the result becomes:
  pts=0x1CE6C0A, out=0x8036, out2=0x8036

  Looks like the libav sourcecode itself is OK, but the built library is
  buggy. I have no idea how to further debug this problem. Somebody
  please look into this bug. I believe it could be reappeared on all
  amd64 distros including Lucid/Precie/Quantal.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/1159760/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1159760] Re: av_rescale_q() returns wrong value on Precise amd64

2013-03-29 Thread KOU James
Sorry, it's due to the makefile and not a problem of libav.

If I compile using one invocation of gcc, like below, the return value is wrong.
gcc  avutil-test.c -lavutil  -o avutil-test


However, if I compile it in the following way, the return value is correct.
gcc  -c avutil-test.c -o avutil-test.o
gcc  avutil-test.o  -lavutil  -o avutil-test


This looks wierd.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libav in Ubuntu.
https://bugs.launchpad.net/bugs/1159760

Title:
  av_rescale_q() returns wrong value on Precise amd64

Status in “libav” package in Ubuntu:
  New

Bug description:
  I found a bug with the function av_rescale_q() in the latest versions
  on Precise LTS  Lucid LTS on amd64 processor.

  Below is my test code (to be linked against libavutilXX):
  uint64_t av_rescale_q_test(uint64_t a, AVRational b, AVRational c)
  {
uint64_t num = b.num * c.den;
uint64_t den = b.den * c.num;
return ( a * num + (den1)) / den;
  }

  void test()
  {
uint64_t out, out2, pts=30305290;
AVRational base = { 1, 14112000};
AVRational bq = { 1, 10};

out = av_rescale_q(pts, base, bq);
out2 = av_rescale_q_test(pts, base, bq);
printf(pts=0x%lX, out=0x%lX, out2=0x%lX\n, pts, out, out2);
  }

  
  And the output is: 
  pts=0x1CE6C0A, out=0x8036, out2=0x8036

  Obviously av_rescale_q() gives wrong answer.

  
  The interesting thing is: if I pull the source code of av_rescale_q() and all 
the invoked functions together from libav into my test code, the result becomes:
  pts=0x1CE6C0A, out=0x8036, out2=0x8036

  Looks like the libav sourcecode itself is OK, but the built library is
  buggy. I have no idea how to further debug this problem. Somebody
  please look into this bug. I believe it could be reappeared on all
  amd64 distros including Lucid/Precie/Quantal.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/1159760/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1159760] Re: av_rescale_q() returns wrong value on Precise amd64

2013-03-29 Thread KOU James
The way I found this bug is that when I was using gstreamer0.10-ffmpeg on 
Ubuntu Precise amd64 to demux MP3 files, if you enable the plugin logs by 
setting ffmepg:5, you will see the PTS in the log changed from a few seconds 
to a very large value in a sudden.
 Then I try to recompile the gstreamer0.10-ffmpeg and found that once the PTS 
reaches 30305290, the return value of av_rescale_q() in 
gst_ffmpeg_time_ff_to_gst() will go wrong by adding the 0x prefix to 
the normal value. For example, when you expect the return value to be 
0x8036, but it gives 0x8036.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libav in Ubuntu.
https://bugs.launchpad.net/bugs/1159760

Title:
  av_rescale_q() returns wrong value on Precise amd64

Status in “libav” package in Ubuntu:
  New

Bug description:
  I found a bug with the function av_rescale_q() in the latest versions
  on Precise LTS  Lucid LTS on amd64 processor.

  Below is my test code (to be linked against libavutilXX):
  uint64_t av_rescale_q_test(uint64_t a, AVRational b, AVRational c)
  {
uint64_t num = b.num * c.den;
uint64_t den = b.den * c.num;
return ( a * num + (den1)) / den;
  }

  void test()
  {
uint64_t out, out2, pts=30305290;
AVRational base = { 1, 14112000};
AVRational bq = { 1, 10};

out = av_rescale_q(pts, base, bq);
out2 = av_rescale_q_test(pts, base, bq);
printf(pts=0x%lX, out=0x%lX, out2=0x%lX\n, pts, out, out2);
  }

  
  And the output is: 
  pts=0x1CE6C0A, out=0x8036, out2=0x8036

  Obviously av_rescale_q() gives wrong answer.

  
  The interesting thing is: if I pull the source code of av_rescale_q() and all 
the invoked functions together from libav into my test code, the result becomes:
  pts=0x1CE6C0A, out=0x8036, out2=0x8036

  Looks like the libav sourcecode itself is OK, but the built library is
  buggy. I have no idea how to further debug this problem. Somebody
  please look into this bug. I believe it could be reappeared on all
  amd64 distros including Lucid/Precie/Quantal.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/1159760/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp