CN114466238B - Frame demultiplexing method, electronic device and storage medium - Google Patents

Frame demultiplexing method, electronic device and storage medium Download PDF

Info

Publication number
CN114466238B
CN114466238B CN202011240224.1A CN202011240224A CN114466238B CN 114466238 B CN114466238 B CN 114466238B CN 202011240224 A CN202011240224 A CN 202011240224A CN 114466238 B CN114466238 B CN 114466238B
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.)
Active
Application number
CN202011240224.1A
Other languages
Chinese (zh)
Other versions
CN114466238A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011240224.1A priority Critical patent/CN114466238B/en
Priority to PCT/CN2021/126345 priority patent/WO2022095752A1/en
Publication of CN114466238A publication Critical patent/CN114466238A/en
Application granted granted Critical
Publication of CN114466238B publication Critical patent/CN114466238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/434Disassembling 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/439Processing of audio elementary streams

Abstract

The embodiment of the application provides a frame demultiplexing method, electronic equipment and a storage medium, and relates to the technical field of multimedia, wherein 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 frame based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frame; and transmitting a plurality of the second multimedia frames to a second electronic device. The method provided by the embodiment of the application can improve the computing capacity and the reading capacity of the audio frames and the video frames, thereby improving the transmission quantity of the audio frames and the video frames and further improving the transmission efficiency of the audio frames and the video frames.

Description

Frame demultiplexing method, electronic device and storage medium
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 devices are becoming more and more abundant, and users can use the electronic devices to search for and play various multimedia resources. With the continuous development of network technology, the application of distributed networks is becoming more and more widespread, 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 the demultiplexed audio data and video data to a target device.
Disclosure of Invention
The embodiment of the application provides a frame demultiplexing method, electronic equipment and a storage medium, which are used for providing a demultiplexing calculation mode for audio frames and video frames, and improving the calculation capability and the reading capability for the audio frames and the video frames, so that the transmission quantity of the audio frames and the video frames can be improved, and the transmission 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 method for frame demultiplexing, including:
acquiring a target file, wherein the target file comprises a plurality of multimedia frames; in particular, the object file may be a multimedia file, for example, a piece of video. The multimedia frames may include audio frames and video frames.
Acquiring input time; in particular, the input time may include a time of user input, for example, a time when the user is specified to fast forward or fast reverse. The input time may be any time when the multimedia video is played in sequence, which 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 multimedia frames that can be read at this time. The first multimedia frame corresponds to the input instant.
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; specifically, the plurality of second multimedia frames may be a plurality of data frames including the above-described first multimedia frame. For example, assuming that the optimum read amount is 4, if the frame number of the first multimedia frame is 1001, 4 frames, that is, 4 frames of 1001, 1002, 1003, and 1004 are read from 1001.
A plurality of second multimedia frames is transmitted to the second electronic device.
In one possible implementation, the plurality of multimedia frames includes a plurality of video frames and a plurality of audio frames, and based on the optimal reading amount, reading the plurality of second multimedia frames in the target file from the first multimedia frame includes:
reading a plurality of second video frames in the target file starting 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 based on the optimal reading amount, starting from the first audio frame, reading a plurality of second audio frames in the target file; 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 of to-be-determined reads; specifically, the preset number of readouts may be a tentative optimal number of readouts.
Counting the number of frames 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, the frame number is 1-1000, that is, the frame number corresponding to the start time of the target file is 1, the frame number corresponding to the end time of the target file is 1000, and if the frame number corresponding to the input time is 490, the remaining frame number is 1000-490=510, that is, the frame number of all multimedia frames from the input time to the end time of the target file is 510.
If the frame number of the multimedia frames is greater than or equal to the preset number of the to-be-read, setting the preset number of the to-be-read as the optimal reading amount; for example, assuming that the preset number of reads to be set to 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 number of reads may be set to 4, that is, 4 frames are read this time.
If the frame number of the multimedia frames is smaller than the preset read number to be set, setting the optimal read quantity 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 number of all multimedia frames from the input time to the end time of the target file is 1000-998=2, and 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 preset 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, based on the optimal reading amount, reading the plurality of second multimedia frames in the target file from the first multimedia frame includes:
determining a block offset based on the input time;
acquiring a 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;
performing vectorization operation on the frame matrix to obtain a frame offset vector;
and 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, transmitting the plurality of second multimedia frames to the second electronic device includes:
and transmitting the plurality of second multimedia frames and the frame size of each second multimedia frame to the second electronic device. It is thereby possible to facilitate the target device to separate out each second multimedia frame based on the frame size of each second multimedia frame.
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, wherein the target file comprises a plurality of multimedia frames;
the second acquisition module is used for acquiring the input moment;
the computing module is used for determining the optimal reading quantity and the first multimedia frame based on the input moment;
a reading module 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 include 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 from the first video frame based on the optimal reading amount;
Or based on the optimal reading amount, starting from the first audio frame, reading a plurality of second audio frames in the target file.
In one possible implementation manner, the calculating module includes:
the acquisition unit is used for acquiring a preset number of to-be-determined reads;
a statistics unit for counting the number of frames of all multimedia frames from the input time to the end time of the target file;
a determining unit, configured to set the preset number of to-be-read as an optimal reading amount if the number of frames of the multimedia frame is greater than or equal to the preset number of to-be-read; if the number of frames of the multimedia frame is smaller than the preset number of to-be-read, the optimal reading amount is set to be 1.
In one possible implementation manner, the preset number of 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;
a retrieval unit for acquiring a frame size of each second multimedia frame based on the optimal reading amount;
a construction unit configured to construct 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 frames 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 a 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 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 frame based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frame;
a plurality of second multimedia frames is transmitted to the second electronic device.
In one possible implementation, the instructions, when executed by the first electronic device, cause the first electronic device to perform reading, based on an optimal reading amount, a plurality of second multimedia frames in the target file from the first multimedia frame, where the plurality of multimedia frames include:
Reading a plurality of second video frames in the target file starting from the first video frame based on the optimal reading amount;
or based on the optimal reading amount, starting from the first audio frame, reading a plurality of second audio frames in the target file.
In one possible implementation manner, the step of causing the first electronic device to perform determining the optimal reading amount based on the input time when the instruction is executed by the first electronic device includes:
acquiring a preset number of to-be-determined reads;
counting the number of frames of all multimedia frames from the input time to the end time of the target file;
if the frame number of the multimedia frames is greater than or equal to the preset number of the to-be-read, setting the preset number of the to-be-read as the optimal reading amount;
if the number of frames of the multimedia frame is smaller than the preset number of to-be-read, the optimal reading amount is set to be 1.
In one possible implementation manner, the preset number of 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 step of reading the plurality of second multimedia frames in the target file from the first multimedia frame based on the optimal reading amount when the instruction is executed by the first electronic device includes:
Determining a block offset based on the input time;
acquiring a 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;
performing vectorization operation on the frame matrix to obtain a frame offset vector;
and 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 step of causing the first electronic device to perform sending the plurality of second multimedia frames to the second electronic device when the instruction is executed by the first electronic device includes:
and transmitting the plurality of second multimedia frames and the frame size of each second multimedia frame to the second electronic device.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having a computer program stored therein, which when run on a computer causes the computer to perform the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer program for performing the method of the first aspect when the computer program is executed by a computer.
In one 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 flow chart of a frame demultiplexing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a frame matrix according to an embodiment of the present application;
FIG. 4 is a schematic 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 accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
One of the core functions of the multimedia distributed technology is to demultiplex multimedia data from a source device and transmit the demultiplexed audio data and video data to a target device.
Fig. 1 is a flow chart of a source device transmitting multimedia data to a target device, where the source device may de-multiplex the multimedia file, thereby obtaining audio data and video data, respectively, as shown in fig. 1; then, the audio data and the video data can be read separately, and only one frame of data can be read at a time, so that only a single audio frame and a single video frame can be obtained at a time, for example, only one frame of audio data can be obtained at a time when the audio data is read, and only one frame of video data can be obtained at a time when the video data is read. The source device then transmits the video frames and the audio frames to the target device via the transmission module, wherein only one frame of data can be transmitted at a time, e.g., 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 at a time (e.g., one frame of audio or one frame of video). Therefore, the source device needs enough time to send a certain amount of audio data and video data to the target device so that the target device plays, thereby causing time delay to play the audio data and the video data of the target device and reducing the audio-visual experience of the user. In addition, the source device can only transmit one frame of data at a time when transmitting multimedia data, and the transmission efficiency of the data is low.
Based on the above problems, the embodiment of the application provides a frame demultiplexing method, which can read a plurality of multimedia data frames at a time in a source device, improve the reading efficiency of data, and send a plurality of multimedia data frames at a time through the source device, improve the sending efficiency of data, further reduce the playing time delay of a target device to multimedia data, and improve the audiovisual experience of a user.
Taking an MP4 format multimedia file as an example, a frame demultiplexing method according to an embodiment of the present application will be described with reference to fig. 2 to 4,
fig. 2 is a schematic flow chart of an embodiment of a frame demultiplexing method according to an embodiment of the present application, where the method includes:
step 101, a target multimedia file is acquired in a source device.
Specifically, the source device may be a first electronic device that plays a multimedia file, for example, a mobile phone, a tablet, a computer, or other types of first electronic devices, which is not limited in particular by the present application. The multimedia file may include multimedia data frames, which may include audio data frames and video data frames. It can be understood that in the embodiment of the present application, the MP4 format multimedia file is taken as an example, but the embodiment of the present application is not limited to the format of the multimedia file.
The storage of the MP4 format audio data frames and video data frames in the multimedia file may be realized by a table index method. 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. The timing to frame index table is shown in table 1.
TABLE 1
Sequence number Number of frames Frame duration
1 1 42
2 1 41
3 2 42
4 1 41
Through the index relation in the table 1, the corresponding frame number can be obtained by searching at any time input by the user. For example, assuming that the time input by the user is 200, the frame number of the sequence number 1 is 1, the frame duration is 42, the frame number of the sequence number 2 is 1, the frame duration is 41, the frame number of the sequence number 3 is 2, the frame duration is 42, the frame number of the sequence number 4 is 1, and the frame duration is 41, 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.
A frame-to-block index table is shown in table 2. Wherein each block may contain one or more frames. The length of each block may be different, as may the length of the frames within a block.
TABLE 2
Sequence number Block number Frame number 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 specified frame can be found from the frame number of the specified frame, so that the specified frame can be found from the block. For example, assume that the designated frame is the 500 th frame, and the block set of sequence number 1 contains 28×13=364 frames, wherein the block set may include one or more blocks, and the block set of sequence number 1 contains 28 blocks with block numbers of 1-28, respectively; the block set with the sequence number of 2 comprises 1 x 12 = 12 frames, wherein the block set with the sequence number of 2 comprises 1 block, and the block number is 29; the block set with the sequence number of 3 comprises 28 x 13 = 364 frames, wherein the block set with the sequence number of 3 comprises 28 blocks, and the block numbers are respectively 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 sets of blocks, but less than the total number of frames of the first 3 sets of blocks, 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 frame number of the first 38 blocks but less than the total frame number of the first 39 blocks, the 500 th frame is located in the block with the block number of 39. And 500=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.
The block offset index table is shown in table 3. Wherein the block offset is used to identify the location of each block in the multimedia file.
TABLE 3 Table 3
Block number Block offset
1 $00039D28
2 $0003D19B
3 $0003F50D
4 $00041B22
By the index relation in the above table 3, the block offset corresponding to the specified block can be found from the sequence number of the specified block.
The frame size index table is shown in table 4.
TABLE 4 Table 4
Frame number Frame size
1 $000000ae
2 $0000001e
3 $000015cc
4 $0000001e
By the index relation in the above table 4, the frame size corresponding to the specified frame can be found from the frame number of the specified frame.
As can be seen from the above tables 1 to 4, after a user inputs a moment at will, the corresponding block offset and frame size can be obtained by looking up the table 1 to 4, and further the corresponding frame offset can be obtained, so that fast forward and fast backward can be realized when the multimedia file is played. With the 500 th frame example described above, 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 a lookup of table 3. 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, the size of the frames 494-499 can be found by table 4. Thus, the offset of frame 494 to frame 500 may be derived from the offset of block 39 and the size of frame 494 to frame 499, respectively, e.g., the offset of frame 494 may be derived from the offset of block 39 because frame 494 is the first frame of block 39. While the offset of frame 495 can be obtained by the offset of block 39 and the frame size of frame 494. The offset of frame 496 may be obtained by the offset of block 39, the frame size of frame 494, and the frame size of frame 495, and so on. Wherein the offset of frames 494-500 may be the play address of the data frame, thereby enabling fast forward and fast reverse.
Step 102, acquiring input time.
Specifically, the input time may be any time input by the user, for example, the user may click on any time on the playing progress bar of the multimedia file to realize fast forward or fast backward; or a preset time, which is not particularly limited in the embodiment of the present application.
Step 103, determining the current best reading amount based on the input time.
Specifically, the optimal reading amount is used to identify the number of frames of the multimedia data that can be read at this time, for example, n frames of audio data can be read at a time or n frames of video data can be read at a time, where n is the optimal reading amount.
In a specific implementation, the reading radix m may be determined by the number of bits of the register and the data type of the multimedia data frame. Wherein the reading radix m is used to identify the number of reads in units of blocks. Illustratively, if a NEON instruction set is employed, the NEON is a 128-bit single instruction multiple data instruction set (Single Instruction Multiple Data, SIMD) of 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 bits, the reading radix 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=128/32=4.
It will be appreciated that other types of instruction sets may be used, and different data types may be selected in the multimedia data frame, so that the reading base m may also be different values, for example, 2, 8, 16, etc., which is not particularly limited in the embodiment of the present application.
Further, after the reading base m is determined, the current optimum reading amount may be determined according to the reading base m. In specific implementation, the reading base m may be multiplied by a preset multiple, so as to obtain a pending reading amount, then the pending reading amount may be compared with a total frame number to be read in the target multimedia file, and if the total frame number to be read is greater than or equal to the pending reading amount, the pending reading amount may be set as a current optimal reading amount; for example, assuming that m=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 smaller than the predetermined read amount, the current optimal read amount may be set to 1, and in an exemplary case, if m=4, the predetermined multiple is 4, the predetermined read amount is 16, and if the total frame number to be read is smaller than 16, the current optimal read amount may be set to 1, that is, only 1 frame is read this time.
Step 104, determining a block offset based on the input time.
Specifically, when the input time is obtained, the block offset may also be determined according to the input time. In specific implementation, a 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 table 2 to determine the block number corresponding to the input time; and from this block number, a query is made in table 3, a block offset can be determined.
Step 105, determining the frame number based on the current optimal reading amount, and obtaining the corresponding frame size according to the frame number.
Specifically, after the current optimal reading amount is determined, the number of frames read at this time may be determined. For example, if the current optimal reading amount is 4, the number of frames read at this time is 4. Next, the frame size of each frame of the frame read this time can be obtained by sequentially searching in table 4 according to the frame number corresponding to the input time and the frame number read this time, and for example, if 4 frames are read this time, the frame sizes of the above 4 frames can be obtained.
And 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 also be constructed according to the block offset and the frame size. Wherein 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 quantity, and the number of columns of the matrix corresponds to the optimal read quantity. For example, if the optimal read amount is 4, the frame matrix may be a matrix of 4*4; if the optimal reading amount is 8, the frame matrix may be an 8×8 matrix, which is not particularly limited in the embodiment of the present application.
In the following description, the optimum read amount is 4, that is, 4 frames are read this time, and thus a frame matrix of 4*4 can be constructed. As shown in fig. 3, a frame matrix of 4*4 is shown, in which the first row of data is (block offset, 0), the second row of data is (block offset, first frame size, 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, vectorizing the frame matrix to obtain a frame offset vector.
Specifically, after the frame matrix is obtained, vectorization calculation may be further performed on the frame matrix, so that a frame offset vector may be obtained. The vectorization calculation may be to add up 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, the column vectors shown in fig. 4 can be obtained by performing an accumulated summation on 4 columns in the frame matrix, where the column vectors may be frame offset vectors. The data of each row in the column vector corresponds to the offset of each frame, e.g., the value of the first row in the column vector is a block offset value that corresponds to the offset of the first frame; the value of the second row in the column vector is a block offset value plus the first frame size, the value of the block offset value plus the first frame size corresponding to the offset of the second frame; the third row value in the column vector is a block offset value + a first frame size + a second frame size, the block offset value + the first frame size + the second frame size value corresponding to the offset of the third frame; the fourth row in the column vector has a value of block offset value + first frame size + second frame size + third frame size, which corresponds to the offset of the fourth frame.
Step 108, obtaining the multimedia data frame in the target multimedia file according to the frame offset vector, and transmitting the multimedia data frame to the target device.
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 vector, 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 vector, and may be transmitted to the target device. It can be appreciated that, since the frame offset vector may be an audio frame offset vector or a video frame offset vector, each time a video data frame or an audio data frame is acquired, and the embodiment of the present application is not limited thereto.
Optionally, when the source device sends the above multimedia data frames to the target device, the frame size of each multimedia data frame may also be sent to the target device, so that the target device separates each multimedia data frame, and thus may decode and play each multimedia data frame. In a specific implementation, the source device may set a buffer, where the buffer may be used to store multimedia data frames, where the multimedia data frames stored in the buffer may be multimedia data frames obtained after the vectorization calculation, and then the source device may send the multimedia data frames stored in the buffer and a frame size corresponding to each multimedia data frame to the target device. After receiving the multimedia data frames stored in the buffer and the frame sizes corresponding to each of the multimedia data frames, the target device may separate each frame from the buffer in turn according to the frame sizes. Illustratively, the offset of the first frame in the buffer may be considered as 0, and the first frame may be separated according to its frame size; then, the frame size of the first frame is used as the offset of the second frame, the second frame can be separated according to the frame size of the second frame, and the like, all frames in the buffer can be separated.
In this embodiment, the vectorization calculation is performed on the multiple multimedia data frames, so that the offset of the multiple multimedia data frames can be obtained, so that the multiple multimedia data frames can be read at one time, the efficiency of data reading is improved, and the multiple multimedia data frames can be sent to the target device at one time, so that the sending efficiency of the data can be improved.
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: the first acquisition module 51, the second acquisition module 52, the calculation module 53, the reading module 54 and the 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 for determining 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 from the first multimedia frame based on the optimal reading amount, where the second multimedia frames include the first multimedia frame;
a transmitting module 55, configured to transmit the plurality of second multimedia frames to the second electronic device.
In one possible implementation, the plurality of multimedia frames includes 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 from the first video frame based on the optimal reading amount;
or based on the optimal reading amount, starting from the first audio frame, reading a plurality of second audio frames in the target file.
In one possible implementation, the computing module 53 includes: an acquisition unit 531, a statistics unit 532, and a determination unit 533;
an obtaining unit 531, configured to obtain a preset number of to-be-determined reads;
a statistics unit 532 for counting 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 of to-be-read as the optimal reading amount if the number of frames of the multimedia frame is greater than or equal to the preset number of to-be-read; if the number of frames of the multimedia frame is smaller than the preset number of to-be-read, the optimal reading amount is set to be 1.
In one possible implementation, the predetermined number of 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, the reading module 54 includes: a calculation unit 541, a search 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 timing;
a retrieving unit 542 for acquiring a frame size of each second multimedia frame based on the optimal reading amount;
a construction unit 543 for constructing a frame matrix based on the block offset 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 one possible implementation, the sending module 55 is further configured to send the 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 the respective modules of the frame demultiplexing device shown in fig. 5 is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; it is also possible that part of the modules are implemented in the form of software called by the processing element and part of the modules are implemented in the form of hardware. For example, the computing module may be a separately established processing element or may be implemented integrated in a chip of the electronic device. The implementation of the other modules is similar. In addition, all or part of the modules can be integrated together or can be independently implemented. 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 a software form.
For example, the modules above may be one or more integrated circuits configured to implement the methods above, such as: one or more specific integrated circuits (Application Specific Integrated Circuit; hereinafter ASIC), or one or more microprocessors (Digital Singnal Processor; hereinafter DSP), or one or more field programmable gate arrays (Field Programmable Gate Array; hereinafter FPGA), etc. For another example, the 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 (universal serial bus, USB) interface 130, a charge 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity 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 should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100. In other embodiments of the application, the first electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the 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 the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the first electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain 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 transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through 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 to implement a function of answering a call through the 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 for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically 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 an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of first electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display functionality of the first electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or 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, an MIPI interface, etc.
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, or may be used to transfer data between the first electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present application is only illustrative, and is not limited to the structure of the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive 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 for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power 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 configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge 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 may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into 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 for wireless communication including 2G/3G/4G/5G, etc. applied on the first electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. 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 the 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 transmits the demodulated low frequency baseband signal to the 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 sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images 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 module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied on the first electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the 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, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of first electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that first electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The first electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantumdot light emitting diodes, 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 an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize 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 the 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 onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. 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 other digital signals besides digital image signals. For example, when the first electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The first electronic device 100 may support one or more video codecs. Thus, the first electronic device 100 may play or record video in multiple encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of the first electronic device 100 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the first electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the first electronic device 100 (e.g., audio data, phonebook, etc.), and so on. 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 (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the first electronic device 100 and data processing 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 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. 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 a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The first electronic device 100 may listen to music, or to hands-free calls, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When the first electronic device 100 is answering a telephone call or voice message, voice can be received by placing the receiver 170B close to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to 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, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the first electronic device 100 may further be provided with three, four or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may 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 is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The first electronic device 100 determines the intensity of the pressure according to the change of the capacitance. When a touch operation is applied to the display 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 position of the touch from the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture 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 gyro 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 the shake angle of the first electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the first electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the first electronic device 100 calculates altitude from barometric pressure values measured by the barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The first electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the first electronic device 100 is a flip machine, 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 detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are 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 electronic equipment gesture recognition method can also be used for recognizing the gesture 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, the first electronic device 100 may range using the distance sensor 180F 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 outward through the light emitting diode. The first electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the first electronic device 100. When insufficient reflected light is detected, the first electronic device 100 may determine that there is no object in the vicinity of the first electronic device 100. The first electronic device 100 can detect that the user holds the first electronic device 100 close to the ear to talk by using the proximity light sensor 180G, so as to automatically extinguish the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The first electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. 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 to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The first electronic device 100 may utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call by the fingerprint, and so on.
The temperature sensor 180J is for detecting temperature. In some embodiments, the first electronic device 100 performs 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 reduction in the performance of a processor located in the vicinity of the temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the first electronic device 100 heats the battery 142 to avoid the low temperature causing the first electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the first electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as 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 for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the first electronic device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The first electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the first electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195 or removed from the SIM card interface 195 to enable contact and separation with the first electronic device 100. The first electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. 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 communication and data communication. In some embodiments, the first electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the first electronic device 100 and cannot be separated from the first electronic device 100.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present application is only illustrative, and is not limited to the structure of the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
It should be understood that, in order to implement the above-mentioned functions, the first electronic device 100 and the like include corresponding hardware structures and/or software modules that perform the respective 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 implemented as hardware or computer software driven 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 embodiments of the present application.
The embodiment of the present application may divide the functional modules of the first electronic device 100 or the like according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The functional units in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic or optical disk, and the like.
The foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, but any changes or substitutions within the technical scope of the present application 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 (13)

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 frame based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frame;
transmitting a plurality of the second multimedia frames to a second electronic device;
the determining an optimal reading based on the input time includes:
acquiring a preset number of to-be-determined reads;
counting the number of frames of all multimedia frames from the input time to the end time of the target file;
and if the frame number of the multimedia frame is greater than or equal to the preset read number, setting the preset read number as the optimal read amount.
2. The method of claim 1, wherein the plurality of multimedia frames comprises a plurality of video frames and a plurality of audio frames, wherein the reading the plurality of second multimedia frames in the target file from the first multimedia frame based on the optimal read amount comprises:
reading a plurality of second video frames in the target file starting from a first video frame based on the optimal reading amount;
or based on the optimal reading amount, starting from the first audio frame, reading a plurality of second audio frames in the target file.
3. The method of claim 1, wherein the optimal read amount is set to 1 if the number of frames of the multimedia frame is less than the preset number of readouts to be determined.
4. A method according to claim 3, wherein the predetermined number of pending reads is determined by the number of bits of a vector register and the data type of the multimedia frame.
5. The method of claim 1, wherein the reading a plurality of second multimedia frames in the target file from the first multimedia frame based on the optimal read amount comprises:
determining a block offset based on the input time instant;
Acquiring a frame size of each of the second multimedia frames based on the optimal read amount;
constructing a frame matrix based on the block offset and the frame size;
performing vectorization operation on the frame matrix to obtain a frame offset vector;
and reading a plurality of second multimedia frames in the target file from the first multimedia frame according to the frame offset vector.
6. The method of claim 1, wherein said transmitting a plurality of said second multimedia frames to a second electronic device comprises:
and transmitting 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 frame based on the optimal reading amount, wherein the second multimedia frames comprise the first multimedia frame;
Transmitting a plurality of the second multimedia frames to a second electronic device;
the determining an optimal reading based on the input time includes:
acquiring a preset number of to-be-determined reads;
counting the number of frames of all multimedia frames from the input time to the end time of the target file;
and if the frame number of the multimedia frame is greater than or equal to the preset read number, setting the preset read number as the optimal read amount.
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, the instructions, when executed by the first electronic device, cause the first electronic device to perform reading a plurality of second multimedia frames in the target file from the first multimedia frame based on the optimal read amount, comprising:
reading a plurality of second video frames in the target file starting from a first video frame based on the optimal reading amount;
or based on the optimal reading amount, starting from the first audio frame, reading a plurality of second audio frames in the target file.
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 reading amount based on the input time instant comprises:
And if the frame number of the multimedia frame is smaller than the preset read number to be set, setting the optimal read quantity to be 1.
10. The first electronic device of claim 9, wherein the predetermined number of reads to be determined 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, comprise:
determining a block offset based on the input time instant;
acquiring a frame size of each of the second multimedia frames based on the optimal read amount;
constructing a frame matrix based on the block offset and the frame size;
performing vectorization operation on the frame matrix to obtain a frame offset vector;
and reading a plurality of second multimedia frames in the target file 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, comprise:
And transmitting 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.
CN202011240224.1A 2020-11-09 2020-11-09 Frame demultiplexing method, electronic device and storage medium Active CN114466238B (en)

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 CN114466238A (en) 2022-05-10
CN114466238B true 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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721678A (en) * 2022-09-29 2023-09-08 荣耀终端有限公司 Audio data monitoring method, electronic equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
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
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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MX343061B (en) * 2013-12-01 2016-10-21 Lg Electronics Inc Method and device for transmitting and receiving broadcast signal for providing trick play service.
US9894393B2 (en) * 2015-08-31 2018-02-13 Gopro, Inc. Video encoding for reduced streaming latency
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
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
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)

* Cited by examiner, † Cited by third party
Title
杨欣 ; 张白愚 ; 黄焱 ; 杨莉芸 ; .基于BDA的卫星数字电视视频存储系统优化方案.信息工程大学学报.2013,(02),全文. *
王国中,赵海武,顾君忠.MPEG-2到AVS视频转码器的实现.计算机工程.2006,(19),全文. *

Also Published As

Publication number Publication date
WO2022095752A1 (en) 2022-05-12
CN114466238A (en) 2022-05-10

Similar Documents

Publication Publication Date Title
CN111552451B (en) Display control method and device, computer readable medium and terminal equipment
CN114422340B (en) Log reporting method, electronic equipment and storage medium
CN114880251B (en) Memory cell access method, memory cell access device and terminal equipment
CN114490174B (en) File system detection method, electronic device and computer readable storage medium
CN113438643A (en) Terminal capability reporting system, method, electronic equipment and storage medium
CN113126948B (en) Audio playing method and related equipment
CN114466238B (en) Frame demultiplexing method, electronic device and storage medium
CN114610193A (en) Content sharing method, electronic device, and storage medium
CN115665632B (en) Audio circuit, related device and control method
CN115412678B (en) Exposure processing method and device and electronic equipment
CN112099741A (en) Display screen position identification method, electronic device and computer readable storage medium
CN114005016A (en) Image processing method, electronic equipment, image processing system and chip system
CN109285563B (en) Voice data processing method and device in online translation process
CN113901485B (en) Application program loading method, electronic device and storage medium
CN114554012B (en) Incoming call answering method, electronic equipment and storage medium
CN116055859A (en) Image processing method and electronic device
CN110806994B (en) Signal transmission method and device
CN113709464A (en) Video coding method and related device
CN113674258A (en) Image processing method and related equipment
CN114520870B (en) Display method and terminal
CN115993592B (en) Bluetooth ranging method, electronic equipment and storage medium
CN113364067B (en) Charging precision calibration method and electronic equipment
CN116048769B (en) Memory recycling method and device and terminal equipment
CN115696067B (en) Image processing method for terminal, terminal device and computer readable storage medium
CN117593236A (en) Image display method and device and terminal 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