-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev v2 dlb/oss/contribution 01 #10968
Dev v2 dlb/oss/contribution 01 #10968
Conversation
Test: Verified playback of a DD+JOC content from ExoPlayer on a car emulator running Android-S. Change-Id: I27d1f47b89b77e382cc2181273987293eaa32e9a
@@ -1803,6 +1803,8 @@ public static int getAudioTrackChannelConfig(int channelCount) { | |||
return AudioFormat.CHANNEL_OUT_5POINT1 | AudioFormat.CHANNEL_OUT_BACK_CENTER; | |||
case 8: | |||
return AudioFormat.CHANNEL_OUT_7POINT1_SURROUND; | |||
case 10: | |||
return AudioFormat.CHANNEL_OUT_5POINT1POINT4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the commit! We have some details hope to be confirmed:
-
Is 10 the channel count of the compressed DD+JOC stream or the decoded stream? The reason why we are asking is similar to the discussion in another pull request. At track selection, we will check if the audio can be spatialized and then select that track if possible. If 10 is the channel count of the compressed DD+JOC stream, then we will call
spatializer.canBeSpatialized()
againstCHANNEL_OUT_5POINT1POINT4
. But if the decoder outputs a different channel count that the spatializer cannot spatialize, the user won't be able to hear the spatial audio. -
Could you please test this change on the device on Android 12L+? ExoPlayer didn't set the key
MediaFormat.KEY_MAX_OUTPUT_CHANNEL_COUNT
until the API level 32, and according to the previous discussion, the DD+JOC decoder will output 2.0ch PCM in this case. -
Just curious, do you know if there is any compressed streams coming with
CHANNEL_OUT_7POINT1POINT2
, since by making this change, we will assume that 10-channel is always mapped to 5.1.4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below is my response to your questions:
- Here ChannelCount 10 is the decoded stream. On a platform that supports Spatializer, the output can be spatialized otherwise no.
- This change has been tested on Android-13 using emulator.
- We are using canonical channel mask for the 10 channels as 5.1.4 similar to the 8 channels mask of 7.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sqshet for the response!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And before I proceed with internal review of this pull request, I have one more question -
What is channel count for the original compressed stream? My concern on the other hand is that if the original channel count is different than 10, for example some other number that falls to AudioFormat.CHANNEL_INVALID
mask during the track selection, then Spatializer.canBeSpatialized()
can return false with that invalid channel mask (even if the device is actually supports spatialization), then track selector will try to select an alternative track instead of DD+JOC track.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tianyif ,
The input channel count refers to the number of audio objects in the input stream whereas the output channel count maps to canonical channel masks up to 12 channels. As long as canonical channel mask up to 12 channels are supported, it should be OK.
The canonical channel mask what we wanted to add here is for the 10 channels (i.e, 5.1.4).
Thanks
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry for the delay. We have an ongoing pull request from DTS who also adds the case of channel count = 10 to this method, which will conflict with this one, and cause |
Thanks for the update Tianyi. Let me know if you needed anything from me. |
Hi @sqshet, We are currently consulting with audio framework team on the mentioned conflicts with DTS above. Have you tested the above change for API <= 31? With API <= 31, would it be possible to create an Thanks! |
Hi @tianyif , We are using Android 12 (API 31) for our development. Thanks |
Hi @sqshet, We merged another pull request androidx/media#335 recently, which touches the same canonical channel count of 10 case. Could you please test the Dolby stream? I'm closing this pull request for now, but please feel free to let us know if there is any issue introduced for Dolby. Thanks! |
Thanks for following it up @tianyif. |
No description provided.