CN114466238A - Frame demultiplexing method, electronic device and storage medium - Google Patents
Frame demultiplexing method, electronic device and storage medium Download PDFInfo
- Publication number
- CN114466238A CN114466238A CN202011240224.1A CN202011240224A CN114466238A CN 114466238 A CN114466238 A CN 114466238A CN 202011240224 A CN202011240224 A CN 202011240224A CN 114466238 A CN114466238 A CN 114466238A
- Authority
- CN
- China
- Prior art keywords
- frame
- multimedia
- frames
- electronic device
- reading
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/434—Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/439—Processing of audio elementary streams
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The embodiment of the application provides a frame demultiplexing method, electronic equipment and a storage medium, which relate to the technical field of multimedia, and the method comprises the following steps: acquiring a target file, wherein the target file comprises a plurality of multimedia frames; acquiring input time; determining an optimal reading amount and a first multimedia frame based on the input time; reading a plurality of second multimedia frames in the target file from the first multimedia frames based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frames; and sending a plurality of second multimedia frames to a second electronic device. The method provided by the embodiment of the application can improve the calculation capability and the reading capability of the audio frame and the video frame, so that the sending quantity of the audio frame and the video frame can be improved, and the sending efficiency of the audio frame and the video frame can be further improved.
Description
Technical Field
The embodiment of the application relates to the technical field of multimedia, in particular to a frame demultiplexing method, electronic equipment and a storage medium.
Background
With the development of communication technology, the functions of electronic equipment are more and more abundant, and users can search various multimedia resources and play the multimedia resources by using the electronic equipment. With the continuous development of network technology, distributed networks are more and more widely used, including multimedia distributed technology.
One of the core functions of the multimedia distributed technology is to demultiplex multimedia data from a source device and transmit audio data and video data obtained after demultiplexing to a destination device.
Disclosure of Invention
The embodiment of the application provides a frame demultiplexing method, electronic equipment and a storage medium, and aims to provide a demultiplexing calculation mode for audio frames and video frames, and improve the calculation capability and reading capability of the audio frames and the video frames, so that the sending quantity of the audio frames and the video frames can be improved, and the sending efficiency of the audio frames and the video frames can be further improved.
In a first aspect, an embodiment of the present application provides a frame demultiplexing method, including:
acquiring a target file, wherein the target file comprises a plurality of multimedia frames; in particular, the target file may be a multimedia file, e.g. a piece of video. The multimedia frames may include audio frames and video frames.
Acquiring input time; specifically, the input time may include a time of user input, for example, a time at which the user is specified in fast forward or fast reverse. The input time may also be any time when the multimedia video is played in sequence, and this is not particularly limited in the embodiment of the present application.
Determining an optimal reading amount and a first multimedia frame based on the input time; specifically, the optimal reading amount may be the number of the multimedia frames that can be read this time. The first multimedia frame corresponds to the input time.
Reading a plurality of second multimedia frames in the target file from the first multimedia frames based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frames; specifically, the plurality of second multimedia frames may be a plurality of data frames including the first multimedia frame. For example, assuming that the optimal reading amount is 4, if the frame number of the first multimedia frame is 1001, 4 frames, i.e. 4 frames of 1001, 1002, 1003 and 1004, are read from 1001.
And transmitting the plurality of second multimedia frames to the second electronic equipment.
In one possible implementation manner, the reading the plurality of second multimedia frames in the target file from the first multimedia frame based on the optimal reading amount includes:
reading a plurality of second video frames in the target file from the first video frame based on the optimal reading amount; in particular, the plurality of second multimedia frames may be a plurality of second video frames.
Or reading a plurality of second audio frames in the target file from the first audio frame based on the optimal reading amount; in particular, the plurality of second multimedia frames may be a plurality of second audio frames.
In one possible implementation, determining the optimal reading amount based on the input time includes:
acquiring a preset number to be read; specifically, the preset pending read number may be a tentative optimal read number.
Counting the frame numbers of all multimedia frames from the input time to the end time of the target file; for example, assuming that the total frame number of the target file is 1000 and the frame numbers are 1-1000, that is, the frame number corresponding to the start time of the target file is 1 and the frame number corresponding to the end time of the target file is 1000, if the frame number corresponding to the input time is 490, the remaining frame number is 1000 + 490-510, that is, the frame numbers of all multimedia frames from the input time to the end time of the target file are 510.
If the frame number of the multimedia frame is larger than or equal to the preset undetermined reading number, setting the preset undetermined reading number as the optimal reading quantity; for example, assuming that the predetermined pending reading number is 4, if the number of frames of all multimedia frames from the input time to the end time of the target file is greater than or equal to 4, the optimal reading number may be set to 4, that is, 4 frames are read this time.
If the frame number of the multimedia frame is less than the preset undetermined reading number, setting the optimal reading amount to be 1; for example, assuming that the frame number corresponding to the current time is 998 and the total frame number of the target file is 1000, the frame numbers of all multimedia frames from the input time to the end time of the target file are 1000 and 998 are 2, at this time, the optimal reading amount may be set to 1, that is, only one frame is read this time.
In one possible implementation, the predetermined number of pending reads is determined by the number of bits of the vector register and the data type of the multimedia frame. Wherein the vector register may be a single instruction multiple data instruction set, e.g., NEON.
In one possible implementation manner, reading, starting from the first multimedia frame, a plurality of second multimedia frames in the target file based on the optimal reading amount includes:
determining a block offset based on the input time instant;
acquiring the frame size of each second multimedia frame based on the optimal reading amount;
constructing a frame matrix based on the block offset and the frame size;
vectorizing the frame matrix to obtain a frame offset vector;
a plurality of second multimedia frames in the target file are read, starting with the first multimedia frame, according to the frame offset vector.
In one possible implementation manner, the sending the plurality of second multimedia frames to the second electronic device includes:
and sending the plurality of second multimedia frames and the frame size of each second multimedia frame to the second electronic equipment. Thereby, it may be facilitated for the target device to separate each second multimedia frame based on its frame size.
In a second aspect, an embodiment of the present application provides a frame demultiplexing device, including:
the first acquisition module is used for acquiring a target file, and the target file comprises a plurality of multimedia frames;
the second acquisition module is used for acquiring input time;
the computing module is used for determining the optimal reading amount and the first multimedia frame based on the input time;
the reading module is used for reading a plurality of second multimedia frames in the target file from the first multimedia frame based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frame;
and the sending module is used for sending the plurality of second multimedia frames to the second electronic equipment.
In one possible implementation manner, the plurality of multimedia frames include a plurality of video frames and a plurality of audio frames, and the reading module is further configured to read a plurality of second video frames in the target file starting from the first video frame based on the optimal reading amount;
or reading a plurality of second audio frames in the target file from the first audio frame based on the optimal reading amount.
In one possible implementation manner, the calculating module includes:
the acquisition unit is used for acquiring a preset number to be read;
the counting unit is used for counting the frame numbers of all multimedia frames from the input moment to the end moment of the target file;
the determining unit is used for setting the preset undetermined reading number as the optimal reading quantity if the frame number of the multimedia frames is greater than or equal to the preset undetermined reading number; and if the frame number of the multimedia frame is less than the preset undetermined reading number, setting the optimal reading amount to be 1.
In one possible implementation manner, the preset number to be read is determined by the number of bits of the vector register and the data type of the multimedia frame.
In one possible implementation manner, the reading module includes:
a calculation unit for determining a block offset based on the input time instant;
a retrieval unit for acquiring a frame size of each second multimedia frame based on the optimal read amount;
a construction unit for constructing a frame matrix based on the block offset and the frame size;
the operation unit is used for carrying out vectorization operation on the frame matrix to obtain a frame offset vector;
and the reading unit is used for reading a plurality of second multimedia frames in the target file from the first multimedia frame according to the frame offset vector.
In one possible implementation manner, the sending module is further configured to send the plurality of second multimedia frames and the frame size of each second multimedia frame to the second electronic device.
In a third aspect, an embodiment of the present application provides a first electronic device, including:
a memory, wherein the memory is used for storing a computer program code, and the computer program code includes instructions, and when the first electronic device reads the instructions from the memory, the first electronic device executes the following steps:
acquiring a target file, wherein the target file comprises a plurality of multimedia frames;
acquiring input time;
determining an optimal reading amount and a first multimedia frame based on the input time;
reading a plurality of second multimedia frames in the target file from the first multimedia frames based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frames;
and transmitting the plurality of second multimedia frames to the second electronic equipment.
In one possible implementation manner, the instruction, when executed by the first electronic device, causes the first electronic device to perform reading, starting from a first multimedia frame, a plurality of second multimedia frames in a target file based on an optimal reading amount, where the reading includes:
reading a plurality of second video frames in the target file from the first video frame based on the optimal reading amount;
or reading a plurality of second audio frames in the target file from the first audio frame based on the optimal reading amount.
In one possible implementation manner, when the instruction is executed by the first electronic device, the step of causing the first electronic device to determine an optimal reading amount based on an input time includes:
acquiring a preset number to be read;
counting the frame numbers of all multimedia frames from the input time to the end time of the target file;
if the frame number of the multimedia frame is larger than or equal to the preset undetermined reading number, setting the preset undetermined reading number as the optimal reading quantity;
and if the frame number of the multimedia frame is less than the preset undetermined reading number, setting the optimal reading amount to be 1.
In one possible implementation manner, the preset number to be read is determined by the number of bits of the vector register and the data type of the multimedia frame.
In one possible implementation manner, when executed by the first electronic device, the instructions cause the first electronic device to perform reading, starting from a first multimedia frame, a plurality of second multimedia frames in a target file based on an optimal reading amount, including:
determining a block offset based on the input time instant;
acquiring the frame size of each second multimedia frame based on the optimal reading quantity;
constructing a frame matrix based on the block offset and the frame size;
vectorizing the frame matrix to obtain a frame offset vector;
a plurality of second multimedia frames in the target file are read, starting from the first multimedia frame, according to the frame offset vector.
In one possible implementation manner, when the instruction is executed by the first electronic device, the step of causing the first electronic device to execute sending a plurality of second multimedia frames to the second electronic device includes:
and sending the plurality of second multimedia frames and the frame size of each second multimedia frame to the second electronic equipment.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program, which, when run on a computer, causes the computer to perform the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program, which is configured to perform the method according to the first aspect when the computer program is executed by a computer.
In a possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or in part or in whole on a memory not packaged with the processor.
Drawings
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a frame demultiplexing method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a frame matrix provided in an embodiment of the present application;
FIG. 4 is a diagram of a frame offset vector according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a frame demultiplexing device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
One of the core functions of the multimedia distributed technology is to demultiplex multimedia data from a source device and transmit audio data and video data obtained after demultiplexing to a destination device.
Fig. 1 is a block diagram of a flow of a source device sending multimedia data to a target device, as shown in fig. 1, a multimedia file may be demultiplexed in the source device, so that audio data and video data may be obtained respectively; then, the audio data and the video data can be read separately, and since only one frame of data can be read at a time, only one audio frame and only one video frame can be obtained at a time, for example, only one frame of audio data can be obtained at a time of reading the audio data, and only one frame of video data can be obtained at a time of reading the video data. Then, the source device transmits the video frame and the audio frame to the destination device through the transmission module, wherein only one frame of data can be transmitted at a time, for example, only one frame of audio data or one frame of video data can be transmitted at a time.
As can be seen from the scheme of fig. 1, the source device can only demultiplex one frame of data (e.g., one frame of audio or one frame of video) at a time. Therefore, the source device needs enough time to send a certain amount of audio data and video data to the target device for the target device to play, which may bring a delay to the playing of the audio data and video data of the target device and reduce the audiovisual experience of the user. In addition, the source device can transmit only one frame of data at a time when transmitting multimedia data, and the data transmission efficiency is low.
Based on the above problem, an embodiment of the present application provides a frame demultiplexing method, so that multiple multimedia data frames can be read in a source device at a time, the data reading efficiency is improved, and multiple multimedia data frames are sent by the source device at a time, so that the data sending efficiency can be improved, the play delay of the target device on the multimedia data can be reduced, and the audio-visual experience of a user can be improved.
Taking a multimedia file in MP4 format as an example, and referring to fig. 2-4, the frame demultiplexing method provided in the embodiment of the present application will be described,
fig. 2 is a schematic flow chart of an embodiment of a frame demultiplexing method provided in the embodiment of the present application, including:
step 101, a target multimedia file is obtained in a source device.
Specifically, the source device may be a first electronic device that plays a multimedia file, such as a mobile phone, a tablet, a computer, or other types of first electronic devices, which is not limited in this application. The multimedia file may include frames of multimedia data, which may include frames of audio data and frames of video data. It should be understood that the embodiment of the present application takes a multimedia file in an MP4 format as an example, but the embodiment of the present application does not limit the format of the multimedia file.
The storage of the audio data frames and the video data frames in the MP4 format in the multimedia file can be realized by table index. Taking a video data frame as an example, the video data frame may include a timing-to-frame index table, a frame-to-block index table, a block offset index table, and a frame size index table. Shown in table 1 is a timing to frame index table.
TABLE 1
Serial number | Number of frames | Frame duration |
1 | 1 | 42 |
2 | 1 | 41 |
3 | 2 | 42 |
4 | 1 | 41 |
… | … | … |
Through the index relationship in the table 1, the corresponding frame number can be searched and obtained at any time input by the user. For example, assume that the time of user input is 200, the number of frames with sequence number 1 is 1, the frame duration is 42, the number of frames with sequence number 2 is 1, the frame duration is 41, the number of frames with sequence number 3 is 2, the frame duration is 42, the number of frames with sequence number 4 is 1, and the frame duration is 41, then the total duration of the first 4 frames is 1 × 42+1 × 41+2 × 42 ═ 167, and the total duration of the first 5 frames is 1 × 42+1 × 41+ 2+ 42+1 × 41 ═ 208, so that the time 200 corresponds to the 5 th frame, that is, the frame number is 5.
Shown in table 2 is a frame-to-block index table. Where each block may contain one or more frames. The length of each block may be different, as may the length of the frames within the block.
TABLE 2
Serial number | Block number | Number of frames per block |
1 | 1 to 28 | 13 |
2 | 29 | 12 |
3 | 30 to 57 | 13 |
4 | 58 | 12 |
… | … | … |
Through the index relationship in table 2, the corresponding block containing the designated frame can be searched and obtained according to the frame number of the designated frame, so that the designated frame can be found through the block. For example, suppose that the designated frame is the 500 th frame and the block set of sequence number 1 includes 28 × 13 — 364 frames, wherein the block set may include one or more blocks, the block set of sequence number 1 includes 28 blocks, and the block numbers are 1-28 respectively; the block set of sequence number 2 includes 1 × 12 — 12 frames, where the block set of sequence number 2 includes 1 block and the block number is 29; the block set of sequence number 3 contains 28 × 13 — 364 frames, where the block set of sequence number 3 contains 28 blocks with block numbers 30-57. Since 364+12<500<364+12+364, that is, the 500 th frame is greater than the total number of frames of the first 2 block sets but less than the total number of frames of the first 3 block sets, the 500 th frame is located in the block of the sequence number 3 set. Next, since 28 × 13+1 × 12+9 × 13<500<28 × 13+1 × 12+10 × 13, that is, the 500 th frame is greater than the total number of frames of the first 38 blocks but less than the total number of frames of the first 39 blocks, the 500 th frame is located in the block having the block number 39. And 500 is 28 + 13+ 1+ 12+9 + 13+7, so the 500 th frame is the 7 th frame in the block with the block number 39.
Shown in table 3 is a block offset index table. Wherein the block offset is used to identify the location of each block in the multimedia file.
TABLE 3
Block number | Block offset |
1 | $00039D28 |
2 | $0003D19B |
3 | $0003F50D |
4 | $00041B22 |
… | … |
By the index relationship in table 3, the block offset corresponding to the specified block can be obtained by searching the sequence number of the specified block.
Shown in table 4 is a frame size index table.
TABLE 4
Frame number | Frame size |
1 | $000000ae |
2 | $0000001e |
3 | $000015cc |
4 | $0000001e |
… | … |
Through the index relationship in table 4, the frame size corresponding to the designated frame can be obtained by searching the frame number of the designated frame.
As can be seen from tables 1 to 4, after a user arbitrarily inputs a time, the corresponding block offset and frame size can be obtained through table lookup through tables 1 to 4, and then the corresponding frame offset can be obtained, so that fast forward and fast backward during playing of a multimedia file can be realized. Taking the 500 th frame as an example, the block number (e.g., block 39) corresponding to the 500 th frame can be obtained through table 2, so that the corresponding block offset can be obtained through table 3 lookup. While the frame number of the first frame in block 39 is 494 and the frame number of the seventh frame in block 39 is 500, so that the size of frame 494-499 is obtained by table 4 lookup. Thus, the offset of frame 494-frame 500 may be derived from the offset of block 39 and the size of frame 494-frame 499, respectively, e.g., since frame 494 is the first frame of block 39, the offset of frame 494 may be derived from the offset of block 39. While the offset of frame 495 may be obtained by the offset of block 39 and the frame size of frame 494. The offset for frame 496 is obtained by the offset of block 39, the frame size of frame 494 and the frame size of frame 495, and so on. Where frame 494-frame 500 offset may be the play address of the data frame, fast forward and fast reverse may be implemented.
Step 102, obtaining an input time.
Specifically, the input time may be any time input by the user, for example, the user may click any time on a play progress bar of the multimedia file to realize fast forward or fast backward; or may be a preset time, which is not particularly limited in the embodiments of the present application.
Step 103, determining the current optimal reading quantity based on the input time.
Specifically, the optimal reading amount is used to identify the number of the readable multimedia data frames, for example, n audio data frames can be read at a time or n video data frames can be read at a time, where n is the optimal reading amount.
In particular implementations, the read base m may be determined by the number of bits of the register and the data type of the multimedia data frame. Wherein the reading base m is used for identifying the reading number in the unit of block. Illustratively, if a NEON Instruction set is employed, the NEON is a 128-bit Single Instruction Multiple Data Instruction Set (SIMD) for an ARM Cortex-A series processor, that is, the NEON is a 128-bit vector register; if the data type of the multimedia data frame is uin32_ t type, that is, the multimedia data frame is 32-bit, the reading base m may be P/D, where P is the number of bits of the register of NEON and Q is the number of bits of the multimedia data frame, that is, m is 128/32 is 4.
It is understood that other types of instruction sets may be used, and different data types may be used in the multimedia data frame, so that the reading base m may also be different values, for example, 2, 8, 16, and the like, which is not limited in this embodiment of the present invention.
Further, after the reading base number m is determined, the current optimal reading amount can be determined according to the reading base number m. In specific implementation, the reading base number m can be multiplied by a preset multiple, so that an amount to be read can be obtained, then, the amount to be read can be compared with the total frame number to be read in a target multimedia file, and if the total frame number to be read is greater than or equal to the amount to be read, the amount to be read can be set as the current optimal reading amount; for example, if m is 4 and the preset multiple is 4, the pending reading amount is 16, and if the total frame number to be read is greater than or equal to 16, the current optimal reading amount may be set to 16, that is, 16 frames may be read this time; if the total frame number to be read is less than the pending reading amount, the current optimal reading amount may be set to 1, for example, if m is 4 and the preset multiple is 4, the pending reading amount is 16, and if the total frame number to be read is less than 16, the current optimal reading amount may be set to 1, that is, only 1 frame is read this time.
Based on the input time instant, a block offset is determined, step 104.
Specifically, when the input time is obtained, the block offset may also be determined based on the input time. In specific implementation, the query may be performed in table 1 according to the input time to determine a frame number corresponding to the input time; then, according to the frame number, inquiring in the table 2 to determine the block number corresponding to the input time; and a lookup in table 3 based on the block number can determine the block offset.
And 105, determining the frame number based on the current optimal reading quantity, and acquiring the corresponding frame size according to the frame number.
Specifically, after determining the current optimal reading amount, the number of frames read this time may be determined. For example, if the optimal reading amount is 4, the number of frames read this time is 4. Next, sequentially querying in table 4 according to the frame number corresponding to the input time and the frame number read this time, the frame size of each frame of the frame read this time may be obtained, and for example, if 4 frames are read this time, the frame sizes of the 4 frames may be obtained.
Step 106, constructing a frame matrix based on the block offset and the frame size.
Specifically, after determining the block offset and the frame size, the frame matrix may be constructed according to the block offset and the frame size. Where each row in the frame matrix may contain a block offset and a frame size. The number of rows of the matrix corresponds to the optimal read volume and the number of columns of the matrix corresponds to the optimal read volume. For example, if the optimal read amount is 4, the frame matrix may be a 4 × 4 matrix; if the optimal read amount is 8, the frame matrix may be a matrix of 8 × 8, which is not particularly limited in this embodiment.
Now, taking an optimal reading amount of 4 as an example for explanation, since the optimal reading amount is 4, that is, 4 frames are read this time, a frame matrix of 4 × 4 can be constructed. Fig. 3 shows a 4 × 4 frame matrix, in which the first row of data is (block offset, 0, 0, 0), the second row of data is (block offset, first frame size, 0, 0), the third row of data is (block offset, first frame size, second frame size, 0), and the fourth row of data is (block offset, first frame size, second frame size, third frame size).
Step 107, performing vectorization calculation on the frame matrix to obtain a frame offset vector.
Specifically, after the frame matrix is obtained, vectorization calculation may be performed on the frame matrix, so that a frame offset vector may be obtained. The vectorization calculation may be an accumulated summation of all columns in the frame matrix, thereby obtaining a column vector, which may be a frame offset vector.
Taking the frame matrix shown in fig. 3 as an example, 4 columns in the frame matrix are accumulated and summed, so that a column vector shown in fig. 4 can be obtained, wherein the column vector may be a frame offset vector. The data of each row in the column vector corresponds to the offset of each frame, for example, the value of the first row in the column vector is a block offset value, and the block offset value corresponds to the offset of the first frame; the value of the second row in the column vector is the block offset value + the size of the first frame, and the value of the block offset value + the size of the first frame corresponds to the offset of the second frame; the value of the third row in the column vector is the block offset value + the size of the first frame + the size of the second frame, and the value of the block offset value + the size of the first frame + the size of the second frame corresponds to the offset of the third frame; the value of the fourth line in the column vector is the block offset value + the first frame size + the second frame size + the third frame size, and the value of the block offset value + the first frame size + the second frame size + the third frame size corresponds to the offset of the fourth frame.
And step 108, acquiring a multimedia data frame in the target multimedia file according to the frame offset vector, and sending the multimedia data frame to the target equipment.
Specifically, the target device may be a first electronic device with a multimedia playing function, such as a mobile phone, a tablet, a television, and the like. After the source device obtains the frame offset vectors, a plurality of multimedia data frames in the target multimedia file may be obtained according to the frame offset of each frame in the frame offset vectors, and the plurality of multimedia data frames may be sent to the target device. It can be understood that, since the frame offset vector may correspond to an audio frame offset vector or a video frame offset vector, each time the frame offset vector is acquired, the frame offset vector may be a video data frame or an audio data frame, which is not particularly limited in this embodiment of the present application.
Optionally, when the source device sends the multimedia data frames to the target device, the source device may also send the frame size of each multimedia data frame to the target device, so that the target device separates each multimedia data frame, and thus each multimedia data frame may be decoded and played. In a specific implementation, the source device may set a buffer (buffer), where the buffer may be used to store a multimedia data frame, where the multimedia data frame stored in the buffer may be a multimedia data frame obtained through the current quantization calculation, and then the source device may send the multimedia data frame stored in the buffer and a frame size corresponding to each multimedia data frame to the target device. When the target device receives the multimedia data frames stored in the buffer and the frame size corresponding to each multimedia data frame, each frame can be sequentially separated from the buffer according to the frame size. For example, the offset of the first frame in the buffer may be regarded as 0, and the first frame may be separated according to the frame size of the first frame; then, the frame size of the first frame is used as the offset of the second frame, and the second frame can be separated according to the frame size of the second frame, and so on, all the frames in the buffer can be separated.
In this embodiment, by performing vectorization calculation on a plurality of multimedia data frames, the offset of the plurality of multimedia data frames can be obtained, so as to realize reading the plurality of multimedia data frames at one time, improve the efficiency of data reading, and by sending the plurality of multimedia data frames to the target device at one time, improve the efficiency of data sending.
Fig. 5 is a schematic structural diagram of an embodiment of a frame demultiplexing device according to the present application, and as shown in fig. 5, the frame demultiplexing device 50 may include: a first obtaining module 51, a second obtaining module 52, a calculating module 53, a reading module 54 and a sending module 55;
a first obtaining module 51, configured to obtain a target file, where the target file includes a plurality of multimedia frames;
a second obtaining module 52, configured to obtain an input time;
a calculation module 53, configured to determine an optimal reading amount and a first multimedia frame based on the input time;
a reading module 54, configured to read a plurality of second multimedia frames in the target file starting from the first multimedia frame based on the optimal reading amount, where the second multimedia frames include the first multimedia frame;
a sending module 55, configured to send the plurality of second multimedia frames to the second electronic device.
In a possible implementation manner, the plurality of multimedia frames include a plurality of video frames and a plurality of audio frames, and the reading module 54 is further configured to read a plurality of second video frames in the target file starting from the first video frame based on the optimal reading amount;
or reading a plurality of second audio frames in the target file from the first audio frame based on the optimal reading amount.
In a possible implementation manner, the calculating module 53 includes: an obtaining unit 531, a counting unit 532, and a determining unit 533;
an obtaining unit 531, configured to obtain a preset number to be read;
a counting unit 532, configured to count the number of frames of all multimedia frames from the input time to the end time of the target file;
a determining unit 533, configured to set the preset number to be read as an optimal reading amount if the frame number of the multimedia frame is greater than or equal to the preset number to be read; and if the frame number of the multimedia frame is less than the preset undetermined reading number, setting the optimal reading amount to be 1.
In a possible implementation manner, the preset number of pending reads is determined by the number of bits of the vector register and the data type of the multimedia frame.
In a possible implementation manner, the reading module 54 includes: a calculation unit 541, a retrieval unit 542, a construction unit 543, an operation unit 544, and a reading unit 545;
a calculation unit 541 for determining a block offset based on the input time instant;
a retrieving unit 542, configured to obtain a frame size of each second multimedia frame based on the optimal reading amount;
a constructing unit 543 for constructing a frame matrix based on the block offsets and the frame size;
an operation unit 544, configured to perform vectorization operation on the frame matrix to obtain a frame offset vector;
the reading unit 545 is configured to read a plurality of second multimedia frames in the target file from the first multimedia frame according to the frame offset vector.
In a possible implementation manner, the sending module 55 is further configured to send a plurality of second multimedia frames and a frame size of each second multimedia frame to the second electronic device.
It should be understood that the division of each module of the frame demultiplexing apparatus shown in fig. 5 is only a division of a logic function, and all or part of the actual implementation may be integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by the processing element in software, and part of the modules can be realized in the form of hardware. For example, the computing module may be a separate processing element, or may be integrated into a chip of the electronic device. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
Fig. 6 shows a schematic structural diagram of the first electronic device 100.
The first electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the first electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the first electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the first electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the first electronic device 100, and may also be used to transmit data between the first electronic device 100 and a peripheral device. And the method can also be used for connecting a headset and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative and does not limit the structure of the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the first electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the first electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the first electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the first electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the first electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, the antenna 1 of the first electronic device 100 is coupled to the mobile communication module 150 and the antenna 2 is coupled to the wireless communication module 160 so that the first electronic device 100 can communicate with networks and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The first electronic device 100 implements the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the first electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The first electronic device 100 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the first electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the first electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The first electronic device 100 may support one or more video codecs. In this way, the first electronic device 100 can play or record video in a plurality of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU may implement applications such as intelligent recognition of the first electronic device 100, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the first electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, a phone book, etc.) created during the use of the first electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications and data processing of the first electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The first electronic device 100 can implement an audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The first electronic device 100 can listen to music through the speaker 170A or listen to a hands-free call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the first electronic device 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The first electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the first electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the first electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, implement directional recording functions, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The first electronic device 100 determines the intensity of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the first electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The first electronic device 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the first electronic device 100. In some embodiments, the angular velocity of the first electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by the gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the first electronic device 100, calculates a distance to be compensated for the lens module according to the shake angle, and allows the lens to counteract the shake of the first electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the first electronic device 100 calculates altitude, aiding positioning and navigation from the barometric pressure value measured by the barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The first electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the first electronic device 100 is a flip, the first electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the first electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the first electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The first electronic device 100 may measure the distance by infrared or laser. In some embodiments, shooting a scene, the first electronic device 100 may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The first electronic device 100 emits infrared light to the outside through the light emitting diode. The first electronic device 100 detects infrared reflected light from a nearby object using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the first electronic device 100. When insufficient reflected light is detected, the first electronic device 100 may determine that there is no object near the first electronic device 100. The first electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the first electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. The first electronic device 100 may adaptively adjust the brightness of the display screen 194 according to the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the first electronic device 100 is in a pocket, so as to prevent accidental touch.
The fingerprint sensor 180H is used to collect a fingerprint. The first electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and the like.
The temperature sensor 180J is used to detect temperature. In some embodiments, the first electronic device 100 executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the first electronic device 100 performs a performance reduction on a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the first electronic device 100 heats the battery 142 to avoid the abnormal shutdown of the first electronic device 100 caused by the low temperature. In other embodiments, when the temperature is lower than a further threshold, the first electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the first electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The first electronic device 100 may receive a key input, and generate a key signal input related to user setting and function control of the first electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the first electronic device 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The first electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The first electronic device 100 interacts with the network through the SIM card to implement functions such as a call and data communication. In some embodiments, the first electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card may be embedded in the first electronic device 100 and cannot be separated from the first electronic device 100.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and does not limit the structure of the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
It is to be understood that the first electronic device 100 and the like include corresponding hardware structures and/or software modules for performing the respective functions in order to realize the functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
In the embodiment of the present application, the first electronic device 100 and the like may be divided into functional modules according to the method example, for example, each functional module may be divided for each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or all or part of the technical solutions may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (14)
1. A frame demultiplexing method applied to a first electronic device, the method comprising:
acquiring a target file, wherein the target file comprises a plurality of multimedia frames;
acquiring input time;
determining an optimal reading amount and a first multimedia frame based on the input time;
reading a plurality of second multimedia frames in the target file from the first multimedia frames based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frames;
and sending a plurality of second multimedia frames to a second electronic device.
2. The method of claim 1, wherein the plurality of multimedia frames comprises a plurality of video frames and a plurality of audio frames, and wherein reading a plurality of second multimedia frames in the target file starting from the first multimedia frame based on the optimal reading amount comprises:
reading a plurality of second video frames in the target file from the first video frame based on the optimal reading amount;
or reading a plurality of second audio frames in the target file from the first audio frame based on the optimal reading amount.
3. The method of claim 1, wherein the determining an optimal reading amount based on the input time comprises:
acquiring a preset number to be read;
counting the number of all multimedia frames from the input time to the end time of the target file;
if the frame number of the multimedia frame is larger than or equal to the preset undetermined reading number, setting the preset undetermined reading number as the optimal reading quantity;
and if the frame number of the multimedia frame is less than the preset undetermined reading number, setting the optimal reading amount to be 1.
4. The method of claim 3, wherein the predetermined number of pending reads is determined by a number of bits in a vector register and a data type of the multimedia frame.
5. The method of claim 1, wherein reading a plurality of second multimedia frames in the target file starting from the first multimedia frame based on the optimal read amount comprises:
determining a block offset based on the input time instant;
acquiring the frame size of each second multimedia frame based on the optimal reading amount;
constructing a frame matrix based on the block offset and the frame size;
vectorizing operation is carried out on the frame matrix to obtain a frame offset vector;
reading a plurality of second multimedia frames in the target file starting from the first multimedia frame according to the frame offset vector.
6. The method of claim 1, wherein sending the plurality of second multimedia frames to a second electronic device comprises:
and sending a plurality of second multimedia frames and the frame size of each second multimedia frame to a second electronic device.
7. A first electronic device, comprising: a memory for storing computer program code, the computer program code comprising instructions that, when read from the memory by the first electronic device, cause the first electronic device to perform the steps of:
acquiring a target file, wherein the target file comprises a plurality of multimedia frames;
acquiring input time;
determining an optimal reading amount and a first multimedia frame based on the input time;
reading a plurality of second multimedia frames in the target file from the first multimedia frames based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frames;
and sending a plurality of second multimedia frames to a second electronic device.
8. The first electronic device of claim 7, wherein the plurality of multimedia frames comprises a plurality of video frames and a plurality of audio frames, and wherein the instructions, when executed by the first electronic device, cause the first electronic device to perform the step of reading a plurality of second multimedia frames in the target file starting from the first multimedia frame based on the optimal read amount comprises:
reading a plurality of second video frames in the target file from the first video frame based on the optimal reading amount;
or reading a plurality of second audio frames in the target file from the first audio frame based on the optimal reading amount.
9. The first electronic device of claim 7, wherein the instructions, when executed by the first electronic device, cause the first electronic device to perform the step of determining an optimal read volume based on the input time comprises:
acquiring a preset number to be read;
counting the number of all multimedia frames from the input time to the end time of the target file;
if the frame number of the multimedia frame is larger than or equal to the preset undetermined reading number, setting the preset undetermined reading number as the optimal reading quantity;
and if the frame number of the multimedia frame is less than the preset undetermined reading number, setting the optimal reading amount to be 1.
10. The first electronic device of claim 9, wherein the preset number of pending reads is determined by a number of bits of a vector register and a data type of the multimedia frame.
11. The first electronic device of claim 7, wherein the instructions, when executed by the first electronic device, cause the first electronic device to perform the step of reading a plurality of second multimedia frames in the target file starting from the first multimedia frame based on the optimal read amount comprises:
determining a block offset based on the input time instant;
acquiring the frame size of each second multimedia frame based on the optimal reading amount;
constructing a frame matrix based on the block offset and the frame size;
vectorizing the frame matrix to obtain a frame offset vector;
reading a plurality of second multimedia frames in the target file starting from the first multimedia frame according to the frame offset vector.
12. The first electronic device of claim 7, wherein the instructions, when executed by the first electronic device, cause the first electronic device to perform the step of transmitting a plurality of the second multimedia frames to a second electronic device comprises:
and sending a plurality of second multimedia frames and the frame size of each second multimedia frame to a second electronic device.
13. A computer readable storage medium comprising computer instructions which, when run on the first electronic device, cause the first electronic device to perform the method of frame demultiplexing according to any of claims 1-6.
14. A computer program product, which, when run on a computer, causes the computer to perform a method of frame demultiplexing according to any one of claims 1 to 6.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011240224.1A CN114466238B (en) | 2020-11-09 | 2020-11-09 | Frame demultiplexing method, electronic device and storage medium |
PCT/CN2021/126345 WO2022095752A1 (en) | 2020-11-09 | 2021-10-26 | Frame demultiplexing method, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011240224.1A CN114466238B (en) | 2020-11-09 | 2020-11-09 | Frame demultiplexing method, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114466238A true CN114466238A (en) | 2022-05-10 |
CN114466238B CN114466238B (en) | 2023-09-29 |
Family
ID=81404210
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011240224.1A Active CN114466238B (en) | 2020-11-09 | 2020-11-09 | Frame demultiplexing method, electronic device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114466238B (en) |
WO (1) | WO2022095752A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116721678B (en) * | 2022-09-29 | 2024-07-05 | 荣耀终端有限公司 | Audio data monitoring method, electronic equipment and medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004036926A2 (en) * | 2002-10-18 | 2004-04-29 | Global Epoint, Inc. | Video and telemetry apparatus and methods |
EP2530948A1 (en) * | 2011-06-03 | 2012-12-05 | Samsung Electronics Co., Ltd. | Method and device for demultiplexing audio & video data of multimedia file |
CN104602004A (en) * | 2010-08-17 | 2015-05-06 | M&K控股株式会社 | method for decoding intra predictions |
US20170064344A1 (en) * | 2015-08-31 | 2017-03-02 | Gopro, Inc. | Video encoding for reduced streaming latency |
CN106686445A (en) * | 2015-11-05 | 2017-05-17 | 北京中广上洋科技股份有限公司 | Method of carrying out on-demand jump on multimedia file |
CN108184163A (en) * | 2017-12-29 | 2018-06-19 | 深圳华侨城卡乐技术有限公司 | A kind of video broadcasting method, storage medium and player |
CN111291610A (en) * | 2019-12-12 | 2020-06-16 | 深信服科技股份有限公司 | Video detection method, device, equipment and computer readable storage medium |
CN111526314A (en) * | 2020-04-24 | 2020-08-11 | 华为技术有限公司 | Video shooting method and electronic equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3076676B1 (en) * | 2013-12-01 | 2019-05-01 | Lg Electronics Inc. | Method and device for transmitting and receiving broadcast signal for providing trick play service |
US10171843B2 (en) * | 2017-01-19 | 2019-01-01 | International Business Machines Corporation | Video segment manager |
CN109936763B (en) * | 2017-12-15 | 2022-07-01 | 腾讯科技(深圳)有限公司 | Video processing and publishing method |
CN111741338A (en) * | 2020-07-22 | 2020-10-02 | 深圳力维智联技术有限公司 | HLS streaming media playing method, system, equipment and storage medium |
-
2020
- 2020-11-09 CN CN202011240224.1A patent/CN114466238B/en active Active
-
2021
- 2021-10-26 WO PCT/CN2021/126345 patent/WO2022095752A1/en active Application Filing
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004036926A2 (en) * | 2002-10-18 | 2004-04-29 | Global Epoint, Inc. | Video and telemetry apparatus and methods |
CN104602004A (en) * | 2010-08-17 | 2015-05-06 | M&K控股株式会社 | method for decoding intra predictions |
EP2530948A1 (en) * | 2011-06-03 | 2012-12-05 | Samsung Electronics Co., Ltd. | Method and device for demultiplexing audio & video data of multimedia file |
US20170064344A1 (en) * | 2015-08-31 | 2017-03-02 | Gopro, Inc. | Video encoding for reduced streaming latency |
CN106686445A (en) * | 2015-11-05 | 2017-05-17 | 北京中广上洋科技股份有限公司 | Method of carrying out on-demand jump on multimedia file |
CN108184163A (en) * | 2017-12-29 | 2018-06-19 | 深圳华侨城卡乐技术有限公司 | A kind of video broadcasting method, storage medium and player |
CN111291610A (en) * | 2019-12-12 | 2020-06-16 | 深信服科技股份有限公司 | Video detection method, device, equipment and computer readable storage medium |
CN111526314A (en) * | 2020-04-24 | 2020-08-11 | 华为技术有限公司 | Video shooting method and electronic equipment |
Non-Patent Citations (2)
Title |
---|
杨欣;张白愚;黄焱;杨莉芸;: "基于BDA的卫星数字电视视频存储系统优化方案", 信息工程大学学报, no. 02 * |
王国中, 赵海武, 顾君忠: "MPEG-2到AVS视频转码器的实现", 计算机工程, no. 19 * |
Also Published As
Publication number | Publication date |
---|---|
CN114466238B (en) | 2023-09-29 |
WO2022095752A1 (en) | 2022-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110347269B (en) | Empty mouse mode realization method and related equipment | |
CN111552451A (en) | Display control method and device, computer readable medium and terminal equipment | |
WO2022022319A1 (en) | Image processing method, electronic device, image processing system and chip system | |
CN114422340A (en) | Log reporting method, electronic device and storage medium | |
CN114610193A (en) | Content sharing method, electronic device, and storage medium | |
CN112651510A (en) | Model updating method, working node and model updating system | |
CN113126948A (en) | Audio playing method and related equipment | |
CN113467735A (en) | Image adjusting method, electronic device and storage medium | |
CN115714890A (en) | Power supply circuit and electronic device | |
CN114880251A (en) | Access method and access device of storage unit and terminal equipment | |
CN114490174A (en) | File system detection method, electronic device and computer readable storage medium | |
CN113438643B (en) | Terminal capability reporting system, method, electronic equipment and storage medium | |
CN112037157B (en) | Data processing method and device, computer readable medium and electronic equipment | |
CN110806994B (en) | Signal transmission method and device | |
CN114661258A (en) | Adaptive display method, electronic device, and storage medium | |
CN114554012A (en) | Incoming call answering method, electronic equipment and storage medium | |
CN109285563B (en) | Voice data processing method and device in online translation process | |
CN114095602A (en) | Index display method, electronic device and computer-readable storage medium | |
CN113542574A (en) | Shooting preview method under zooming, terminal, storage medium and electronic equipment | |
CN114466238B (en) | Frame demultiplexing method, electronic device and storage medium | |
CN113518189A (en) | Shooting method, shooting system, electronic equipment and storage medium | |
CN113129916A (en) | Audio acquisition method, system and related device | |
CN113901485B (en) | Application program loading method, electronic device and storage medium | |
WO2022033344A1 (en) | Video stabilization method, and terminal device and computer-readable storage medium | |
CN114554037B (en) | Data transmission method and electronic equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |