WO2024000463A1 - Video processing method and apparatus and computer readable storage medium - Google Patents

Video processing method and apparatus and computer readable storage medium Download PDF

Info

Publication number
WO2024000463A1
WO2024000463A1 PCT/CN2022/102965 CN2022102965W WO2024000463A1 WO 2024000463 A1 WO2024000463 A1 WO 2024000463A1 CN 2022102965 W CN2022102965 W CN 2022102965W WO 2024000463 A1 WO2024000463 A1 WO 2024000463A1
Authority
WO
WIPO (PCT)
Prior art keywords
image frame
chip memory
video
code stream
referenced
Prior art date
Application number
PCT/CN2022/102965
Other languages
French (fr)
Chinese (zh)
Inventor
雷涛
向前
石洁珂
李宗岩
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2022/102965 priority Critical patent/WO2024000463A1/en
Publication of WO2024000463A1 publication Critical patent/WO2024000463A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Definitions

  • the present disclosure relates to the technical field of video processing, and more specifically to a method, device, and computer-readable storage medium for processing video.
  • terminal devices Due to limitations in terminal device size and battery technology, terminal devices have very strict requirements on power consumption and battery life. Watching videos for a long time will cause the smart terminal device to consume too much power and shorten the battery life, which will cause great anxiety to users. Therefore, how to reduce the power consumption of video playback services and improve the battery life of terminal equipment is a key technical issue to improve the user experience of using smart terminal equipment.
  • embodiments of the present disclosure provide a method, device, and computer-readable storage medium for processing video.
  • a method of processing video includes: parsing the code stream of the video to determine information indicating whether at least one image frame is referenced by a subsequent image frame; when the information indicates that at least one image frame is not referenced by a subsequent image frame, decoding the code stream to obtain at least one an image frame; and transmitting at least one image frame to a display module to display at least one image frame without storing the at least one image frame to an off-chip memory.
  • image frames are processed differently by determining whether the image frame being processed will be referenced by subsequent image frames.
  • Image frames that will not be referenced by subsequent image frames can be directly processed online. Transmitted to the display module without having to pass through an off-chip memory that has slower reading and writing speeds and higher power consumption, thus reducing the power consumption of the terminal device.
  • the method further includes: when the information indicates that at least one image frame is referenced by a subsequent image frame, decoding the code stream to obtain at least one image frame; transmitting at least one image frame to an off-chip memory; and reading at least one image frame from the off-chip memory to the display module to display at least one image frame.
  • the method when the information indicates that the at least one image frame is not referenced by the subsequent image frame, the method further includes: pre-processing the image frame and audio before decoding the code stream. Synchronize. In this way, poor user experience due to out-of-sync audio and video can be avoided.
  • At least one image frame is stored in on-chip memory without the need to store at least one image frame in off-chip memory. In this way, through on-chip memory, diameter transmission of video data can be achieved.
  • the image frames are stored in the on-chip memory in the form of blocks or strips. Since the space of on-chip memory is relatively limited, in this way, the space requirements for on-chip memory can be reduced.
  • the method further includes: after storing the image frame to the off-chip memory, synchronizing the image frame and the audio. In this way, the user's viewing experience can be improved.
  • an apparatus for processing video includes a video decoding module, a display module and a central processing unit, wherein the central processing unit is configured to implement the following operations: parse the video code stream and determine information indicating whether at least one image frame is referenced by a subsequent image frame; when the information Indicates that at least one image frame is not referenced by subsequent image frames, decoding the code stream to obtain at least one image frame; and transmitting at least one image frame to the display without storing the at least one image frame to an off-chip memory. module to display at least one image frame.
  • the device further includes an off-chip memory, wherein the central processing unit is configured to implement the following operations: when the information indicates that at least one image frame is referenced by a subsequent image frame, decode the code stream to obtain at least one image frame; transmitting at least one image frame to an off-chip memory; and reading at least one image frame from the off-chip memory to the display module to display at least one image frame.
  • the central processing unit is configured to implement the following operations: when the information indicates that the at least one image frame is not referenced by the subsequent image frame, before decoding the code stream, Image frames and audio are pre-synchronized.
  • the apparatus further includes an on-chip memory, wherein the central processing unit is configured to perform the following operations: at least one image frame is stored without the need to store the at least one image frame to off-chip memory. on-chip memory.
  • the image frames are stored in the on-chip memory in the form of blocks or strips.
  • the central processing unit is configured to synchronize the image frames and the audio after storing the image frames to the off-chip memory.
  • a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method of the first aspect of the present disclosure is implemented.
  • Figure 1 shows a schematic usage environment in which methods according to embodiments of the present disclosure may be applied
  • FIG. 2 shows a block diagram of an electronic device according to an embodiment of the present disclosure
  • Figure 3 shows a schematic flowchart of a method for processing video according to an embodiment of the present disclosure
  • Figure 4 shows a data flow diagram according to an embodiment of the present disclosure.
  • 5A and 5B respectively illustrate schematic diagrams of image frame blocking according to embodiments of the present disclosure.
  • the term “including” and similar expressions should be understood as an open-ended inclusion, ie, “including but not limited to.”
  • the term “based on” should be understood to mean “based at least in part on.”
  • the term “one implementation” or “the implementation” shall be understood to mean “at least one implementation”.
  • the terms “first,” “second,” etc. may refer to different or the same object.
  • the term “and/or” means at least one of the two items associated with it. For example, "A and/or B" means A, B, or A and B. Other explicit and implicit definitions may be included below.
  • FIG. 1 shows a schematic usage environment in which methods according to embodiments of the present disclosure may be applied.
  • the method of the embodiment of the present disclosure may be used in a terminal device 100 such as a mobile phone.
  • the user can play the video on the terminal device 100.
  • Such videos may be videos stored locally on the terminal device 100 or videos played online using various types of networks.
  • the embodiments of the present disclosure are not particularly limited in this regard.
  • video resolution, frame rate, and bit rate gradually increase, video playback and processing require a large amount of power from the terminal device 100 , which results in a shorter battery life of the terminal device 100 .
  • embodiments of the present disclosure provide a video processing solution.
  • the terminal device 100 is shown in the form of a mobile phone in FIG. 1 , this is only illustrative and not restrictive.
  • the terminal device 100 may also take other forms, such as a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted smart device, etc., and its specific form is not limited by the embodiments of the present disclosure.
  • a video may be composed of multiple images arranged in a time sequence and audio associated with the images. These images are sometimes referred to as "frames" or "image frames".
  • a video can contain a sequence of code streams (also called code stream segments), where each code stream can correspond to an image frame. Taking a video with a frame rate of 60 frames per second as an example, 1 second includes 60 frames of images arranged in a specific order. It should be noted that the methods of the embodiments of the present disclosure are suitable for processing videos encoded based on various frame rates and different protocols, and there are no special restrictions on the specific frame rate and encoding protocol of the video to be processed.
  • the apparatus 200 may be the terminal device 100 integrated into FIG. 1 .
  • the device 200 may include a chip 210 and an off-chip memory 206 located outside the chip 210 .
  • the chip 210 includes a central processing unit (CPU) 201.
  • Program code for executing methods according to embodiments of the present disclosure may be stored on a non-volatile memory 208 external to the chip 210.
  • the central processing unit 201 may Communicates with the non-volatile memory 208 so that the program code is read from the non-volatile memory 208 to execute each method step.
  • the central processing unit 201 may be coupled with the video decoding module 202 , the display module 203 and the on-chip memory 205 integrated on the chip 210 through the bus 204 . It should be noted that in some embodiments, the central processing unit 201, the video decoding module 202, the display module 203 and the on-chip memory 205 can be integrated on the same chip 210 and coupled to each other via the bus 204. In other embodiments, the central processing unit 201, the video decoding module 202, the display module 203 and the on-chip memory 205 may be located on different chips. That is to say, the chip 210 may be in the form of a system on a chip (SoC), or may be in the form of other multi-chip combinations. The embodiments of the present disclosure do not specifically limit the specific form of the chip 210 , as long as it can realize mutual transmission and communication between different modules on the device 200 .
  • SoC system on a chip
  • the central processing unit 201 can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory or loaded into a random access memory.
  • the video decoding module 202 may be configured to decode a standard compressed code stream of the video.
  • the display module 203 may be configured to overlay image frames of each layer that need to be displayed on the screen of the terminal device 100, thereby displaying a video containing each image frame on the screen.
  • the on-chip memory 205 may be cache or static random access memory (Static Random Access Memory, SRAM).
  • the off-chip memory 206 can be a dynamic random access memory (Dynamic Random Access Memory, DRAM).
  • the on-chip memory 205 has a smaller storage space than the off-chip memory 206, its read and write speed is much faster than the off-chip memory 206. , the read and write power consumption is also much lower than that of the off-chip memory 206.
  • the on-chip memory 205 and the off-chip memory 206 can be coupled to the video decoding module 202 and the display module 203 through the bus 204 .
  • one or more code streams included in the video are parsed to determine information.
  • Such information indicates whether the image frame corresponding to the code stream segment to be processed is replaced by the subsequent image frame. referenced. It should be noted that for many image frames contained in a code stream, such information is not required to be determined for all image frames. Information can be determined for the image frame corresponding to a code stream segment in the code stream. For a continuous video, there is often a strong correlation between the content reflected in the previous and later image frames that make up the video, especially when the scene changes little, this correlation will be more prominent.
  • the video code stream includes information that reflects whether the image frame corresponding to the code stream segment to be processed in the video will be referenced by subsequent image frames.
  • the corresponding information of the code stream segments in these videos can be obtained based on the corresponding software syntax analysis.
  • the image frame corresponding to the code stream segment to be processed may be referenced by a subsequent image frame, while in other embodiments, it may be referenced by multiple subsequent image frames. These image frames may be adjacent or separated by other image frames. That is to say, the image frame to be processed may be referenced in the decoding process of the image frame located behind it.
  • the specific reference form is not particularly limited.
  • block 302 for the video code stream, different processing methods are determined based on the information determined in block 301 indicating whether the image frame needs to be referenced by subsequent image frames. Therefore, corresponding operation modes can be adopted for the code stream according to different determination results. If it is determined at block 302 that the image corresponding to the code stream segment being processed does not need to be referenced by subsequent image frames, the method 300 will proceed to block 303. In block 303, the video may be pre-synchronized before decoding the code stream. In some embodiments, the current frame number and timestamp information can be reported to the audio and video synchronization module of the device 200 for pre-synchronization of audio and image frames, and the method 300 is entered only when the audio and video synchronization time point is reached.
  • the video decoding module 202 is triggered to perform the decoding process.
  • the code stream can be decoded using various decoding methods to obtain image frames.
  • the decoded image frame is directly transmitted to the display module 203 for display through the on-chip memory 205 inside the chip 210, as shown in block 309.
  • the display of the image frame on the device 200 is completed.
  • Figure 4 illustrates a data flow diagram 400 in accordance with an embodiment of the present disclosure.
  • the on-chip memory 205 can transmit the data decoded by the video decoding module 202 to the on-chip memory 205, and finally the display module 203 reads the data from the on-chip memory 205 to display the image frame.
  • This method can be understood as online transmission. In this way, the on-chip memory 205 with faster read and write speed and lower power consumption can be fully utilized, thereby avoiding excessive power consumption of the terminal device 100 during the video processing process.
  • the method 300 enters another branch to reach block 306.
  • the code stream can be decoded using various decoding methods to obtain image frames.
  • the obtained image frames are transferred to off-chip memory 206 located outside the chip 210.
  • the image frames are transmitted to the display module 203 for display.
  • the video and audio may be synchronized to enhance the user's viewing experience.
  • the video decoding module 202 decodes the code stream being processed. Finally, the obtained image frame data is written to the off-chip memory 206, and then the display module 303 reads the data from the off-chip memory 306 for display.
  • This method can be understood as offline transmission. In this case, the off-chip memory 306 with larger storage space is used to ensure normal display of the video.
  • the subsequent hardware decoding method can be determined based on the information of the image frame corresponding to the code stream segment being processed. By reasonably distinguishing the actual situation of the code stream being processed, this can achieve low power consumption and video processing.
  • the stability shows a balance between the two.
  • the image frame when decoding the code stream, the image frame may be output in a certain manner.
  • 5A and 5B respectively illustrate schematic diagrams of dividing an output image frame according to an embodiment of the present disclosure.
  • the image frame 500 may be segmented in the horizontal direction, thereby forming a plurality of strips 502-1, 502-2, ..., 502-N.
  • the image frame 410 may be segmented both horizontally and vertically, thereby forming a plurality of strips 512-1, 512-2, ... 512-M.
  • the decoded data of a strip 502-1, 502-2,..., 502-N or a block 512-1, 512-2,...512-M is directly written to the on-chip memory 205 without will be written to the off-chip memory 206, thereby reducing the bandwidth of the off-chip memory 206.
  • image frames that will not be referenced by subsequent image frames since they are written into the on-chip memory 205 with a small storage space, they are divided into relatively coarse granularity, so that The space requirement for on-chip memory 205 can be reduced.
  • 4 strips are shown in FIG. 5A , this is only illustrative and not limiting.
  • the image frame 500 can be divided into more or fewer strips according to the actual usage scenario. destination strip.
  • the number of bars 512-1, 512-2, ... 512-M shown in FIG. 5B is only illustrative, and in other embodiments, other numbers of bars may be formed.
  • the image frame 500 may also be divided only in the vertical direction. It should also be understood that such divisions may be equally spaced or unequally spaced. That is to say, the strips 502-1, 502-2, ..., 502-N in Figure 5A may have the same size or different sizes. Similarly, the sizes of the bars 512-1, 512-2, ... 512-M in Figure 5B may be the same or different. This application does not place a limit on this, as long as it can segment the image frame, thereby reducing the video processing time.
  • the central processing unit 201 may notify the display module 203, so that the image frames in the on-chip memory 205 can be transmitted to the display module 203 in time. Referring back to FIG. 2 , timely communication between the video decoding module 202 and the display module 203 can be achieved through the communication module 207 provided between the two, thereby effectively reducing the communication delay.
  • the video decoding module 202 completes writing a predetermined number of blocks 512-1, 512-2, ... 512-M or strips 502-1, 502-2, ..., 502-N of data to After the on-chip memory 205, the display module 203 can be notified of a predetermined number of strips 512-1, 512-2,... 512-M or strips 502-1, 502-2,..., 502-N via the communication module 207. The data has been decoded, and the display module 203 is informed of the storage address of these data. In this way, the display module 203 reads the stripes 512-1, 512-2, ..., 512-M or strips 502-1, 502-2, ..., 502-N in the on-chip memory 205 from the address.
  • the data is then superimposed with the image frames of other layers and transmitted to the display of the terminal device 100 for display.
  • the video decoding module 202 can also be notified through the communication module 207, so that the video decoding module 202 can recycle the address to release the space on the on-chip memory 205 for subsequent decoding. Since the space of the on-chip memory 205 is usually very limited, excessive data cannot be stored.
  • the space of the on-chip memory 205 can be released in time to ensure efficient data processing. As a result, the power consumption of the terminal device 100 can be further reduced.
  • the predetermined number of blocks or strips may be one. This means that as long as the video decoding module 302 writes the data of a block or strip to the on-chip memory 205, it can notify the display module 203 via the communication module 207 that the data of the block or strip has been decoded, and then store The address reads the data in the block or strip for display, and once the reading of the block or strip is completed, the space on the on-chip memory 205 is released for subsequent decoding. This makes data processing more efficient. It should be understood that, according to the requirements for the endurance performance of the terminal device 100, the predetermined number can also be other numbers, such as two, three, or more.
  • the communication module 207 may be a direct hardware connection or a hardware scheduling accelerator disposed between the video decoding module 202 and the display module 203 .
  • the display module 203 can control the working rhythm of the video decoding module 202 through a synchronization signal, thereby adjusting the working rhythm of the video decoding module 202. Need to be consistent with display module 203. For example, if the refresh rate of the display screen of the device 200 is 60 frames per second, the display module 203 notifies the video decoding module 202 via the communication module 207 every 16.6 milliseconds (1000/60).
  • the video decoded by the video decoding module 202 is 30 frames per second, a decoding process is triggered every time two synchronization signals are received; if the video decoded by the video decoding module 202 is 60 frames per second, then every time Receiving a synchronization signal triggers a decoding process. In this manner, synchronous operations between the video decoding module 202 and the display module 203 can be ensured, thereby ensuring that the video can be correctly displayed on the device 200 . It should be understood that the numerical values here are only exemplary and not restrictive.
  • method 300 may be performed by central processing unit 201.
  • method 300 may be implemented as a computer software program tangibly embodied in a machine-readable medium.
  • part or all of the computer program may be loaded and/or installed onto the electronic device 300 via a read-only memory and/or communication unit.
  • central processing unit 301 When a computer program is loaded into random access memory and executed by central processing unit 301, one or more actions of method 300 described above may be performed.
  • the disclosure may be a method, apparatus, system and/or computer program product.
  • the computer program product may include a computer-readable storage medium, which may be the non-volatile memory 208 described above, having thereon computer-readable program instructions for performing various aspects of the disclosure.
  • Computer-readable storage media may be tangible devices that can retain and store instructions for use by an instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or Flash memory), Static Random Access Memory (SRAM), Compact Disk Read Only Memory (CD-ROM), Digital Versatile Disk (DVD), Memory Stick, Floppy Disk, Mechanical Coding Device, such as a printer with instructions stored on it.
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • Flash memory Static Random Access Memory
  • CD-ROM Compact Disk Read Only Memory
  • DVD Digital Versatile Disk
  • Memory Stick
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or through electrical wires. transmitted electrical signals.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to various computing/processing devices, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing/processing device .
  • Computer program instructions for performing operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • the computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through the Internet). connect).
  • LAN local area network
  • WAN wide area network
  • an external computer such as an Internet service provider through the Internet. connect
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA)
  • the electronic circuit can Computer readable program instructions are executed to implement various aspects of the disclosure.
  • These computer-readable program instructions may be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine such that the instructions, when executed by a processing unit of the computer or other programmable data processing apparatus, , resulting in an apparatus that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium. These instructions cause the computer, programmable data processing device and/or other equipment to work in a specific manner. Therefore, the computer-readable medium storing the instructions includes An article of manufacture that includes instructions that implement aspects of the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operating steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executed on a computer, other programmable data processing apparatus, or other equipment to implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that embody one or more elements for implementing the specified logical function(s).
  • Executable instructions may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or acts. , or can be implemented using a combination of specialized hardware and computer instructions.
  • image frames that do not need to be referenced after decoding are transmitted online to the display module 203 without being transferred through the off-chip memory 206, which can reduce the power consumption of the terminal device 100.
  • the goal of. For most videos, due to the need to save network transmission bandwidth or video storage space, a large number of frames that are not referenced are usually used. Therefore, the embodiments of the present disclosure have good usage effects. As more frames are not referenced, the power consumption benefits of embodiments of the present disclosure are greater.
  • solutions according to the embodiments of the present disclosure can also be applied to scenarios that require multiple addresses to collaboratively process video data, such as online data transmission solutions in camera recording scenarios, thereby reducing camera equipment in recording scenarios. Power consumption.
  • steps can be reordered, added, or removed using various forms of the process shown above.
  • each step described in the present disclosure can be executed in parallel, sequentially, or in a different order.
  • the desired results of the technical solutions disclosed in the present disclosure can be achieved, there is no limitation here.

Abstract

The present disclosure relates to a video processing method and apparatus and a computer readable storage medium. The method comprises: parsing a code stream of a video so as to determine information indicating whether at least one image frame is referred to by a subsequent image frame (301); when the information indicates that the at least one image frame is not referred to by the subsequent image frame, decoding the code stream (304) to obtain the at least one image frame; and when the at least one image frame does not need to be stored to an off-chip memory, transmitting the at least one image frame to a display module for displaying the at least one image frame. According to the solution, the power consumption of a processing device in the video processing process can be effectively reduced.

Description

处理视频的方法、装置和计算机可读存储介质Method, device and computer-readable storage medium for processing video 技术领域Technical field
本公开涉及视频处理技术领域,更具体而言涉及一种处理视频的方法、装置、计算机可读存储介质。The present disclosure relates to the technical field of video processing, and more specifically to a method, device, and computer-readable storage medium for processing video.
背景技术Background technique
随着诸如手机、平板电脑等智能终端设备的性能逐步提升,人们可以随时随地通过这些智能终端设备观看本地视频或通过网络观看在线视频。随着视频质量日益精良,高分辨率、高帧率和高码率的视频不断涌现,这在为用户提供更良好的视频观看体验的同时,也为终端设备的性能提出了更高的要求。As the performance of smart terminal devices such as mobile phones and tablets gradually improves, people can watch local videos or watch online videos through the Internet through these smart terminal devices anytime and anywhere. As video quality becomes increasingly sophisticated, high-resolution, high frame rate and high bit rate videos continue to emerge, which not only provides users with a better video viewing experience, but also puts forward higher requirements for the performance of terminal devices.
当前,由于终端设备尺寸和电池技术的限制,终端设备对功耗和续航的要求都非常严苛。长时间观看视频会导致智能终端设备电量消耗过快,电池续航时间缩短,这将给用户带来极大的焦虑。因此,如何降低视频播放业务的功耗,提升终端设备的续航,是提高用户使用智能终端设备的体验的一个关键技术问题。Currently, due to limitations in terminal device size and battery technology, terminal devices have very strict requirements on power consumption and battery life. Watching videos for a long time will cause the smart terminal device to consume too much power and shorten the battery life, which will cause great anxiety to users. Therefore, how to reduce the power consumption of video playback services and improve the battery life of terminal equipment is a key technical issue to improve the user experience of using smart terminal equipment.
发明内容Contents of the invention
鉴于上述问题,至少为了降低视频处理对终端设备续航能力的影响,本公开的实施例提供了一种处理视频的方法、装置、计算机可读存储介质。In view of the above problems, at least in order to reduce the impact of video processing on the battery life of the terminal device, embodiments of the present disclosure provide a method, device, and computer-readable storage medium for processing video.
在本公开的第一方面,提供了一种处理视频的方法。方法包括:对视频的码流进行解析,确定表示至少一个图像帧是否被后续图像帧参考的信息;当信息表示至少一个图像帧不被后续图像帧参考,对码流进行解码,以获得至少一个图像帧;以及在无需将至少一个图像帧存储至片外存储器的情况下,将至少一个图像帧传输至显示模块,以显示至少一个图像帧。In a first aspect of the present disclosure, a method of processing video is provided. The method includes: parsing the code stream of the video to determine information indicating whether at least one image frame is referenced by a subsequent image frame; when the information indicates that at least one image frame is not referenced by a subsequent image frame, decoding the code stream to obtain at least one an image frame; and transmitting at least one image frame to a display module to display at least one image frame without storing the at least one image frame to an off-chip memory.
根据本公开的实施例,通过对正在处理的图像帧的是否会被后续图像帧所参考的实际情况,对图像帧进行区别处理,对于不会被后续图像帧参考的图像帧,可以通过在线直接传输,给显示模块,而无需通过读写速度更慢且功率消耗更高的片外存储器的中转,从而降低终端设备的功率消耗。According to embodiments of the present disclosure, image frames are processed differently by determining whether the image frame being processed will be referenced by subsequent image frames. Image frames that will not be referenced by subsequent image frames can be directly processed online. Transmitted to the display module without having to pass through an off-chip memory that has slower reading and writing speeds and higher power consumption, thus reducing the power consumption of the terminal device.
在第一方面的一种实现方式中,方法还包括:当信息表示至少一个图像帧被后续图像帧参考,对码流进行解码,以获得至少一个图像帧;将至少一个图像帧传输至片外存储器;以及将至少一个图像帧从片外存储器读取至显示模块,以显示至少一个图像帧。以此方式,对于会被后续图像帧参考的图像帧,通过存储容量更大的片外存储器,可以确保视频的稳定输出。In an implementation of the first aspect, the method further includes: when the information indicates that at least one image frame is referenced by a subsequent image frame, decoding the code stream to obtain at least one image frame; transmitting at least one image frame to an off-chip memory; and reading at least one image frame from the off-chip memory to the display module to display at least one image frame. In this way, for image frames that will be referenced by subsequent image frames, stable output of the video can be ensured through an off-chip memory with a larger storage capacity.
在第一方面的一种实现方式中,当所述信息表示所述至少一个图像帧不被所述后续图像帧参考,方法还包括:在对码流进行解码之前,对图像帧和音频进行预同步。以此方式,可以避免由于音频和画面不同步导致用户体验变差。In an implementation of the first aspect, when the information indicates that the at least one image frame is not referenced by the subsequent image frame, the method further includes: pre-processing the image frame and audio before decoding the code stream. Synchronize. In this way, poor user experience due to out-of-sync audio and video can be avoided.
在第一方面的一种实现方式中,在无需将至少一个图像帧存储至片外存储器的情况下,至少一个图像帧被存储在片上存储器。以此方式,通过片上存储器,能够实现视频数据的直径传输。In an implementation of the first aspect, at least one image frame is stored in on-chip memory without the need to store at least one image frame in off-chip memory. In this way, through on-chip memory, diameter transmission of video data can be achieved.
在第一方面的一种实现方式中,图像帧以条块或者条带的形式被存储在片上存储器。由 于片上存储器的空间相对有限,以此方式,能够降低对片上存储器的空间需求。In an implementation of the first aspect, the image frames are stored in the on-chip memory in the form of blocks or strips. Since the space of on-chip memory is relatively limited, in this way, the space requirements for on-chip memory can be reduced.
在第一方面的一种实现方式中,方法还包括:在将图像帧存储至片外存储器之后,对图像帧和音频进行同步。以此方式,可以提升用户的观看体验。In an implementation of the first aspect, the method further includes: after storing the image frame to the off-chip memory, synchronizing the image frame and the audio. In this way, the user's viewing experience can be improved.
在本公开的第二方面,提供了一种处理视频的装置。该装置包括视频解码模块、显示模块和中央处理单元,其中中央处理单元被配置为实现以下操作:对视频的码流进行解析,确定表示至少一个图像帧是否被后续图像帧参考的信息;当信息表示至少一个图像帧不被后续图像帧参考,对码流进行解码,以获得至少一个图像帧;以及在无需将至少一个图像帧存储至片外存储器的情况下,将至少一个图像帧传输至显示模块,以显示至少一个图像帧。In a second aspect of the present disclosure, an apparatus for processing video is provided. The device includes a video decoding module, a display module and a central processing unit, wherein the central processing unit is configured to implement the following operations: parse the video code stream and determine information indicating whether at least one image frame is referenced by a subsequent image frame; when the information Indicates that at least one image frame is not referenced by subsequent image frames, decoding the code stream to obtain at least one image frame; and transmitting at least one image frame to the display without storing the at least one image frame to an off-chip memory. module to display at least one image frame.
在第二方面的一种实现方式中,装置还包括片外存储器,其中中央处理单元被配置为实现以下操作:当信息表示至少一个图像帧被后续图像帧参考,对码流进行解码,以获得至少一个图像帧;将至少一个图像帧传输至片外存储器;以及将至少一个图像帧从片外存储器读取至显示模块,以显示至少一个图像帧。In an implementation manner of the second aspect, the device further includes an off-chip memory, wherein the central processing unit is configured to implement the following operations: when the information indicates that at least one image frame is referenced by a subsequent image frame, decode the code stream to obtain at least one image frame; transmitting at least one image frame to an off-chip memory; and reading at least one image frame from the off-chip memory to the display module to display at least one image frame.
在第二方面的一种实现方式中,中央处理单元被配置为实现以下操作:当所述信息表示所述至少一个图像帧不被所述后续图像帧参考,在对码流进行解码之前,对图像帧和音频进行预同步。In an implementation manner of the second aspect, the central processing unit is configured to implement the following operations: when the information indicates that the at least one image frame is not referenced by the subsequent image frame, before decoding the code stream, Image frames and audio are pre-synchronized.
在第二方面的一种实现方式中,装置还包括片上存储器,其中中央处理单元被配置为实现以下操作:在无需将至少一个图像帧存储至片外存储器的情况下,至少一个图像帧被存储在片上存储器。In an implementation of the second aspect, the apparatus further includes an on-chip memory, wherein the central processing unit is configured to perform the following operations: at least one image frame is stored without the need to store the at least one image frame to off-chip memory. on-chip memory.
在第二方面的一种实现方式中,图像帧以条块或者条带的形式被存储在片上存储器。In an implementation of the second aspect, the image frames are stored in the on-chip memory in the form of blocks or strips.
在第二方面的一种实现方式中,中央处理单元被配置为实现以下操作:在将图像帧存储至片外存储器之后,对图像帧和音频进行同步。In an implementation of the second aspect, the central processing unit is configured to synchronize the image frames and the audio after storing the image frames to the off-chip memory.
在本公开的第三方面,提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本公开的第一方面的方法。In a third aspect of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method of the first aspect of the present disclosure is implemented.
应当理解,发明内容部分中所描述的内容并非旨在限定本公开的实现方式的关键或重要特征,亦非用于限制本公开的范围。本公开的其它特征将通过以下的描述变得容易理解。It should be understood that what is described in this summary is not intended to identify key or important features of the implementations of the disclosure, nor to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the description below.
附图说明Description of drawings
结合附图并参考以下详细说明,本公开各实现方式的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标记表示相同或相似的元素,其中:The above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent with reference to the following detailed description taken in conjunction with the accompanying drawings. In the drawings, the same or similar reference numbers represent the same or similar elements, where:
图1示出了可以适用根据本公开的实施例的方法的一种示意性的使用环境;Figure 1 shows a schematic usage environment in which methods according to embodiments of the present disclosure may be applied;
图2示出了根据本公开的实施例的电子设备的框图;2 shows a block diagram of an electronic device according to an embodiment of the present disclosure;
图3示出了根据本公开的实施例的用于处理视频的方法的示意性流程图;Figure 3 shows a schematic flowchart of a method for processing video according to an embodiment of the present disclosure;
图4示出了根据本公开的实施例的数据流向图;以及Figure 4 shows a data flow diagram according to an embodiment of the present disclosure; and
图5A和图5B分别示出了根据本公开的实施例的图像帧分块的示意图。5A and 5B respectively illustrate schematic diagrams of image frame blocking according to embodiments of the present disclosure.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实现方式。虽然附图中显示了本公开的某些实现方式,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实现方式,相反提供这些实现方式是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实现方式仅用于示例性作用,并非用于限制本公开的保护范围。Implementations of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain implementations of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure may be implemented in various forms and should not be construed as limited to the implementations set forth herein, but rather these implementations are provided for A more thorough and complete understanding of this disclosure. It should be understood that the drawings and implementations of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
在本公开的实现方式的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实现方式”或“该实现方式”应当理解为“至少一个实现方式”。术语“第一”、“第二”等等可以指代不同的或相同的对象。术语“和/或”表示由其关联的两项的至少一项。例如“A和/或B”表示A、B、或者A和B。下文还可能包括其他明确的和隐含的定义。In describing implementations of the present disclosure, the term "including" and similar expressions should be understood as an open-ended inclusion, ie, "including but not limited to." The term "based on" should be understood to mean "based at least in part on." The term "one implementation" or "the implementation" shall be understood to mean "at least one implementation". The terms "first," "second," etc. may refer to different or the same object. The term "and/or" means at least one of the two items associated with it. For example, "A and/or B" means A, B, or A and B. Other explicit and implicit definitions may be included below.
应理解,本申请实现方式提供的技术方案,在以下具体实现方式的介绍中,某些重复之处可能不再赘述,但应视为这些具体实现方式之间已有相互引用,可以相互结合。It should be understood that for the technical solutions provided by the implementation methods of this application, in the following introduction of specific implementation methods, some repetitive parts may not be described again, but it should be regarded that these specific implementation methods have mutual references and can be combined with each other.
下面参照附图描述本公开的一些示意性实现方式。Some illustrative implementations of the present disclosure are described below with reference to the accompanying drawings.
图1示出了可以适用根据本公开的实施例的方法的一种示意性的使用环境。如图所示,可以在诸如手机之类的终端设备100中使用本公开的实施例的方法。用户可以在终端设备100上播放视频。这样的视频既可以是存储在终端设备100本地的视频,也可以是利用各种类型的网络在线播放的视频。本公开的实施例对此不做特别限制。如前所述,随着视频分辨率、帧率和码率的逐步提升,视频的播放和处理需要耗费终端设备100的大量功率,这导致终端设备100的电池的续航时间变短。至少为了解决上述问题,本公开的实施例提供了一种视频处理方案。该方案可以有效地降低视频的处理对终端设备100的功率消耗,提升用户的使用体验。应该理解的是,虽然图1中以手机的形式示出了终端设备100,然而,这仅仅是示意性的,而非限制性的。终端设备100还可以采用其他的形式,例如平板电脑、笔记本电脑、台式机、车载智能设备,等等,其具体形式不受到本公开的实施例的限制。FIG. 1 shows a schematic usage environment in which methods according to embodiments of the present disclosure may be applied. As shown in the figure, the method of the embodiment of the present disclosure may be used in a terminal device 100 such as a mobile phone. The user can play the video on the terminal device 100. Such videos may be videos stored locally on the terminal device 100 or videos played online using various types of networks. The embodiments of the present disclosure are not particularly limited in this regard. As mentioned above, as video resolution, frame rate, and bit rate gradually increase, video playback and processing require a large amount of power from the terminal device 100 , which results in a shorter battery life of the terminal device 100 . At least to solve the above problems, embodiments of the present disclosure provide a video processing solution. This solution can effectively reduce the power consumption of the terminal device 100 due to video processing and improve the user experience. It should be understood that although the terminal device 100 is shown in the form of a mobile phone in FIG. 1 , this is only illustrative and not restrictive. The terminal device 100 may also take other forms, such as a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted smart device, etc., and its specific form is not limited by the embodiments of the present disclosure.
在本公开的语境下,视频可以由以一定时间序列排布的多个图像和与这些图像相关联的音频共同构成。这些图像有时也可以被称作“帧”或者“图像帧”。一个视频可以包含一串码流(也可以被称作码流片段),其中每个码流可以对应于一个图像帧。以帧速率为60帧每秒的视频为例,其1秒内包括按特定顺序排列的60帧图像。需要说明的是,本公开的实施例的方法适用于处理各种帧速率以及基于不同协议来编码的视频,对于待处理的视频的具体帧速率和编码协议不做特别限制。In the context of this disclosure, a video may be composed of multiple images arranged in a time sequence and audio associated with the images. These images are sometimes referred to as "frames" or "image frames". A video can contain a sequence of code streams (also called code stream segments), where each code stream can correspond to an image frame. Taking a video with a frame rate of 60 frames per second as an example, 1 second includes 60 frames of images arranged in a specific order. It should be noted that the methods of the embodiments of the present disclosure are suitable for processing videos encoded based on various frame rates and different protocols, and there are no special restrictions on the specific frame rate and encoding protocol of the video to be processed.
下面参考图2来描述根据本公开的实施例的装置200的框图。装置200可以是被集成到图1中的终端设备100。如图2所示,装置200可以包括芯片210以及位于芯片210外部的片外存储器206。如所示出,芯片210包括中央处理单元(CPU)201,用于执行根据本公开的实施例方法的程序代码可以被存储在芯片210外部的非易失性存储器208上,中央处理单元201可以与非易失性存储器208通信,从而由非易失性存储器208读取程序代码,以执行各方法步骤。A block diagram of an apparatus 200 according to an embodiment of the present disclosure is described below with reference to FIG. 2 . The apparatus 200 may be the terminal device 100 integrated into FIG. 1 . As shown in FIG. 2 , the device 200 may include a chip 210 and an off-chip memory 206 located outside the chip 210 . As shown, the chip 210 includes a central processing unit (CPU) 201. Program code for executing methods according to embodiments of the present disclosure may be stored on a non-volatile memory 208 external to the chip 210. The central processing unit 201 may Communicates with the non-volatile memory 208 so that the program code is read from the non-volatile memory 208 to execute each method step.
继续参照图2,中央处理单元201可以通过总线204与集成到芯片210上的视频解码模块202、显示模块203和片上存储器205耦接。需要说明的是,在一些实施例中,中央处理单元201、视频解码模块202、显示模块203和片上存储器205可以集成到同一个芯片210上,并且经由总线204相互耦接。在其他实施例中,中央处理单元201、视频解码模块202、显示模块203和片上存储器205可以位于不同的芯片上。也就是说,芯片210可以是采用片上系统(SoC)的形式,也可以是其他的多芯片组合形式。本公开的实施例对于芯片210的具体形式不做特别限定,只要能够实现装置200上的不同模块的相互传输通信即可。Continuing to refer to FIG. 2 , the central processing unit 201 may be coupled with the video decoding module 202 , the display module 203 and the on-chip memory 205 integrated on the chip 210 through the bus 204 . It should be noted that in some embodiments, the central processing unit 201, the video decoding module 202, the display module 203 and the on-chip memory 205 can be integrated on the same chip 210 and coupled to each other via the bus 204. In other embodiments, the central processing unit 201, the video decoding module 202, the display module 203 and the on-chip memory 205 may be located on different chips. That is to say, the chip 210 may be in the form of a system on a chip (SoC), or may be in the form of other multi-chip combinations. The embodiments of the present disclosure do not specifically limit the specific form of the chip 210 , as long as it can realize mutual transmission and communication between different modules on the device 200 .
下面对装置200上的各个模块进行简单介绍。中央处理单元201可以根据存储在只读存储器中的计算机程序指令或者加载到随机存取存储器中的计算机程序指令,来执行各种适当的动作和处理。视频解码模块202可以被配置为对视频的经过标准压缩的码流进行解码。显 示模块203可以被配置为对需要显示到终端设备100的屏幕上的各层图像帧进行叠加,从而在屏幕上显示出包含各个图像帧的视频。片上存储器205可以是缓存或者静态随机存取存储器(Static Random Access Memory,SRAM)。片外存储器206可以是动态随机存取存储器(Dynamic Random Access Memory,DRAM),相比之下,片上存储器205虽然存储空间比片外存储器206小,但其读写速度远快于片外存储器206,读写功率消耗也远低于片外存储器206。如图2所示,片上存储器205和片外存储器206可以通过总线204与视频解码模块202、显示模块203耦接。Each module on the device 200 is briefly introduced below. The central processing unit 201 can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory or loaded into a random access memory. The video decoding module 202 may be configured to decode a standard compressed code stream of the video. The display module 203 may be configured to overlay image frames of each layer that need to be displayed on the screen of the terminal device 100, thereby displaying a video containing each image frame on the screen. The on-chip memory 205 may be cache or static random access memory (Static Random Access Memory, SRAM). The off-chip memory 206 can be a dynamic random access memory (Dynamic Random Access Memory, DRAM). In contrast, although the on-chip memory 205 has a smaller storage space than the off-chip memory 206, its read and write speed is much faster than the off-chip memory 206. , the read and write power consumption is also much lower than that of the off-chip memory 206. As shown in FIG. 2 , the on-chip memory 205 and the off-chip memory 206 can be coupled to the video decoding module 202 and the display module 203 through the bus 204 .
下面参照图3来描述根据本公开的实施例提供了一种处理视频的方法300。如图3所示,在框301,对视频中所包括的一个或多个码流进行解析,以确定信息,这样的信息表示待处理的码流片段所对应的图像帧是否被后续的图像帧所参考。需要说明的是,对于一个码流所包含的许多图像帧,并不要求对所有的图像帧都进行这样的信息确定,可以对码流中的一段码流片段所对应的图像帧进行信息确定。对于一个连续的视频而言,构成该视频的前后图像帧所反映的内容之间往往具有较强的关联性,特别是在场景变化不大的情况下,这种关联性会更加突出。因此,在构成视频的图像帧的集合中,有一些图像帧可以作为后续图像帧在解码处理时的参考。当然,也有些图像帧将不会作为后续图像帧的参考。视频的码流中包括有这样的信息,用来反映视频中的待处理的码流片段所对应的图像帧是否会被后续的图像帧所参考。可以基于相应的软件语法解析来获取这些视频中的码流片段的相应信息。应该理解的是,在一些实施例中,对于待处理的码流片段所对应的图像帧,其可以会被后续的一个图像帧所参考,而在另一些实施例中,其可以被后续的多个图像帧所参考,这些图像帧既可以是相邻的,也可以是间隔有其他的图像帧。也就是说,针对待处理的图像帧,都有可能在位于其后方的图像帧的解码过程中被参考。具体的参考形式不做特别限制。The following describes a method 300 for processing video according to an embodiment of the present disclosure with reference to FIG. 3 . As shown in Figure 3, in block 301, one or more code streams included in the video are parsed to determine information. Such information indicates whether the image frame corresponding to the code stream segment to be processed is replaced by the subsequent image frame. referenced. It should be noted that for many image frames contained in a code stream, such information is not required to be determined for all image frames. Information can be determined for the image frame corresponding to a code stream segment in the code stream. For a continuous video, there is often a strong correlation between the content reflected in the previous and later image frames that make up the video, especially when the scene changes little, this correlation will be more prominent. Therefore, among the set of image frames that constitute the video, some image frames can be used as references for subsequent image frames in the decoding process. Of course, there are also some image frames that will not be used as references for subsequent image frames. The video code stream includes information that reflects whether the image frame corresponding to the code stream segment to be processed in the video will be referenced by subsequent image frames. The corresponding information of the code stream segments in these videos can be obtained based on the corresponding software syntax analysis. It should be understood that in some embodiments, the image frame corresponding to the code stream segment to be processed may be referenced by a subsequent image frame, while in other embodiments, it may be referenced by multiple subsequent image frames. These image frames may be adjacent or separated by other image frames. That is to say, the image frame to be processed may be referenced in the decoding process of the image frame located behind it. The specific reference form is not particularly limited.
在框302,针对视频的码流,基于在框301中确定的表示该图像帧是否需要被后续图像帧参考的信息,来确定不同的处理方式。由此,可以根据不同的确定结果,来对该码流采取相应的操作方式。如果在框302处经判断得到正在被处理的码流片段所对应的图像不需要被后续图像帧做参考,则方法300将会进行到框303。在框303,可以在对码流进行解码之前,对视频进行预同步的处理。在一些实施例中,可以将当前的帧序号和时间戳信息上报给装置200的音视频同步模块,以进行音频和图像帧的预同步,当到达音视频同步的时间点后才使方法300进入框304中,触发视频解码模块202进行解码流程。在框304处,可以利用各种解码方式对码流进行解码,以得到图像帧。随后,将经过解码得到的图像帧通过芯片210内部的片上存储器205直接传输给显示模块203以供显示,如框309所示。由此,完成图像帧在装置200上的显示。In block 302, for the video code stream, different processing methods are determined based on the information determined in block 301 indicating whether the image frame needs to be referenced by subsequent image frames. Therefore, corresponding operation modes can be adopted for the code stream according to different determination results. If it is determined at block 302 that the image corresponding to the code stream segment being processed does not need to be referenced by subsequent image frames, the method 300 will proceed to block 303. In block 303, the video may be pre-synchronized before decoding the code stream. In some embodiments, the current frame number and timestamp information can be reported to the audio and video synchronization module of the device 200 for pre-synchronization of audio and image frames, and the method 300 is entered only when the audio and video synchronization time point is reached. In block 304, the video decoding module 202 is triggered to perform the decoding process. At block 304, the code stream can be decoded using various decoding methods to obtain image frames. Subsequently, the decoded image frame is directly transmitted to the display module 203 for display through the on-chip memory 205 inside the chip 210, as shown in block 309. Thus, the display of the image frame on the device 200 is completed.
图4示出了根据本公开的实施例的数据流向图400。结合图4可以看到,根据本公开的实施例,如果判断得到正在被处理的码流片段所对应的图像不需要被后续图像帧做参考,则无需片外存储器206的参与,仅利用芯片210的片上存储器205,便可以将视频解码模块202解码得到的数据向片上存储器205传输,并最终由显示模块203从片上存储器205上读取数据,以实现图像帧的显示。这种方式可以被理解为是在线传输。通过这种方式,可以充分利用读写速度更快且功率消耗更低的片上存储器205,由此能够避免视频处理过程对终端设备100的功率带来过大的消耗。Figure 4 illustrates a data flow diagram 400 in accordance with an embodiment of the present disclosure. As can be seen in conjunction with Figure 4, according to the embodiment of the present disclosure, if it is determined that the image corresponding to the code stream segment being processed does not need to be referenced by subsequent image frames, there is no need for the participation of the off-chip memory 206, and only the chip 210 is used The on-chip memory 205 can transmit the data decoded by the video decoding module 202 to the on-chip memory 205, and finally the display module 203 reads the data from the on-chip memory 205 to display the image frame. This method can be understood as online transmission. In this way, the on-chip memory 205 with faster read and write speed and lower power consumption can be fully utilized, thereby avoiding excessive power consumption of the terminal device 100 during the video processing process.
在一些实施例中,如果在框302处判断正在被处理的码流片段所对应的图像帧将会被后续图像帧在解码过程中进行参考,则方法300进入另一个分支到达框306。在框306处,可 以利用各种解码方式对码流进行解码,以得到图像帧。随后,在框307,将所获得的图像帧传输到位于芯片210外部的片外存储器206中。进而,通过片外存储器206的中转,将图像帧传输给显示模块203以供显示。在一些实施例中,在框308,在将图像帧传输到显示模块203进行显示之前,可以对视频和音频进行同步,以便提升用户的观看体验。In some embodiments, if it is determined at block 302 that the image frame corresponding to the code stream segment being processed will be referenced by subsequent image frames in the decoding process, the method 300 enters another branch to reach block 306. At block 306, the code stream can be decoded using various decoding methods to obtain image frames. Subsequently, at block 307, the obtained image frames are transferred to off-chip memory 206 located outside the chip 210. Furthermore, through the transfer of the off-chip memory 206, the image frames are transmitted to the display module 203 for display. In some embodiments, at block 308, before transmitting the image frames to the display module 203 for display, the video and audio may be synchronized to enhance the user's viewing experience.
根据本公开的实施例,结合图4,如果正在处理的码流片段所对应的图像帧会被后续的图像帧在解析过程中所参考,则在视频解码模块202对正在处理的码流进行解码后,将得到的图像帧数据写入到片外存储器206上,随后由显示模块303从片外存储器306上读取数据,以便于显示。这种方式可以被理解为是离线传输。在这种情况下,利用存储空间较大的片外存储器306,从而可以确保视频的正常显示。According to an embodiment of the present disclosure, with reference to FIG. 4 , if the image frame corresponding to the code stream segment being processed will be referenced by subsequent image frames in the parsing process, the video decoding module 202 decodes the code stream being processed. Finally, the obtained image frame data is written to the off-chip memory 206, and then the display module 303 reads the data from the off-chip memory 306 for display. This method can be understood as offline transmission. In this case, the off-chip memory 306 with larger storage space is used to ensure normal display of the video.
由此,可以基于正在处理的码流片段所对应的图像帧的信息来决定后续硬件解码的方式,通过对正在处理的码流的实际情况进行合理的区别对待,这样能够在低功率消耗以及视频的稳定显示两者之间取得平衡。As a result, the subsequent hardware decoding method can be determined based on the information of the image frame corresponding to the code stream segment being processed. By reasonably distinguishing the actual situation of the code stream being processed, this can achieve low power consumption and video processing. The stability shows a balance between the two.
在一些实施例中,在框304处,在对码流进行解码时,可以使图像帧以一定的方式进行输出。图5A和图5B分别示出了根据本公开的实施例的对输出图像帧进行划分的示意图。在一些实施例中,如图5A所示,图像帧500可以在水平方向上被分割,从而形成多个条带502-1、502-2、……、502-N。在另一些实施例中,如图5B所示,图像帧410可以在水平方向和竖直方向上都被分割,从而形成多个条块512-1、512-2、……512-M。经过解码后的一个条带502-1、502-2、……、502-N或者条块512-1、512-2、……512-M的数据被直接写到片上存储器205中,而不会被写到片外存储器206上,从而降低片外存储器206的带宽。利用这种方式,对于不会被后续图像帧所参考的图像帧来说,由于其被写入的是存储空间较小的片上存储器205中,因此,对其进行相对粗的粒度的划分,这样能够降低对片上存储器205的空间需求。应该理解的是,虽然图5A中示出了4个条带,然而,这仅仅是示意性的,而非限制性的,根据实际的使用场景,可以将图像帧500划分成更多或者更少数目的条带。类似地,图5B中示出的条块512-1、512-2、……512-M的数目也仅是说明性的,在其他实施例中,可以形成其他数目的条块。此外,在一些实施例中,还可以对图像帧500仅进行竖直方向的划分。还应该理解的是,这样的划分既可以是等间距的,也可以是非等间距的。也就是说,图5A中的条带502-1、502-2、……、502-N可以是具有相同的大小,也可以具有不同的大小。同样地,图5B中的条块512-1、512-2、……512-M的大小既可以是相同的,也可以是不同的。本申请对此不做限制,只要其能将图像帧进行分割,从而能够减小视频处理的时间即可。In some embodiments, at block 304, when decoding the code stream, the image frame may be output in a certain manner. 5A and 5B respectively illustrate schematic diagrams of dividing an output image frame according to an embodiment of the present disclosure. In some embodiments, as shown in Figure 5A, the image frame 500 may be segmented in the horizontal direction, thereby forming a plurality of strips 502-1, 502-2, ..., 502-N. In other embodiments, as shown in FIG. 5B , the image frame 410 may be segmented both horizontally and vertically, thereby forming a plurality of strips 512-1, 512-2, ... 512-M. The decoded data of a strip 502-1, 502-2,..., 502-N or a block 512-1, 512-2,...512-M is directly written to the on-chip memory 205 without will be written to the off-chip memory 206, thereby reducing the bandwidth of the off-chip memory 206. In this way, for image frames that will not be referenced by subsequent image frames, since they are written into the on-chip memory 205 with a small storage space, they are divided into relatively coarse granularity, so that The space requirement for on-chip memory 205 can be reduced. It should be understood that although 4 strips are shown in FIG. 5A , this is only illustrative and not limiting. The image frame 500 can be divided into more or fewer strips according to the actual usage scenario. destination strip. Similarly, the number of bars 512-1, 512-2, ... 512-M shown in FIG. 5B is only illustrative, and in other embodiments, other numbers of bars may be formed. In addition, in some embodiments, the image frame 500 may also be divided only in the vertical direction. It should also be understood that such divisions may be equally spaced or unequally spaced. That is to say, the strips 502-1, 502-2, ..., 502-N in Figure 5A may have the same size or different sizes. Similarly, the sizes of the bars 512-1, 512-2, ... 512-M in Figure 5B may be the same or different. This application does not place a limit on this, as long as it can segment the image frame, thereby reducing the video processing time.
在一些实施例中,由于在视频解码模块202解码后的条块或条带的数据已经在框303中经过了音视频预同步,则此时可以被直接传输给显示模块203以便显示在终端设备100的显示器上。在一些实施例中,当预定数目的条块或条带传输到片上存储器205,则中央处理单元201可以通知显示模块203,使得能够将片上存储器205中的图像帧及时传输给显示模块203。返回参考图2,可以通过设置在视频解码模块202和显示模块203之间的通信模块207来实现两者之间的及时沟通,从而有效地降低通信时延。在一些实施例中,视频解码模块202写完预定数目的条块512-1、512-2、……512-M或条带502-1、502-2、……、502-N的数据到片上存储器205之后,便可以经由通信模块207通知显示模块203预定数目的条块512-1、512-2、……512-M或条带502-1、502-2、……、502-N的数据已经解码完成,并告知显示模块203这些数据的存储地址。这样,显示模块203从该地址中读取处于片上存储器205中的条块512-1、512-2、……512-M或条带502-1、502-2、……、502-N的数据,随后将图像帧与 其它层的图像帧进行叠加并传输给终端设备100的显示器进行显示。在上述的读取步骤结束之后,还可以经由通信模块207告知视频解码模块202,从而便于视频解码模块202将该地址回收,以便释放片上存储器205上的空间作为后续解码使用。由于片上存储器205的空间通常是十分有限的,因此无法存储过多的数据。利用本公开的实施例中的方式,通过视频解码模块202和显示模块203之间的直接通信,可以及时释放片上存储器205的空间,以确保高效的数据处理。由此,能够进一步降低终端设备100的功率消耗。In some embodiments, since the data of the strips or strips decoded by the video decoding module 202 has undergone audio and video pre-synchronization in block 303, it can be directly transmitted to the display module 203 at this time for display on the terminal device. 100 on the monitor. In some embodiments, when a predetermined number of blocks or strips are transmitted to the on-chip memory 205, the central processing unit 201 may notify the display module 203, so that the image frames in the on-chip memory 205 can be transmitted to the display module 203 in time. Referring back to FIG. 2 , timely communication between the video decoding module 202 and the display module 203 can be achieved through the communication module 207 provided between the two, thereby effectively reducing the communication delay. In some embodiments, the video decoding module 202 completes writing a predetermined number of blocks 512-1, 512-2, ... 512-M or strips 502-1, 502-2, ..., 502-N of data to After the on-chip memory 205, the display module 203 can be notified of a predetermined number of strips 512-1, 512-2,... 512-M or strips 502-1, 502-2,..., 502-N via the communication module 207. The data has been decoded, and the display module 203 is informed of the storage address of these data. In this way, the display module 203 reads the stripes 512-1, 512-2, ..., 512-M or strips 502-1, 502-2, ..., 502-N in the on-chip memory 205 from the address. The data is then superimposed with the image frames of other layers and transmitted to the display of the terminal device 100 for display. After the above reading step is completed, the video decoding module 202 can also be notified through the communication module 207, so that the video decoding module 202 can recycle the address to release the space on the on-chip memory 205 for subsequent decoding. Since the space of the on-chip memory 205 is usually very limited, excessive data cannot be stored. Using the method in the embodiment of the present disclosure, through direct communication between the video decoding module 202 and the display module 203, the space of the on-chip memory 205 can be released in time to ensure efficient data processing. As a result, the power consumption of the terminal device 100 can be further reduced.
在一些实施例中,条块或条带的预定数目可以是一个。这意味着,只要视频解码模块302写完一个条块或条带的数据到片上存储器205之后,便可以经由通信模块207通知显示模块203该条块或条带的数据已经解码完成,随后通过存储地址读取处于该条块或条带的数据以进行显示,并且一旦该条块或条带的读取结束之后,便会释放片上存储器205上的空间作为后续解码使用。这样可以使数据的处理更加高效。应该理解的是,根据对终端设备100的续航性能的要求,该预定数目还可以其他的数目,例如两个、三个,或者更多个。In some embodiments, the predetermined number of blocks or strips may be one. This means that as long as the video decoding module 302 writes the data of a block or strip to the on-chip memory 205, it can notify the display module 203 via the communication module 207 that the data of the block or strip has been decoded, and then store The address reads the data in the block or strip for display, and once the reading of the block or strip is completed, the space on the on-chip memory 205 is released for subsequent decoding. This makes data processing more efficient. It should be understood that, according to the requirements for the endurance performance of the terminal device 100, the predetermined number can also be other numbers, such as two, three, or more.
在一些实施例中,通信模块207可以是设置在视频解码模块202和显示模块203之间的直接的硬件连线或硬件调度加速器。In some embodiments, the communication module 207 may be a direct hardware connection or a hardware scheduling accelerator disposed between the video decoding module 202 and the display module 203 .
在一些实施例中,为了确保经过解码的图像帧能够准确高效地传递给显示模块203,可以通过同步信号来使显示模块203控制视频解码模块202的工作节奏,从而使视频解码模块202的工作节奏需要与显示模块203保持一致。举例来说,如果装置200的显示屏的刷新率为60帧每秒,则显示模块203每经过16.6毫秒(1000/60)就经由通信模块207通知视频解码模块202。此时,如果视频解码模块202所解码的视频为30帧每秒,则每当收到两个同步信号触发一次解码过程;如果视频解码模块202所解码的视频为60帧每秒,则每当收到一个同步信号就触发一次解码过程。利用这种方式,可以确保视频解码模块202与显示模块203之间的同步操作,从而确保视频能够被正确显示在装置200上。需要理解的是,这里的数值仅仅是示例性的,而非限制性的。In some embodiments, in order to ensure that the decoded image frames can be accurately and efficiently transmitted to the display module 203, the display module 203 can control the working rhythm of the video decoding module 202 through a synchronization signal, thereby adjusting the working rhythm of the video decoding module 202. Need to be consistent with display module 203. For example, if the refresh rate of the display screen of the device 200 is 60 frames per second, the display module 203 notifies the video decoding module 202 via the communication module 207 every 16.6 milliseconds (1000/60). At this time, if the video decoded by the video decoding module 202 is 30 frames per second, a decoding process is triggered every time two synchronization signals are received; if the video decoded by the video decoding module 202 is 60 frames per second, then every time Receiving a synchronization signal triggers a decoding process. In this manner, synchronous operations between the video decoding module 202 and the display module 203 can be ensured, thereby ensuring that the video can be correctly displayed on the device 200 . It should be understood that the numerical values here are only exemplary and not restrictive.
本文所描述的各个过程和处理,例如方法300,可由中央处理单元201执行。例如,在一些实施例中,方法300可被实现为计算机软件程序,其被有形地包含于机器可读介质中。在一些实施例中,计算机程序的部分或者全部可以经由只读存储器和/或通信单元而被载入和/或安装到电子设备300上。当计算机程序被加载到随机存储器并由中央处理单元301执行时,可以执行上文描述的方法300的一个或多个动作。Various processes and processes described herein, such as method 300, may be performed by central processing unit 201. For example, in some embodiments, method 300 may be implemented as a computer software program tangibly embodied in a machine-readable medium. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 300 via a read-only memory and/or communication unit. When a computer program is loaded into random access memory and executed by central processing unit 301, one or more actions of method 300 described above may be performed.
本公开可以是方法、装置、系统和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,计算机可读存储介质可以是上文描述的非易失性存储器208,其上载有用于执行本公开的各个方面的计算机可读程序指令。The disclosure may be a method, apparatus, system and/or computer program product. The computer program product may include a computer-readable storage medium, which may be the non-volatile memory 208 described above, having thereon computer-readable program instructions for performing various aspects of the disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是——但不限于——电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电 线传输的电信号。Computer-readable storage media may be tangible devices that can retain and store instructions for use by an instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or Flash memory), Static Random Access Memory (SRAM), Compact Disk Read Only Memory (CD-ROM), Digital Versatile Disk (DVD), Memory Stick, Floppy Disk, Mechanical Coding Device, such as a printer with instructions stored on it. Protruding structures in hole cards or grooves, and any suitable combination of the above. As used herein, computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or through electrical wires. transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to various computing/processing devices, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for performing operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source code or object code written in any combination of object-oriented programming languages - such as Smalltalk, C++, etc., and conventional procedural programming languages - such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server implement. In situations involving remote computers, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through the Internet). connect). In some embodiments, by utilizing state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can Computer readable program instructions are executed to implement various aspects of the disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理单元,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理单元执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine such that the instructions, when executed by a processing unit of the computer or other programmable data processing apparatus, , resulting in an apparatus that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium. These instructions cause the computer, programmable data processing device and/or other equipment to work in a specific manner. Therefore, the computer-readable medium storing the instructions includes An article of manufacture that includes instructions that implement aspects of the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operating steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executed on a computer, other programmable data processing apparatus, or other equipment to implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that embody one or more elements for implementing the specified logical function(s). Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts. , or can be implemented using a combination of specialized hardware and computer instructions.
相比于现有的方案,根据本公开的实现方式,将解码后不需要被参考的图像帧在线传输给显示模块203,而无需通过片外存储器206中转,能够达到降低终端设备100的功率消耗的目的。对于大部分的视频而言,由于需要节省网络传输带宽或者视频存储空间,因此通常都大量使用不被参考的帧。因此本公开的实施例具有很好的使用效果。随着不被参考的帧越多,本公开的实施例的功耗收益越大。Compared with existing solutions, according to the implementation of the present disclosure, image frames that do not need to be referenced after decoding are transmitted online to the display module 203 without being transferred through the off-chip memory 206, which can reduce the power consumption of the terminal device 100. the goal of. For most videos, due to the need to save network transmission bandwidth or video storage space, a large number of frames that are not referenced are usually used. Therefore, the embodiments of the present disclosure have good usage effects. As more frames are not referenced, the power consumption benefits of embodiments of the present disclosure are greater.
应该理解的是,根据本公开的实施例的方案还可以适用于需要多地址协同处理视频数据的场景,例如在摄影机的录像场景中的在线数据传输的方案,从而减少摄像机设备在录像场景下的功率消耗。It should be understood that the solutions according to the embodiments of the present disclosure can also be applied to scenarios that require multiple addresses to collaboratively process video data, such as online data transmission solutions in camera recording scenarios, thereby reducing camera equipment in recording scenarios. Power consumption.
还应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should also be understood that steps can be reordered, added, or removed using various forms of the process shown above. For example, each step described in the present disclosure can be executed in parallel, sequentially, or in a different order. As long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, there is no limitation here.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims (13)

  1. 一种处理视频的方法,所述方法包括:A method of processing video, the method includes:
    对所述视频的码流进行解析,确定表示至少一个图像帧是否被后续图像帧参考的信息;Analyze the code stream of the video to determine information indicating whether at least one image frame is referenced by a subsequent image frame;
    当所述信息表示所述至少一个图像帧不被所述后续图像帧参考,When the information indicates that the at least one image frame is not referenced by the subsequent image frame,
    对所述码流进行解码,以获得所述至少一个图像帧;以及Decode the code stream to obtain the at least one image frame; and
    在无需将所述至少一个图像帧存储至片外存储器的情况下,将所述至少一个图像帧传输至显示模块,以显示所述至少一个图像帧。Without storing the at least one image frame to an off-chip memory, the at least one image frame is transmitted to the display module to display the at least one image frame.
  2. 根据权利要求1所述的方法,还包括:The method of claim 1, further comprising:
    当所述信息表示至少一个图像帧被所述后续图像帧参考,when said information represents that at least one image frame is referenced by said subsequent image frame,
    对所述码流进行解码,以获得所述至少一个图像帧;Decode the code stream to obtain the at least one image frame;
    将所述至少一个图像帧传输至片外存储器;以及transmitting the at least one image frame to off-chip memory; and
    将所述至少一个图像帧从所述片外存储器读取至所述显示模块,以显示所述至少一个图像帧。The at least one image frame is read from the off-chip memory to the display module to display the at least one image frame.
  3. 根据权利要求1或2所述的方法,当所述信息表示所述至少一个图像帧不被所述后续图像帧参考,所述方法还包括:The method according to claim 1 or 2, when the information indicates that the at least one image frame is not referenced by the subsequent image frame, the method further includes:
    在对所述码流进行解码之前,对所述图像帧和音频进行预同步。Before decoding the code stream, the image frames and audio are pre-synchronized.
  4. 根据权利要求1至3中任一项所述的方法,A method according to any one of claims 1 to 3,
    在无需将所述至少一个图像帧存储至所述片外存储器的情况下,所述至少一个图像帧被存储在片上存储器。The at least one image frame is stored in the on-chip memory without storing the at least one image frame to the off-chip memory.
  5. 根据权利要求4所述的方法,其中所述图像帧以条块或者条带的形式被存储在所述片上存储器。The method of claim 4, wherein the image frames are stored in the on-chip memory in the form of blocks or strips.
  6. 根据权利要求2所述的方法,还包括:The method of claim 2, further comprising:
    在将所述图像帧存储至所述片外存储器之后,对所述图像帧和音频进行同步。After the image frame is stored in the off-chip memory, the image frame and audio are synchronized.
  7. 一种处理视频的装置,包括视频解码模块、显示模块和中央处理单元,其中所述中央处理单元被配置为实现以下操作:A device for processing video, including a video decoding module, a display module and a central processing unit, wherein the central processing unit is configured to implement the following operations:
    对所述视频的码流进行解析,确定表示至少一个图像帧是否被后续图像帧参考的信息;Analyze the code stream of the video to determine information indicating whether at least one image frame is referenced by a subsequent image frame;
    当所述信息表示所述至少一个图像帧不被所述后续图像帧参考,When the information indicates that the at least one image frame is not referenced by the subsequent image frame,
    对所述码流进行解码,以获得所述至少一个图像帧;以及Decode the code stream to obtain the at least one image frame; and
    在无需将所述至少一个图像帧存储至片外存储器的情况下,将所述至少一个图像帧传输至所述显示模块,以显示所述至少一个图像帧。Without storing the at least one image frame to an off-chip memory, the at least one image frame is transmitted to the display module to display the at least one image frame.
  8. 根据权利要求7所述的装置,还包括片外存储器,其中所述中央处理单元被配置为实现以下操作:The apparatus of claim 7, further comprising off-chip memory, wherein the central processing unit is configured to:
    当所述信息表示至少一个图像帧被所述后续图像帧参考,when said information represents that at least one image frame is referenced by said subsequent image frame,
    对所述码流进行解码,以获得所述至少一个图像帧;Decode the code stream to obtain the at least one image frame;
    将所述至少一个图像帧传输至所述片外存储器;以及transmitting the at least one image frame to the off-chip memory; and
    将所述至少一个图像帧从所述片外存储器读取至所述显示模块,以显示所述至少一个图像帧。The at least one image frame is read from the off-chip memory to the display module to display the at least one image frame.
  9. 根据权利要求7或8所述的装置,其中所述中央处理单元被配置为实现以下操作:当所述信息表示所述至少一个图像帧不被所述后续图像帧参考,在对所述码流进行解码之前, 对所述图像帧和音频进行预同步。The device according to claim 7 or 8, wherein the central processing unit is configured to implement the following operation: when the information indicates that the at least one image frame is not referenced by the subsequent image frame, in the code stream Before decoding, the image frames and audio are pre-synchronized.
  10. 根据权利要求7至9中任一项所述的装置,还包括片上存储器,其中所述中央处理单元被配置为实现以下操作:The apparatus of any one of claims 7 to 9, further comprising on-chip memory, wherein the central processing unit is configured to:
    在无需将所述至少一个图像帧存储至所述片外存储器的情况下,所述至少一个图像帧被存储在所述片上存储器。The at least one image frame is stored in the on-chip memory without storing the at least one image frame to the off-chip memory.
  11. 根据权利要求10所述的装置,其中所述图像帧以条块或者条带的形式被存储在所述片上存储器。The apparatus of claim 10, wherein the image frames are stored in the on-chip memory in the form of blocks or strips.
  12. 根据权利要求8所述的装置,其中所述中央处理单元被配置为实现以下操作:The apparatus of claim 8, wherein the central processing unit is configured to:
    在将所述图像帧存储至所述片外存储器之后,对所述图像帧和音频进行同步。After the image frame is stored in the off-chip memory, the image frame and audio are synchronized.
  13. 一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现根据权利要求1至6中任一项所述的方法。A computer-readable storage medium having a computer program stored thereon, which implements the method according to any one of claims 1 to 6 when executed by a processor.
PCT/CN2022/102965 2022-06-30 2022-06-30 Video processing method and apparatus and computer readable storage medium WO2024000463A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/102965 WO2024000463A1 (en) 2022-06-30 2022-06-30 Video processing method and apparatus and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/102965 WO2024000463A1 (en) 2022-06-30 2022-06-30 Video processing method and apparatus and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2024000463A1 true WO2024000463A1 (en) 2024-01-04

Family

ID=89383763

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/102965 WO2024000463A1 (en) 2022-06-30 2022-06-30 Video processing method and apparatus and computer readable storage medium

Country Status (1)

Country Link
WO (1) WO2024000463A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050018909A1 (en) * 2003-07-21 2005-01-27 International Business Machines Corporation Power-aware on-chip memory management for video coding algorithms
US20170150159A1 (en) * 2015-11-20 2017-05-25 Intel Corporation Method and system of reference frame caching for video coding
CN107667528A (en) * 2015-06-30 2018-02-06 英特尔公司 Method and system for the adaptive reference frame buffer of coding and decoding video
CN107846597A (en) * 2016-09-20 2018-03-27 上海澜至半导体有限公司 Data cache method and device for Video Decoder
CN107925777A (en) * 2015-08-31 2018-04-17 英特尔公司 The method and system that frame for video coding is resequenced

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050018909A1 (en) * 2003-07-21 2005-01-27 International Business Machines Corporation Power-aware on-chip memory management for video coding algorithms
CN107667528A (en) * 2015-06-30 2018-02-06 英特尔公司 Method and system for the adaptive reference frame buffer of coding and decoding video
CN107925777A (en) * 2015-08-31 2018-04-17 英特尔公司 The method and system that frame for video coding is resequenced
US20170150159A1 (en) * 2015-11-20 2017-05-25 Intel Corporation Method and system of reference frame caching for video coding
CN107846597A (en) * 2016-09-20 2018-03-27 上海澜至半导体有限公司 Data cache method and device for Video Decoder

Similar Documents

Publication Publication Date Title
US9179118B2 (en) Techniques for synchronization of audio and video
US10509588B2 (en) System and method for controlling memory frequency using feed-forward compression statistics
US9247157B2 (en) Audio and video data multiplexing for multimedia stream switch
US20140192136A1 (en) Video chatting method and system
EP3697088A1 (en) Video sending and receiving method, device, and terminal
US11356739B2 (en) Video playback method, terminal apparatus, and storage medium
WO2018086303A1 (en) Advertisement inter-cut method and device, and readable storage medium
US9888247B2 (en) Video coding using region of interest to omit skipped block information
CN106131550A (en) Play the method and device of multimedia file
US20140293135A1 (en) Power save for audio/video transmissions over wired interface
CN106231225A (en) A kind of network hard disk video recorder data processing method and system
US9832521B2 (en) Latency and efficiency for remote display of non-media content
CN104053002A (en) Video decoding method and device
CN104184980A (en) Data processing method and electronic device
WO2024000463A1 (en) Video processing method and apparatus and computer readable storage medium
US9729919B2 (en) Remultiplexing bitstreams of encoded video for video playback
US20180034749A1 (en) System and method for distributing and replaying trigger packets via a variable latency bus interconnect
US10356439B2 (en) Flexible frame referencing for display transport
CN111416994B (en) Method and device for synchronously presenting video stream and tracking information and electronic equipment
CN108989905B (en) Media stream control method and device, computing equipment and storage medium
An et al. Image link through adaptive encoding data base and optimized GPU algorithm for real-time image processing of artificial intelligence
Jiang et al. A new abstraction for internet qoe optimization
US10025550B2 (en) Fast keyboard for screen mirroring
US20240048727A1 (en) Method and system of low latency video coding with interactive applications
US11843727B2 (en) Network device, system and method for video content processing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22948566

Country of ref document: EP

Kind code of ref document: A1