IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Has anyone tried the Opus decoder library with floats and 8 channels?
lithopsian
post Mar 14 2014, 16:07
Post #1





Group: Members
Posts: 171
Joined: 27-February 14
Member No.: 114718



I noticed that my CPU usage goes through the roof (ie. maxes out, around 10x what a 7 channel track takes) when decoding 8 channel Opus tracks, but only when it is outputting samples as floats. The integer call runs at expected levels. It appears to be due to the library itself rather than something dumb in my own code. I can't really tell if it happens in libopusfile or libopus.

This post has been edited by lithopsian: Mar 14 2014, 16:07
Go to the top of the page
+Quote Post
lvqcl
post Mar 14 2014, 16:33
Post #2





Group: Developer
Posts: 3358
Joined: 2-December 07
Member No.: 49183



Sounds like a problem with denormals.
Go to the top of the page
+Quote Post
jmvalin
post Mar 15 2014, 04:14
Post #3


Xiph.org Speex developer


Group: Developer
Posts: 479
Joined: 21-August 02
Member No.: 3134



QUOTE (lvqcl @ Mar 14 2014, 10:33) *
Sounds like a problem with denormals.


Denormals would not only cause problems with the float output because it's the same codepath until the very end. It would have to be problems in the application code, not in libopus.
Go to the top of the page
+Quote Post
lithopsian
post Mar 17 2014, 23:17
Post #4





Group: Members
Posts: 171
Joined: 27-February 14
Member No.: 114718



QUOTE (jmvalin @ Mar 15 2014, 04:14) *
QUOTE (lvqcl @ Mar 14 2014, 10:33) *
Sounds like a problem with denormals.


Denormals would not only cause problems with the float output because it's the same codepath until the very end. It would have to be problems in the application code, not in libopus.

Seems unlikely to be in the application code. Just slapping this in an infinite loop causes the issue:
CODE
ret=opus_read_float(info->opus_file, values, values_to_read, &cur_link);


Obviously there is also a read callback but that is simply an fread call that knows nothing about whether the decoder will be dealing with floats or how many channels there might be.

I'd like to try with more files, but 7.1 Opus files are pretty thin on the ground.
Go to the top of the page
+Quote Post
saratoga
post Mar 18 2014, 01:58
Post #5





Group: Members
Posts: 4904
Joined: 2-September 02
Member No.: 3264



Profile it?
Go to the top of the page
+Quote Post
lvqcl
post Mar 18 2014, 04:18
Post #6





Group: Developer
Posts: 3358
Joined: 2-December 07
Member No.: 49183



What is opus_read_float? I cannot find this function anywhere.
Go to the top of the page
+Quote Post
lithopsian
post Mar 18 2014, 14:58
Post #7





Group: Members
Posts: 171
Joined: 27-February 14
Member No.: 114718



Sorry, its op_read_float. op_read (returns int) doesn't have the same issues.
http://www.opus-codec.org/docs/opusfile_api-0.5.pdf
Go to the top of the page
+Quote Post
lithopsian
post Mar 18 2014, 15:29
Post #8





Group: Members
Posts: 171
Joined: 27-February 14
Member No.: 114718



I had some time to dig into this today. jmvalin is right, it is an application issue and not a library issue. The loop timer collapses to zero when the total bitrate goes past 32 * 8 (* 48000). On a longer track I think it would settle down once the internal buffer was full, but on short test tracks it just thrashes the decoder as hard as it can go.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd August 2014 - 08:27