Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
cf283f2d
Commit
cf283f2d
authored
Nov 28, 2018
by
Rostislav Pehlivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "avcodec/libopusenc: Fix warning when encoding ambisonics with channel mapping 2"
This reverts commit
4cd6f08d
.
parent
4cd6f08d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
22 deletions
+0
-22
libopusenc.c
libavcodec/libopusenc.c
+0
-22
No files found.
libavcodec/libopusenc.c
View file @
cf283f2d
...
...
@@ -27,7 +27,6 @@
#include "bytestream.h"
#include "internal.h"
#include "libopus.h"
#include "mathops.h"
#include "vorbis.h"
#include "audio_frame_queue.h"
...
...
@@ -201,21 +200,6 @@ static int libopus_check_vorbis_layout(AVCodecContext *avctx, int mapping_family
return
0
;
}
static
int
libopus_check_ambisonics_channels
(
AVCodecContext
*
avctx
)
{
int
channels
=
avctx
->
channels
;
int
ambisonic_order
=
ff_sqrt
(
channels
)
-
1
;
if
(
channels
!=
((
ambisonic_order
+
1
)
*
(
ambisonic_order
+
1
))
&&
channels
!=
((
ambisonic_order
+
1
)
*
(
ambisonic_order
+
1
)
+
2
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Ambisonics coding is only specified for channel counts"
" which can be written as (n + 1)^2 or (n + 1)^2 + 2"
" for nonnegative integer n
\n
"
);
return
AVERROR_INVALIDDATA
;
}
return
0
;
}
static
int
libopus_validate_layout_and_get_channel_map
(
AVCodecContext
*
avctx
,
int
mapping_family
,
...
...
@@ -247,12 +231,6 @@ static int libopus_validate_layout_and_get_channel_map(
channel_map
=
ff_vorbis_channel_layout_offsets
[
avctx
->
channels
-
1
];
}
break
;
case
2
:
ret
=
libopus_check_max_channels
(
avctx
,
227
);
if
(
ret
==
0
)
{
ret
=
libopus_check_ambisonics_channels
(
avctx
);
}
break
;
case
255
:
ret
=
libopus_check_max_channels
(
avctx
,
254
);
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment