CN112509591B - Audio encoding and decoding method and system - Google Patents

Audio encoding and decoding method and system Download PDF

Info

Publication number
CN112509591B
CN112509591B CN202011407021.7A CN202011407021A CN112509591B CN 112509591 B CN112509591 B CN 112509591B CN 202011407021 A CN202011407021 A CN 202011407021A CN 112509591 B CN112509591 B CN 112509591B
Authority
CN
China
Prior art keywords
sampling rate
audio
code stream
index
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011407021.7A
Other languages
Chinese (zh)
Other versions
CN112509591A (en
Inventor
李强
王尧
叶东翔
朱勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Barrot Wireless Co Ltd
Original Assignee
Barrot Wireless Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Barrot Wireless Co Ltd filed Critical Barrot Wireless Co Ltd
Priority to CN202011407021.7A priority Critical patent/CN112509591B/en
Publication of CN112509591A publication Critical patent/CN112509591A/en
Application granted granted Critical
Publication of CN112509591B publication Critical patent/CN112509591B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application discloses an audio encoding and decoding method and system, an encoding and decoding method of an LC3 audio encoder and decoder, a storage medium and equipment, and belongs to the technical field of audio encoding and decoding. The audio encoding and decoding method comprises the following steps: setting a coding sampling rate index and code stream head sampling rate information at an encoder end according to the original sampling rate of audio of a sound source; coding the audio of the sound source according to the coding sampling rate index, and writing the sampling rate information of the head of the code stream into the code stream; at a decoder end, determining an output sampling rate index and an output sampling rate according to bit stream head sampling rate information in a bit stream; and decoding the code stream according to the output sample rate index, outputting decoded audio through the output sample rate. The application determines the sampling rate index of the coding and decoding process of the coder and the decoder and the sampling rate information of the output code stream head according to the original sampling rate of the audio source, thereby enabling the coder and the decoder to perform the coding and decoding process with various sampling rates and improving the performance of the coder and the decoder.

Description

Audio encoding and decoding method and system
Technical Field
The application relates to the technical field of audio coding and decoding, in particular to an audio coding and decoding method, an audio coding and decoding system, a coding and decoding method of an LC3 audio coder and decoder, a storage medium and equipment.
Background
The bluetooth audio codec of the current mainstream includes: the SBC audio codec, which is mandatory by the A2DP protocol, is most widely used; the AAC-LC audio codec has good tone quality and wide application, and a plurality of mainstream mobile phones are supported; aptX series audio frequency coder-decoder, its tone quality is better, but the code rate is very high, and is the unique technology of the high pass, it is comparatively closed; the LDAC audio codec has better tone quality, but the code rate is also very high, and is a unique technology of Sony and is also very closed. For the above reasons, the Bluetooth international union Bluetooth Sig has been introduced by a number of manufacturers in combination with LC3 audio codecs, which have the advantages of low delay, high sound quality and coding gain, and no patent fee in the Bluetooth field, and are paid attention to by the manufacturers.
Among the commonly used audio encoders, the mpeg 2-Layer III audio encoder and the mpeg 2-AAC audio encoder are widely used. The audio encoders support a sampling rate of 22.05KHz, so that a certain number of music files, audio and video files and the like adopt the sampling rate of 22.05 KHz. However, in the standard of hearing aids using LC3 audio codec, it mainly supports the standard tone sampling rate of 16KHz and the high tone sampling rate of 24KHz, so when the sampling rate of audio is 22.05KHz, which is commonly used, the LC3 audio codec cannot directly perform the codec process on the audio.
In the existing processing means, a resampling processing process is added before the LC3 audio codec carries out the encoding and decoding process on the audio of the 22.05KHz, the audio of the 22.05KHz is resampled to the audio with the sampling rate of 16KHz or 24KHz, and then the subsequent encoding and decoding process is carried out. The newly added resampling process leads to the degradation of sound quality on one hand, and in addition, the newly added resampling process increases the operation amount of the audio coding device, so that the power consumption is increased, and the service time of the device is shortened.
Disclosure of Invention
Aiming at the problem that an LC3 audio codec in the prior art only supports encoding and decoding of audio with standard sampling rate and cannot encode and decode audio with other sampling rate, the application provides an audio encoding and decoding method, an audio encoding and decoding system, a storage medium and audio encoding and decoding equipment.
In one aspect of the present application, there is provided an audio encoding and decoding method including: setting a coding sampling rate index and code stream head sampling rate information at an encoder end according to the original sampling rate of audio of a sound source; coding according to the coding sampling rate index, and writing the sampling rate information of the code stream head into the code stream; at a decoder end, determining an output sampling rate index and an output sampling rate according to bit stream head sampling rate information in a bit stream; and outputting the decoded audio through the output sampling rate according to the output sampling rate index and decoding the code stream.
In another aspect of the present application, there is provided an audio codec system including: a module for setting a coding sampling rate index and code stream head sampling rate information at the encoder end according to the original sampling rate of the audio of the sound source; a module for encoding according to the encoded sampling rate index, and writing the sampling rate information of the code stream head into the code stream; a module for determining an output sampling rate index and an output sampling rate at a decoder end according to bit stream header sampling rate information in the bit stream; and a module for decoding the code stream according to the output sample rate index, outputting decoded audio through the output sample rate.
In another aspect of the present application, there is provided a codec method of an LC3 audio codec, including: according to the original sampling rate of the audio source, setting a coding sampling rate index and code stream head sampling rate information at the LC3 audio encoder end; coding according to the coding sampling rate index, and writing the sampling rate information of the code stream head into the code stream; at the LC3 audio codec end, determining an output sampling rate index and an output sampling rate according to the bit stream head sampling rate information in the bit stream; and at the LC3 audio codec end, decoding the bitstream according to the output sample rate index, outputting decoded audio by the output sample rate
In another aspect of the present application, a computer readable storage medium storing computer instructions is provided, wherein the computer instructions are operable to perform the audio codec method of aspect one.
In another aspect of the present application, a computer apparatus is provided that includes a processor and a memory storing computer instructions, wherein the processor operates the computer instructions to perform the audio codec method of scheme one.
The beneficial effects of the application are as follows: please confirm the sampling rate index and code stream head sampling rate information of the coding and decoding process of the coder-decoder according to the original sampling rate of the audio source, and then make the coder-decoder can carry on the coding and decoding process of multiple sampling rates, raise the performance of the coder-decoder, promote the user to use and experience.
Drawings
FIG. 1 is a flow chart of an embodiment of the audio codec method of the present application;
FIG. 2 is a flow chart of a decoding process in an audio codec method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an application of the audio codec method of the present application in an LC3 audio encoder;
fig. 4 is a flowchart illustrating an embodiment of the audio codec method of the present application;
FIG. 5 is a schematic diagram of an application of the audio codec method of the present application in an LC3 audio decoder;
Fig. 6 is a flowchart illustrating an embodiment of the audio codec method of the present application;
FIG. 7 is a schematic diagram of the composition of one embodiment of an audio codec system of the present application;
fig. 8 is a flowchart illustrating a codec method of the LC3 audio codec according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 shows an embodiment of the audio codec method of the present application.
In the embodiment shown in fig. 1, the audio encoding and decoding method of the present application includes: s101, setting a coding sampling rate index and code stream head sampling rate information at an encoder end according to the original sampling rate of audio of a sound source; s102, encoding audio of a sound source according to an encoding sampling rate index, and writing bit stream head sampling rate information into a bit stream; s103, at the decoder end, determining an output sampling rate index and an output sampling rate according to the bit stream header sampling rate information in the bit stream; and a process S104 of decoding the code stream according to the output sampling rate index and outputting the decoded audio through the output sampling rate.
In the specific embodiment, the audio coding and decoding method of the application sets the coding sampling rate index and the code stream head sampling rate information at the encoder end according to the original sampling rate of the audio source, so that when the audio of the audio source is coded, the coding sampling rate corresponding to the audio of the audio source is determined according to the set coding sampling rate index and the code stream head sampling rate information, and further the audio of the audio source is coded and decoded. By determining the coding sampling rate corresponding to the original sampling rate of the audio, the codec can encode and decode the audio with the standard sampling rate, and can encode and decode various audio with different original sampling rates, so that the encoding and decoding range of the codec on the audio with different sampling rates is expanded, and the user experience is improved.
In the embodiment shown in fig. 1, the audio encoding and decoding method of the present application includes: in the process S101, according to the original sampling rate of the audio source, a coding sampling rate index and code stream header sampling rate information are set at the encoder end.
In the standard specification of the codec, the sampling rate has a certain correspondence with the sampling rate index and the bit stream header sampling rate information. In the audio encoding and decoding method, the corresponding relation table of the original sampling rate, the sampling rate index and the code stream head sampling rate information is updated, so that the method is suitable for more encoding sampling rate conditions. Wherein, table 1 is a comparison table of updated sampling rate and sampling rate index, and table 2 is a comparison table of updated sampling rate and bit stream header sampling rate information. And setting the coding sampling rate index and the code stream head sampling rate information at the encoder end according to the corresponding relation between the sampling rate of the audio frequency of the sound source and the sampling rate index and the code stream head sampling rate information.
In one example of the present application, for example, when the sampling rate of the audio source is 22.05KHz, it is determined that the coded sampling rate index is 2 according to the correspondence between the sampling rate and the sampling rate index in table 1; according to the corresponding relation between the sampling rate and the sampling rate information of the code stream head in the table 2, the sampling rate information of the code stream head is determined to be 220. For another example, when the sampling rate of the audio source is 12KHz, determining that the coded sampling rate index is 1 according to the correspondence between the sampling rate and the sampling rate index in table 1; according to the corresponding relation between the sampling rate and the sampling rate information of the code stream head in the table 2, the sampling rate information of the code stream head is determined to be 120.
Table 1: sample rate and sample rate index lookup table
Table 2: sample rate and code stream head sample rate information comparison table
In a specific embodiment of the present application, the process of setting the coded sample rate index and the bit stream header sample rate information at the encoder end according to the original sample rate of the audio source includes: and judging whether the original sampling rate is the standard sampling rate of the encoder, if not, setting a corresponding code sampling rate index and code stream head sampling rate information according to the original sampling rate, and if so, determining that the code sampling rate is the standard sampling rate.
In this embodiment, the original sampling rate of the audio source is determined, when the original sampling rate of the audio source is the standard coding rate of the encoder, the setting of the related coding sampling rate index and the code stream header sampling rate information is not needed at this time, and the coding sampling rate is determined to be the standard sampling rate of the encoder; when the original sampling rate of the audio source is not the standard coding rate of the encoder, setting the corresponding coding sampling rate index and the corresponding coding stream head sampling rate information according to the corresponding relation between the sampling rate and the sampling rate index and the corresponding relation between the sampling rate and the corresponding relation between the code stream head sampling rate information shown in the tables 1 and 2.
In one example of the present application, for example, when the original sampling rate of the audio source is 22.05KHz, for the LC3 audio encoder, it is not the standard sampling rate supported by the LC3 audio encoder, and at this time, it is determined that the coded sampling rate index is 2 according to the correspondence between the sampling rate and the sampling rate index in table 1; according to the corresponding relation between the sampling rate and the sampling rate information of the code stream head in the table 2, the sampling rate information of the code stream head is determined to be 220. When the original sampling rate of the audio source is 16KHz, for the LC3 audio encoder, the original sampling rate of the audio source is the same as the sampling rate of the standard tone quality of the LC3 audio encoder, and the setting of the coding sampling rate index and the code stream head sampling rate information is not needed. That is, the audio source at this time can be directly encoded by the encoder without performing the adjustment process of the sampling rate.
In the embodiment shown in fig. 1, the audio encoding and decoding method of the present application includes a process S102, encoding audio source according to the encoded sampling rate index, and writing the bit stream header sampling rate information into the bit stream.
In this embodiment, according to the set encoded sampling rate index and the bit stream header sampling rate information, the corresponding relationship between the sampling rate and the sampling rate index and the corresponding relationship between the sampling rate and the bit stream header sampling rate information shown in table 1 and table 2 are used to determine the encoded sampling rate, and encode the audio of the audio source.
In one embodiment of the present application, when the original sampling rate is the standard sampling rate of the encoder, the encoded sampling rate is determined to be the standard sampling rate.
In this embodiment, the original sampling rate of the audio source is determined, and when the original sampling rate is the standard sampling rate of the encoder, the standard sampling rate of the encoder is determined as the encoding sampling rate of the encoder. For example, when the original sample rate of the source audio is 16KHz, the standard sample rate for LC3 audio encoders includes 16KHz. Therefore, the determination of the coded sample rate index and the code stream header sample rate information is not required at this time, but the coded sample rate of the LC3 audio encoder is directly determined to be 16KHz of the standard sample rate.
In an example of the present application, in determining the coding sampling rate according to the coding sampling rate index and the bit stream header sampling rate information, for example, when the coding sampling rate index is 2 and the bit stream header sampling rate information is 220 according to the original sampling rate of the audio source, the determination of the coding sampling rate will be described. When the code sampling rate index is 2, the code sampling rate to be coded is determined at the encoder end according to the relation between the sampling rate and the sampling rate index shown in table 1, and the code is performed. And writes the corresponding bit stream header sample rate information 220 into the encoded bit stream for transmission to the decoder for subsequent decoding.
In one embodiment of the application, the coded sample rate is the same as the original sample rate.
In this embodiment, after determining the coded sample rate according to the coded sample rate index and the bit stream header sample rate information, the coded sample rate is the same as the original sample rate of the audio source.
In the embodiment shown in fig. 1, the audio encoding and decoding method of the present application includes a process S103, at the decoder side, of determining an output sampling rate index and an output sampling rate according to the bit stream header sampling rate information in the bit stream.
Fig. 2 is a flow chart of an embodiment of determining an output sample rate index and an output sample rate in the audio codec method of the present application.
As shown in fig. 2, the process of determining the output sampling rate index and the output sampling rate in the audio encoding and decoding method of the present application includes: step S201, identifying bit stream header sampling rate information in the bit stream at the decoder end; and a process S202 of determining an output sampling rate index and an output sampling rate according to the bit stream header sampling rate information, the updated sampling rate and sampling rate index comparison table and the updated sampling rate and bit stream header sampling rate information comparison table.
In the embodiment shown in fig. 2, the process S201 identifies the bit stream header sampling rate information in the bit stream at the decoder side.
In this embodiment, the bit stream header sample rate information is written into the encoded bit stream during the encoding of the audio source, and the bit stream header sample rate information is read out during decoding of the encoded bit stream of the audio source.
In the embodiment shown in fig. 2, the process S202 determines the output sampling rate index and the output sampling rate according to the bit stream header sampling rate information, the updated sample rate and sampling rate index lookup table, and the updated sample rate and bit stream header sampling rate information lookup table. In determining the output sampling rate index according to the sampling rate information of the header of the encoded code stream, the output sampling rate corresponding to the sampling rate information of the header of the encoded code stream is determined according to a comparison table of the sampling rate information of the header of the encoded code stream and the sampling rate shown in table 2. And determining the output sampling rate index according to the determined output sampling rate and a comparison table of the sampling rate index and the sampling rate shown in the table 1.
In one embodiment of the application, the type of the sampling rate information of the code stream head is judged at the decoder end; when the code stream head sampling rate information is the code stream head sampling rate information corresponding to the standard sampling rate, determining that the output sampling rate is the standard sampling rate; when the code stream head sampling rate information is code stream head sampling rate information corresponding to the nonstandard sampling rate, determining an output sampling rate index and an output sampling rate according to the code stream head sampling rate information, the updated sampling rate and sampling rate index comparison table and the updated sampling rate and code stream head sampling rate information comparison table.
In one example of the present application, for example, when the bit stream header sampling rate information carried in the encoded bit stream of the audio source is 110, it is determined that the specific sampling rate corresponding to the bit stream header sampling rate information is 11.025KHz according to the comparison table of the bit stream header sampling rate information and the sampling rate shown in table 2. And determining that the output sampling rate index corresponding to the sampling rate of 11.025KHz is 1 according to the determined sampling rate and a comparison table of the sampling rate index and the sampling rate shown in the table 1.
In the embodiment shown in fig. 1, the audio encoding and decoding method of the present application includes a process S104 of decoding a code stream according to an output sampling rate index and outputting decoded audio through the output sampling rate. After determining the output sampling rate index, determining the output sampling rate according to the output sampling rate index and the corresponding code stream header sampling rate information, decoding the encoded code stream according to the output sampling rate index at the decoder end, and outputting decoded audio through the output sampling rate.
In one example of the present application, when the bit stream header sampling rate information is 110, it is determined that the corresponding output sampling rate index is 1. At the decoder end, according to the comparison table of the sampling rate index and the sampling rate shown in table 1 and further the comparison table of the sampling rate information and the sampling rate of the code stream head shown in table 2, the output sampling rate of the decoding end is finally determined to be 11.025KHz.
According to the audio encoding and decoding method, the sampling rate of the encoding and decoding process of the encoder and the decoder is determined according to the original sampling rate of the audio source, so that the encoder and the decoder can perform encoding and decoding processes with various sampling rates, the performance of the encoder and the decoder is improved, and the use experience of a user is improved.
Fig. 3 shows a schematic diagram of the application of the audio codec method of the present application in an LC3 audio encoder.
As shown in fig. 3, the gray module "encode sampling rate and index processing" section in the figure performs the audio codec method of the present application.
Fig. 4 shows a flow chart of a specific example of the audio codec method of the present application.
As shown in fig. 4, the audio codec method of the present application will be described with reference to fig. 4. Firstly, detecting the original sampling rate of the audio of the sound source, and judging whether the original sampling rate is the standard sampling rate of the current encoder. For example, when the encoder is an LC3 audio encoder, its corresponding standard sampling rate is 16KHz or 24KHz. If the original sampling rate of the audio source is not the standard sampling rate, judging whether the original sampling rate of the audio source is 11.025KHz, if so, setting the sampling rate index to be 1 according to a comparison table of the sampling rate and the sampling rate index shown in the table 1 and a comparison table of the sampling rate and the code stream head sampling rate information shown in the table 2, and writing the code stream head sampling rate information to be 110; if not, judging whether the original sampling rate of the audio source is 12KHz, if yes, setting the sampling rate index to be 1 according to a comparison table of the sampling rate and the sampling rate index shown in the table 1 and a comparison table of the sampling rate and the code stream head sampling rate information shown in the table 2, writing the code stream head sampling rate information to be 120, if not, setting the sampling rate index to be 2, and writing the code stream head sampling rate information to be 220. By detecting the original sampling rate of the audio, setting the corresponding sampling rate index and the code stream head sampling rate information, and when the encoder encodes the audio, determining the corresponding encoding sampling rate according to the set sampling rate index and the code stream head sampling rate information to encode the audio. In a specific operation process, corresponding sampling rate judgment conditions can be set according to the actual audio coding sampling rate requirements, so that setting of various corresponding coding sampling rates is realized.
Fig. 5 shows a schematic diagram of the application of the audio codec method of the present application in an LC3 audio decoder.
As shown in fig. 5, the gray module output sampling rate and index processing section in the figure performs the audio codec method of the present application.
Fig. 6 shows a flow chart of a specific example of the audio codec method of the present application.
As shown in fig. 6, the audio codec method of the present application will be described with reference to fig. 6. Firstly, judging the code stream head sampling rate information in the coded audio code stream, when the code stream head sampling rate information is standard code stream head sampling rate information, directly determining the sampling rate in decoding to be the standard sampling rate of the decoder, and when the code stream head sampling rate information is non-standard code stream head sampling rate information, further judging the code stream head sampling rate information. When the bit stream header sampling rate information is 110, setting the sampling rate index to 1 according to a comparison table of sampling rate and sampling rate index as shown in table 1 and a comparison table of sampling rate and bit stream header sampling rate information as shown in table 2, and determining the output sampling rate of the decoder to be 11.025KHz; when the code stream head sampling rate information is not 110, judging whether the code stream head sampling rate information is 120, if the code stream head sampling rate information is 120, setting the sampling rate index to be 1 according to a comparison table of sampling rates and sampling rate indexes shown in table 1 and a comparison table of sampling rates and code stream head sampling rate information shown in table 2, and determining that the output sampling rate of a decoder is 12KHz; if the code stream head sampling rate information is not 120, setting the sampling rate index as 2, and determining the output sampling rate as 22.05KHz. And detecting the sampling rate information of the head of the code stream in the code stream of the encoded audio source, and determining the corresponding sampling rate index and the output sampling rate. When the decoder decodes the encoded audio code stream, the decoder determines the corresponding output sampling rate according to the set sampling rate index and the code stream head sampling rate information to decode the encoded audio. In a specific operation process, corresponding sampling rate judgment conditions can be set according to the actual audio output sampling rate requirements, so that setting of various corresponding output sampling rates is realized.
In one example of the present application, the audio codec method of the present application can be applied to the codec process of the local device, and the method is also applicable to the audio codec device of the mobile terminal, including mobile phone, bluetooth, etc. When Bluetooth is used for voice communication, listening to music or hearing aid, and when the Bluetooth transmitting end and the receiving end are connected, the original Bluetooth transmitting end and the receiving end can support a non-standard sampling rate by the audio encoding and decoding method, and the user experience is improved.
Fig. 7 shows a schematic diagram of the composition of an embodiment of the audio codec system of the present application.
As shown in fig. 7, in this embodiment, the audio codec system of the present application includes a module for setting a coding sample rate index and a bit stream header sample rate information at an encoder end according to an original sample rate of audio of a sound source; a module for encoding the audio of the audio source according to the encoding sampling rate index and writing the sampling rate information of the code stream head into the code stream; a module for determining an output sampling rate index and an output sampling rate at a decoder end according to bit stream header sampling rate information in the bit stream; and a module for decoding the code stream according to the output sample rate index, outputting decoded audio through the output sample rate.
According to the audio coding and decoding system, the sampling rate of the coding and decoding process of the coder and decoder is determined according to the original sampling rate of the audio source, so that the coder and decoder can perform coding and decoding processes with various sampling rates, the performance of the coder and decoder is improved, and the use experience of a user is improved.
Fig. 8 shows a flow chart of an embodiment of the codec method of the LC3 audio codec of the present application.
As shown in fig. 3, in this embodiment, the codec method of the LC3 audio codec of the present application includes: s801, according to the original sampling rate of the audio source, setting a coding sampling rate index and code stream head sampling rate information at an LC3 audio encoder end; s802, coding according to the coding sampling rate index, and writing the sampling rate information of the code stream head into the code stream; step S803, at the LC3 audio codec end, determining an output sampling rate index and an output sampling rate according to the bit stream header sampling rate information in the bit stream; and a process S804, at the LC3 audio codec end, decoding the code stream according to the output sampling rate index, outputting the decoded audio through the output sampling rate.
According to the coding and decoding method of the LC3 audio coder-decoder, according to the original sampling rate of audio of the audio source, the relation between the sampling rate index and the sampling rate and the corresponding relation between the sampling rate information of the code stream head and the sampling rate are updated, and the coding sampling rate and the output sampling rate of the suitable LC3 audio coder-decoder are determined according to the sampling rate index, the corresponding relation between the sampling rate information of the code stream head and the sampling rate, so that the LC3 audio coder-decoder can carry out coding and decoding processes on audio of different sampling rates, the performance of the coder-decoder is improved, and the use experience of users is improved.
In one embodiment of the application, a computer readable storage medium stores computer instructions, wherein the computer instructions are operable to perform the audio codec method described in any of the embodiments. Wherein the storage medium may be directly in hardware, in a software module executed by a processor, or in a combination of the two.
A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
The Processor may be a central processing unit (English: central Processing Unit, CPU for short), other general purpose Processor, digital signal Processor (English: DIGITAL SIGNAL Processor, DSP for short), application specific integrated Circuit (Application SPECIFIC INTEGRATED Circuit, ASIC for short), field programmable gate array (English: field Programmable GATE ARRAY, FPGA for short), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one embodiment of the application, a computer device includes a processor and a memory storing computer instructions, wherein: the processor operates the computer instructions to perform the audio codec method described in any of the embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing is only illustrative of the present application and is not to be construed as limiting the scope of the application, and all equivalent structural changes made by the present application and the accompanying drawings, or direct or indirect application in other related technical fields, are included in the scope of the present application.

Claims (8)

1. An audio encoding and decoding method, comprising:
Judging whether the original sampling rate of the audio of the sound source is the standard sampling rate of an encoder end, if not, setting a corresponding coding sampling rate index and code stream head sampling rate information at the encoder end according to the original sampling rate, and if so, determining that the coding sampling rate of the encoder end is the standard sampling rate;
coding the audio of the sound source according to the coding sampling rate index, and writing the sampling rate information of the head of the code stream into the code stream;
identifying the bit stream header sampling rate information in the bit stream at a decoder end, determining an output sampling rate index and an output sampling rate according to the bit stream header sampling rate information, an updated sample rate and sample rate index comparison table, and an updated sample rate and bit stream header sampling rate information comparison table, wherein
The sampling rate and sampling rate index comparison table is a table reflecting the corresponding relation between the sampling rate supported by the main stream Bluetooth encoder and a preset number,
The sampling rate and code stream head sampling rate information comparison table is a table reflecting the corresponding relation between the sampling rate supported by the main stream Bluetooth encoder and a preset numerical value; and
And decoding the code stream according to the output sampling rate index, and outputting decoded audio through the output sampling rate.
2. The audio codec method of claim 1, wherein the sample rate and sample rate index lookup table and the sample rate and stream header sample rate information lookup table are updated, and the encoded sample rate index, the stream header sample rate information, and the encoded sample rate are determined based on the updated sample rate and sample rate index lookup table and/or the updated sample rate and stream header sample rate information lookup table.
3. The audio codec method of claim 1, wherein the encoded sample rate is the same as the original sample rate.
4. The audio codec method of claim 1, wherein the determining the output sample rate index and the output sample rate further comprises:
Judging the type of the code stream head sampling rate information at the decoder end;
When the code stream head sampling rate information is the code stream head sampling rate information corresponding to the standard sampling rate, determining that the output sampling rate is the standard sampling rate;
And when the code stream head sampling rate information is code stream head sampling rate information corresponding to the standard sampling rate, determining the output sampling rate index and the output sampling rate according to the code stream head sampling rate information, the updated sample rate and sampling rate index comparison table and the updated sample rate and code stream head sampling rate information comparison table.
5. An audio codec system, comprising:
The device comprises a module for judging whether the original sampling rate of the audio of the sound source is the standard sampling rate of an encoder end, if not, setting a corresponding coding sampling rate index and code stream head sampling rate information at the encoder end according to the original sampling rate, and if so, determining that the coding sampling rate of the encoder end is the standard sampling rate;
The module is used for encoding the audio source according to the encoding sampling rate index and writing the sampling rate information of the code stream head into the code stream;
A module for identifying the bit stream header sample rate information in the bit stream at a decoder end, determining an output sample rate index and an output sample rate based on the bit stream header sample rate information, an updated sample rate and sample rate index lookup table, and an updated sample rate and bit stream header sample rate information lookup table, wherein,
The sampling rate and sampling rate index comparison table is a table reflecting the corresponding relation between the sampling rate supported by the main stream Bluetooth encoder and a preset number,
The sampling rate and code stream head sampling rate information comparison table is a table reflecting the corresponding relation between the sampling rate supported by the main stream Bluetooth encoder and a preset numerical value; and
And a module for decoding the code stream according to the output sampling rate index and outputting decoded audio through the output sampling rate.
6. A method of encoding and decoding an LC3 audio codec, comprising:
Judging whether the original sampling rate of the audio source is the standard sampling rate of the LC3 audio encoder end, if not, setting a corresponding coding sampling rate index and code stream head sampling rate information at the LC3 audio encoder end according to the original sampling rate, and if so, determining that the coding sampling rate of the LC3 audio encoder end is the standard sampling rate;
Coding the original sampling rate according to the coding sampling rate index, and writing the sampling rate information of the code stream head into the code stream;
identifying the bit stream header sampling rate information in the bit stream at the LC3 audio decoder, determining an output sampling rate index and an output sampling rate according to the bit stream header sampling rate information, an updated sample rate and sample rate index comparison table, and an updated sample rate and bit stream header sampling rate information comparison table, wherein,
The sampling rate and sampling rate index comparison table is a table reflecting the corresponding relation between the sampling rate supported by the main stream Bluetooth encoder and a preset number,
The sampling rate and code stream head sampling rate information comparison table is a table reflecting the corresponding relation between the sampling rate supported by the main stream Bluetooth encoder and a preset numerical value; and
At the LC3 audio decoder end, the code stream is decoded according to the output sampling rate index, and decoded audio is output through the output sampling rate.
7. A computer readable storage medium storing computer instructions, wherein the computer instructions are operative to perform the audio codec method of any one of claims 1-4.
8. A computer device comprising a processor and a memory, the memory storing computer instructions, wherein the processor operates the computer instructions to perform the audio codec method of any one of claims 1-4.
CN202011407021.7A 2020-12-04 2020-12-04 Audio encoding and decoding method and system Active CN112509591B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011407021.7A CN112509591B (en) 2020-12-04 2020-12-04 Audio encoding and decoding method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011407021.7A CN112509591B (en) 2020-12-04 2020-12-04 Audio encoding and decoding method and system

Publications (2)

Publication Number Publication Date
CN112509591A CN112509591A (en) 2021-03-16
CN112509591B true CN112509591B (en) 2024-05-14

Family

ID=74969983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011407021.7A Active CN112509591B (en) 2020-12-04 2020-12-04 Audio encoding and decoding method and system

Country Status (1)

Country Link
CN (1) CN112509591B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030034876A (en) * 2001-10-29 2003-05-09 엘지전자 주식회사 Message Transfering Method For Multi-channel Realtime Speech Coder/Decoder
CN1677490A (en) * 2004-04-01 2005-10-05 北京宫羽数字技术有限责任公司 Intensified audio-frequency coding-decoding device and method
KR20060105931A (en) * 2005-04-01 2006-10-12 엘지전자 주식회사 Decoding control method for audio frame
CN101079296A (en) * 2006-05-22 2007-11-28 上海奇码数字信息有限公司 Audio frequency decoder and audio frequency decoding method
CN101572088A (en) * 2008-04-30 2009-11-04 北京工业大学 Stereo encoding and decoding method, a coder-decoder and encoding and decoding system
KR20100048792A (en) * 2008-10-31 2010-05-11 삼성전자주식회사 Method and apparatus for encoding/decoding speech signal
WO2010086342A1 (en) * 2009-01-28 2010-08-05 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Audio encoder, audio decoder, method for encoding an input audio information, method for decoding an input audio information and computer program using improved coding tables
CN102543085A (en) * 2010-12-17 2012-07-04 无锡华润矽科微电子有限公司 Multi-sampling rate decoding system of digital audio signal and method thereof
CN108231083A (en) * 2018-01-16 2018-06-29 重庆邮电大学 A kind of speech coder code efficiency based on SILK improves method
CN110767243A (en) * 2019-11-04 2020-02-07 重庆百瑞互联电子技术有限公司 Audio coding method, device and equipment
CN111833891A (en) * 2020-07-21 2020-10-27 北京百瑞互联技术有限公司 LC3 encoding and decoding system, LC3 encoder and optimization method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101381513B1 (en) * 2008-07-14 2014-04-07 광운대학교 산학협력단 Apparatus for encoding and decoding of integrated voice and music
GB2476041B (en) * 2009-12-08 2017-03-01 Skype Encoding and decoding speech signals

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030034876A (en) * 2001-10-29 2003-05-09 엘지전자 주식회사 Message Transfering Method For Multi-channel Realtime Speech Coder/Decoder
CN1677490A (en) * 2004-04-01 2005-10-05 北京宫羽数字技术有限责任公司 Intensified audio-frequency coding-decoding device and method
KR20060105931A (en) * 2005-04-01 2006-10-12 엘지전자 주식회사 Decoding control method for audio frame
CN101079296A (en) * 2006-05-22 2007-11-28 上海奇码数字信息有限公司 Audio frequency decoder and audio frequency decoding method
CN101572088A (en) * 2008-04-30 2009-11-04 北京工业大学 Stereo encoding and decoding method, a coder-decoder and encoding and decoding system
KR20100048792A (en) * 2008-10-31 2010-05-11 삼성전자주식회사 Method and apparatus for encoding/decoding speech signal
WO2010086342A1 (en) * 2009-01-28 2010-08-05 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Audio encoder, audio decoder, method for encoding an input audio information, method for decoding an input audio information and computer program using improved coding tables
CN102543085A (en) * 2010-12-17 2012-07-04 无锡华润矽科微电子有限公司 Multi-sampling rate decoding system of digital audio signal and method thereof
CN108231083A (en) * 2018-01-16 2018-06-29 重庆邮电大学 A kind of speech coder code efficiency based on SILK improves method
CN110767243A (en) * 2019-11-04 2020-02-07 重庆百瑞互联电子技术有限公司 Audio coding method, device and equipment
CN111833891A (en) * 2020-07-21 2020-10-27 北京百瑞互联技术有限公司 LC3 encoding and decoding system, LC3 encoder and optimization method thereof

Also Published As

Publication number Publication date
CN112509591A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
US20080004883A1 (en) Scalable audio coding
CN111681663B (en) Method, system, storage medium and device for reducing audio coding computation amount
CN111681664A (en) Method, system, storage medium and equipment for reducing audio coding rate
JP5713296B2 (en) Apparatus and method for encoding at least one parameter associated with a signal source
JP2009514033A (en) Audio data packet format, demodulation method thereof, codec setting error correction method, and mobile communication terminal performing the same
JP2014509409A (en) Device for adaptively encoding and decoding watermarked signals
CN113689864B (en) Audio data processing method and device and storage medium
WO2021143692A1 (en) Audio encoding and decoding methods and audio encoding and decoding devices
EP4086899A1 (en) Audio transmission method and electronic device
KR102017892B1 (en) Improved hierarchical coding
CN112669860B (en) Method and device for increasing effective bandwidth of LC3 audio coding and decoding
CN111986685A (en) Audio coding and decoding method and system for realizing high sampling rate
CN105869647B (en) A kind of primary DSD audio-frequency decoding method of smart phone, system and smart phone
CN1706222B (en) Embedded data signaling
WO2021143691A1 (en) Audio encoding and decoding methods and audio encoding and decoding devices
CN112509591B (en) Audio encoding and decoding method and system
TWI326447B (en) Method and information processing system for quantizing class information and pitch information of audio, and method in distributed speech recognition system
CN113225644A (en) Low-delay Bluetooth audio system and audio source end and audio receiving end thereof
CN112735446B (en) Method, system and medium for adding extra information in LC3 audio code stream
JP2005151572A (en) Apparatus and method for reproducing three-dimensional stereo sound for communication terminal
CN115223577A (en) Audio processing method, chip, device, equipment and computer readable storage medium
KR20050075510A (en) Apparatus and method for playing/storing three-dimensional sound in communication terminal
JP4437011B2 (en) Speech encoding device
US20200387338A1 (en) Detection method and detection device for audio signal
WO2019227931A1 (en) Method and apparatus for calculating down-mixed signal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Country or region after: China

Address after: A1009, floor 9, block a, No. 9, Shangdi Third Street, Haidian District, Beijing 100085

Applicant after: Beijing Bairui Internet Technology Co.,Ltd.

Address before: 7-1-1, building C, 7 / F, building 2-1, No.2, Shangdi Information Road, Haidian District, Beijing 100085

Applicant before: BARROT WIRELESS Co.,Ltd.

Country or region before: China

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant