CN109495742B - Video frame coding method, device and equipment - Google Patents
Video frame coding method, device and equipment Download PDFInfo
- Publication number
- CN109495742B CN109495742B CN201811528004.1A CN201811528004A CN109495742B CN 109495742 B CN109495742 B CN 109495742B CN 201811528004 A CN201811528004 A CN 201811528004A CN 109495742 B CN109495742 B CN 109495742B
- Authority
- CN
- China
- Prior art keywords
- frame
- prediction
- video
- prediction mode
- coded
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a video frame coding method, which comprises the following steps: after receiving the pre-analysis instruction, sampling a frame to be coded in the video to be compressed to obtain a down-sampling frame, pre-analyzing the down-sampling frame to obtain a prediction mode of the down-sampling frame, and storing the prediction mode; after receiving an actual coding instruction, calling a prediction mode corresponding to the frame to be coded from the stored prediction modes to predict the frame to be coded; and after the prediction operation of all frames to be encoded in the video to be compressed is completed, carrying out subsequent encoding operation according to a prediction result to obtain video compression data of the video to be compressed. The invention directly utilizes the prediction mode obtained in the pre-analysis process in the actual coding stage to improve the utilization rate of computing resources and the coding efficiency. The invention also discloses a device, equipment and a computer readable storage medium based on the method.
Description
Technical Field
The invention relates to the technical field of video compression, in particular to a video frame coding method. The invention also relates to a video frame coding device, equipment and a computer readable storage medium.
Background
h.264/AVC is currently the most widely used video compression format. The main means of video compression is to remove intra-or inter-frame redundant information by prediction. Prediction is one of the core technologies of video compression, and accordingly, two prediction modes of video compression are intra-frame prediction and inter-frame prediction. The intra prediction of h.264 supports 4x4, 8x8, 16x16, etc. sizes, and supports intra prediction of luminance and chrominance.
The pre-analysis is a processing module of an approximate coding process commonly adopted by the current h.264 encoder, for example, the most well-known open source h.264 encoder x264 realizes a pre-analysis function called as a look head, and aims to perform downsampling on a video to be coded before actual coding, and then perform analog analysis on a downsampled frame, so as to obtain complexity and the like of the downsampled frame; the pre-analysis process comprises the functions of frame type judgment, self-adaptive quantization AQ, mbtree, reduced 8x8 intra-frame prediction, reduced ME and the like. From the above, x264 achieves reduced 8x8 intra prediction in the lookahead section. After the pre-analysis is completed, the encoder starts an actual encoding process, and in the process, operations such as intra-frame prediction and the like are performed again to determine the mode of intra-frame prediction, so that the calculation process is complex, and the encoding efficiency is low.
Therefore, how to provide a video frame coding scheme with high coding efficiency is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a video frame coding method, which directly utilizes a prediction mode obtained in a pre-analysis process in an actual coding stage to improve the utilization rate of computing resources and the coding efficiency; it is another object of the present invention to provide an apparatus, a device and a computer readable storage medium based on the above method.
In order to solve the above technical problems, the present invention provides a video frame encoding method, including:
after receiving a pre-analysis instruction, sampling a frame to be coded in a video to be compressed to obtain a down-sampling frame, pre-analyzing the down-sampling frame to obtain a prediction mode of the down-sampling frame, and storing the prediction mode;
after receiving an actual coding instruction, calling a prediction mode corresponding to the frame to be coded from the stored prediction modes to predict the frame to be coded;
and after the prediction operation of all frames to be encoded in the video to be compressed is completed, carrying out subsequent encoding operation according to a prediction result to obtain video compression data of the video to be compressed.
Preferably, the obtained prediction mode of the downsampled frame is stored in a data structure of a frame to be encoded corresponding to the downsampled frame.
Preferably, the obtained prediction mode of the downsampled frame and the identification of the frame to be coded corresponding to the downsampled frame are correspondingly stored in a prediction mode list.
Preferably, the prediction mode includes a mode of intra prediction.
Preferably, the prediction modes include a mode of intra prediction and a mode of inter prediction.
Preferably, the downsampled frame is divided in an 8×8 block division.
In order to solve the above technical problem, the present invention further provides a video frame encoding device, including:
the pre-analysis module is used for sampling a frame to be coded in the video to be compressed to obtain a down-sampling frame after receiving a pre-analysis instruction, pre-analyzing the down-sampling frame to obtain a prediction mode of the down-sampling frame and storing the prediction mode;
the prediction coding module is used for calling a prediction mode corresponding to the frame to be coded from the stored prediction modes to predict the frame to be coded after receiving the actual coding instruction;
and the subsequent encoding module is used for carrying out subsequent encoding operation according to a prediction result after finishing the prediction operation of all frames to be encoded in the video to be compressed, so as to obtain video compression data of the video to be compressed.
In order to solve the above technical problem, the present invention further provides a video frame encoding apparatus, which includes a memory and a processor, wherein the memory stores a video frame encoding program that can be executed on the processor, and the video frame encoding program when executed by the processor implements the video frame encoding method according to any one of the above.
Preferably, the device is a node constituting a content delivery network CDN network or a blockchain network.
To solve the above technical problem, the present invention also provides a computer-readable storage medium having stored thereon a video frame encoding program executable by one or more processors to implement the video frame encoding method as described in any one of the above.
The invention provides a video frame coding method, in the method, a prediction mode of each frame to be coded is obtained in the pre-analysis process, then the prediction mode obtained in the pre-analysis process is directly used for predicting each frame to be coded in the actual coding process, and the subsequent coding operation is carried out after the prediction is completed, so as to obtain video compression data. Therefore, in the invention, in the actual encoding process, the prediction modes of each frame to be encoded obtained in the previous pre-analysis process are directly utilized, so that the calculation operation of the prediction modes is not needed to be performed again in the actual encoding process, the utilization efficiency of calculation resources is improved, the calculated amount in the actual encoding process is reduced, and the encoding efficiency is improved. The invention also provides a device, equipment and a computer readable storage medium based on the method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the prior art and the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a video frame encoding method according to the present invention;
fig. 2 is a schematic view of a 4×4 intra prediction luminance block and a prediction direction;
FIG. 3 is a schematic diagram of a 4×4 intra prediction mode;
FIG. 4 is a schematic diagram of a refinement flow of a pre-analysis process;
fig. 5 is a schematic structural diagram of a video frame encoding device according to the present invention.
Detailed Description
The core of the invention is to provide a video frame coding method, which directly utilizes the prediction mode obtained in the pre-analysis process in the actual coding stage to improve the utilization rate of computing resources and the coding efficiency; another core of the present invention is to provide an apparatus, a device and a computer readable storage medium based on the above method.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description of "first", "second", etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
The invention provides a video frame coding method, referring to fig. 1, fig. 1 is a flow chart of a process of the video frame coding method provided by the invention; the method comprises the following steps:
step s11: after receiving the pre-analysis instruction, sampling a frame to be coded in the video to be compressed to obtain a down-sampling frame, pre-analyzing the down-sampling frame to obtain a prediction mode of the down-sampling frame, and storing the prediction mode;
wherein, a sample sequence is sampled once by a plurality of sample values, thus obtaining a new sequence, namely downsampling of the original sequence, therefore, the volume of a downsampled frame is much smaller than that of the original frame, but the downsampled frame can keep the distribution characteristics of element points in the original frame as far as possible, and the picture content of the downsampled frame is basically the same as that of the original frame. By analyzing the downsampled frames approximate to the original frames in advance, some information based on the characteristics of the original frames, such as complexity, can be obtained in advance, and the subsequent use is convenient.
However, in the process of pre-analysis, although the prediction mode of the downsampled frame is also obtained, the prediction mode is not applied to the subsequent actual encoding process, so that the waste of computing resources is caused. Therefore, the invention stores the prediction modes of the obtained downsampled frames after the pre-analysis is completed, and directly uses the prediction modes for encoding during the subsequent actual encoding. Because the frames to be coded are basically the same as the frames to be coded, the correlation degree between the prediction mode calculated by the downsampled frames and the prediction process in the subsequent actual coding process is very high, so that the prediction mode calculated by the pre-analysis module is directly introduced into the prediction process of the subsequent actual coding, the utilization rate of calculation resources is improved, the prediction mode is not required to be calculated in the actual process, and the prediction process in the actual coding process is simplified.
Step s12: after receiving an actual coding instruction, calling a prediction mode corresponding to the frame to be coded from the stored prediction modes to predict the frame to be coded;
after receiving the actual encoding instruction, the method starts to actually encode the frame to be encoded in the video to be compressed.
It should be understood that the prediction modes are in units of macro blocks, and each frame to be encoded includes a plurality of macro blocks, and each macro block corresponds to one prediction mode. And the prediction mode called by each frame to be encoded is a prediction mode calculated by the downsampled frame corresponding to the frame to be encoded during pre-analysis.
Step s13: and after the prediction operation of all frames to be encoded in the video to be compressed is completed, carrying out subsequent encoding operation according to a prediction result to obtain video compression data of the video to be compressed.
In the video frame coding method provided by the invention, in the pre-analysis process, the prediction mode of each frame to be coded is obtained, and then, in the actual coding process, the prediction mode obtained in the pre-analysis process is directly used for predicting each frame to be coded. Therefore, in the invention, in the actual encoding process, the prediction mode of each frame to be encoded obtained in the previous pre-analysis process is directly utilized, and the mode of calculating the result by the prediction mode of the multiplexing pre-analysis module ensures that the calculation operation of the prediction mode is not needed to be carried out again in the actual encoding process, thereby not only improving the utilization efficiency of calculation resources, but also reducing the calculation amount in the actual encoding process and improving the encoding efficiency.
It can be understood that, because of the front-to-back correlation between the continuous pixels in a frame of image, image prediction can be performed by adopting a prediction coding mode, and the output after prediction coding is not the original pixel value but the difference between the predicted value and the actual value of the pixel. Predictive coding is designed so that, due to the correlation between the adjacent pixels, a large number of identical or similar phenomena exist, and by calculating the difference value, a large number of data volumes for storing and transmitting the values of the original pixels can be reduced. The prediction coding comprises inter-frame prediction and intra-frame prediction, wherein the intra-frame prediction refers to comparison among pixel points in the same frame of image, and finally output coding is obtained according to the difference value; inter-frame prediction refers to the comparison of pixels between successive different frames, from which the final output code is derived. In addition, the intra prediction includes two parts of luminance and chrominance, and although the luminance and chrominance are different in size, the principle of the intra prediction is consistent. The present invention is directed to intra prediction of luminance.
Specifically, the prediction mode in the present invention refers to whether intra prediction or inter prediction should be adopted for one image frame, and what kind of intra prediction mode is specifically adopted for each macroblock in intra prediction. In the following, the 4x4 intra prediction is taken as an example, and the 8x8 and 16x16 intra prediction processes are basically the same as above, and will not be described further. The implementation principle of intra prediction is as follows:
referring to fig. 2 and 3, fig. 3 is a schematic view of a 4×4 intra prediction mode.
A frame image is divided into a plurality of macro blocks, and for a 4x4 mode, that is, the luminance component of each macro block in the frame image is divided into 4x4 luminance points (that is, 16 luminance points), each macro block is used as a basic unit of intra prediction, and prediction and encoding are performed for each macro block. Intra prediction constructs prediction data with reference to neighboring pixels of each pixel. For a certain 4×4 macroblock, the top 4, left 4 and top left vertex 1 pixels of the macroblock, a total of 13 pixels will be used as reference pixels to construct the prediction block (i.e., the macroblock to be predicted). The position relation between the predicted block and the reference pixel is shown in fig. 2, and fig. 2 is a schematic diagram of 4×4 intra-frame predicted luminance block and prediction direction; in FIG. 2, a-p represent pixels in a prediction block, A/B/C/D represent upper reference pixels, E/F/G/H represent upper right reference pixels, I/J/K/L represent left reference pixels, and Q represents upper left reference pixels. For intra prediction of 4x4 luma components, a total of 9 different prediction modes are defined. The directional descriptions of the other 8 modes, except the DC mode, are shown in table 1, fig. 2 (b) and fig. 3, where the directions refer to: in this mode, the predicted value of the pixel in each prediction block is predicted from the values of the pixels adjacent in the direction. In DC mode, the average of the upper and left neighboring pixels represents the prediction value of the entire prediction block.
Directional description of intra prediction modes of Table 1H.264
Preferably, in step s11, the prediction mode of the obtained downsampled frame is stored in a data structure of a frame to be encoded corresponding to the downsampled frame.
It can be understood that each downsampled frame corresponds to a frame to be encoded one by one, so that the prediction modes of the downsampled frames obtained in the pre-analysis process also correspond to the frames to be encoded one by one respectively. In order to facilitate the call of these prediction modes in the subsequent actual encoding process, in this embodiment, the obtained prediction mode of each downsampled frame is stored in the data structure of the frame to be encoded corresponding to the downsampled frame, so that when the subsequent frames to be encoded are actually encoded, the prediction modes stored before can be directly obtained from the data structure of the subsequent frames to be encoded to perform prediction encoding, thereby ensuring the accuracy of the call of the prediction modes and the call speed of the prediction modes. Here, storing in the data structure of the frame to be encoded may refer to storing in a storage location bound to the frame to be encoded, and the present invention is not limited to the storage location referred to by the data structure of the frame to be encoded.
In another preferred embodiment, in step s11, the prediction mode of the obtained downsampled frame and the identifier of the frame to be encoded corresponding to the downsampled frame are correspondingly stored in the prediction mode list.
It can be understood that in this embodiment, a preset mode list is set, where an identifier of each frame to be encoded is stored in the list, and when a prediction mode of a downsampled frame is obtained by pre-analysis, the prediction mode may be stored to a position corresponding to the identifier of the corresponding frame to be encoded in the list. Alternatively, instead of storing the identification of the frame to be encoded in the list in advance, when the prediction mode of the downsampled frame is calculated, the prediction mode and the identification of the frame to be encoded corresponding to the prediction mode may be stored in the list in a unified manner. In this way, the prediction modes can be uniformly managed and stored, so that the storage space is conveniently allocated for storing the prediction modes, and the follow-up staff can conveniently trace back the history prediction mode record.
In addition, when the prediction mode is stored, the obtained prediction mode can be firstly cached, and the prediction modes of all downsampled frames can be uniformly stored after the calculation is completed; or, the prediction mode of one downsampled frame may be obtained, and then stored immediately, and then the prediction mode of the next downsampled frame is calculated. The mode is not limited by the invention.
The main functions of the pre-analysis are calculating the complexity of the downsampled frames, realizing the decision of the frame types, the mbtree, etc. Referring to fig. 4, fig. 4 is a schematic diagram of a refinement flow chart of a pre-analysis process; the main principle of the realization is as follows:
step s21: downsampling an input original frame to obtain a downsampled frame;
step s22: dividing the downsampled frame into 8x8 blocks, wherein each 8x8 block corresponds to a 16x16 macro block in the original frame; of course, a 4x4 block size division is also possible, and the invention is not limited in this regard.
Step s23: calculating the cost of downsampling frames in each mode; if the downsampled frame is an I frame, calculating the cost of each 8x8 block contained in the downsampled frame in different intra-frame modes; if the downsampled frame is P, B frames, calculating the cost of each 8x8 block contained in the downsampled frame in different intra-frame modes, and performing a Motion Estimation (ME) process to calculate the cost of each 8x8 block contained in the downsampled frame in different inter-frame modes;
the cost refers to distortion cost, namely, the distortion rate after adopting a predictive coding mode under each frame mode; the cost of the downsampling frame in each mode is equal to the sum of the costs of all 8x8 blocks contained in the downsampling frame, and the cost of the complete downsampling frame is formed;
step s24: and selecting a mode with the minimum cost from the calculated cost as the prediction type of the original frame corresponding to the subsequent downsampled frame in the actual encoding process.
For example, when calculating the cost of intra prediction, the distortion rate between the image restored by the final prediction coding obtained by the final calculation and the actual image is calculated in a simulation mode respectively under 9 intra prediction modes, wherein the distortion rate is the cost, and the larger the distortion rate is, the larger the cost is, which indicates that the effect of the prediction mode is worse, so that after the simulation calculation, the mode with the minimum cost is selected as the final prediction mode obtained by pre-analysis. Of course, inter prediction is the same process. In the comparison, since one of the costs of the inter prediction mode and the intra prediction mode is selected from all the calculated costs, the prediction mode selected by the final downsampled frame may be an intra prediction mode or an inter prediction mode. Because the video to be compressed contains a plurality of frames to be encoded, the prediction mode of the frames to be encoded in one video to be compressed is an intra-frame prediction mode, and the prediction mode of the frames to be encoded is an inter-frame prediction mode. That is, all the resulting frame prediction modes to be encoded may include both intra-frame prediction modes and inter-frame prediction modes, or may be intra-frame prediction modes, which is not limited in this invention.
Preferably, the downsampled frame is divided using an 8×8 block division.
It can be understood that if the downsampled frame is divided by 4×4 blocks, it is indicated that each 4×4 block corresponds to an 8×8 block in the frame to be encoded, and since the 8×8 block cannot cover the 16×16 block, when the frame to be encoded is actually encoded, if the frame to be encoded is divided by 16×16, the prediction mode in the pre-analysis process cannot be used, that is, when the frame to be encoded is actually encoded subsequently, only the 4×4 or 8×8 division mode can be supported, which results in less limitation. In this embodiment, if the downsampled frames are divided by 8×8 blocks, it is indicated that each 8×8 block corresponds to a 16×16 block in the frame to be encoded, that is, in the subsequent actual encoding process, the prediction mode of each downsampled frame may be applied in the 16×16 block in one frame to be encoded, and since the 16×16 block can cover three sizes of 4×4, 8×8 and 16×16 blocks, in the actual encoding process, three block division modes of 4×4, 8×8 and 16×16 can be simultaneously supported, that is, the frame to be encoded may be configured as any one of 4×4, 8×8 and 16×16, thereby facilitating the macro block division process of the frame to be encoded in the actual encoding process. Of course, the above is only a preferred embodiment, and the present invention is not limited to a specific block division method.
The invention also provides a video frame coding device, referring to fig. 5, fig. 5 is a schematic structural diagram of the video frame coding device provided by the invention. The device comprises:
the pre-analysis module 1 is used for sampling a frame to be coded in a video to be compressed to obtain a down-sampling frame after receiving a pre-analysis instruction, pre-analyzing the down-sampling frame to obtain a prediction mode of the down-sampling frame, and storing the prediction mode;
the prediction coding module 2 is used for calling a prediction mode corresponding to the frame to be coded from the stored prediction modes to predict the frame to be coded after receiving the actual coding instruction;
and the subsequent encoding module 3 is used for performing subsequent encoding operation according to the prediction result after the prediction operation of all frames to be encoded in the video to be compressed is completed, so as to obtain video compression data of the video to be compressed.
The above modules may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The invention also provides a video frame coding device comprising a memory and a processor, the memory storing a video frame coding program executable on the processor, the video frame coding program when executed by the processor implementing a video frame coding method as defined in any one of the above.
The video frame encoding device may include a memory, a processor, and a bus.
Wherein the memory comprises at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory may in some embodiments be an internal storage unit of the video frame encoding device, such as a hard disk of the video frame encoding device. The memory may in other embodiments also be an external storage device of the device, such as a plug-in hard disk provided on the video frame coding device, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like. Further, the memory may also include both an internal storage unit and an external storage device of the video frame encoding device. The memory may be used not only for storing application software installed in the video frame encoding apparatus and various types of data, such as codes of video frame encoding programs, but also for temporarily storing data that has been output or is to be output.
The processor may in some embodiments be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for running program code or processing data stored in the memory, e.g. executing video frame encoding programs or the like.
The bus is used for connecting the processor and the memory, and the bus may be a peripheral component interconnect standard (peripheral component interconnect, abbreviated as PCI) bus or an extended industry standard architecture (extended industry standard architecture, abbreviated as EISA) bus, etc. The bus may be classified as an address bus, a data bus, a control bus, etc.
Further, the video frame encoding apparatus may further include a network interface for receiving an input video to be compressed, outputting compressed video data, and the like. The network interface herein may optionally include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the device and other electronic devices.
Optionally, the device may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the video frame encoding device and for displaying a visual user interface.
In this embodiment, the video frame encoding device may be a PC (Personal Computer ), or may be a terminal device such as a smart phone, a tablet computer, a palm computer, or a portable computer. Preferably, the device is a node constituting a content delivery network CDN network or a blockchain network.
The present invention also provides a computer-readable storage medium having stored thereon a video frame encoding program executable by one or more processors to implement a video frame encoding method as in any of the above.
The modules in the video frame coding apparatus provided in the present invention may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a separate product. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The invention also provides a computer program product comprising computer instructions which, when run on a computer, cause the computer to perform the video frame encoding method of any of the above.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device and computer readable storage medium described above may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device, and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical or other form.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (8)
1. A video frame encoding method, applied to an h.264 encoder, comprising:
after receiving a pre-analysis instruction, sampling a frame to be coded in a video to be compressed to obtain a down-sampling frame, pre-analyzing the down-sampling frame to obtain a prediction mode of the down-sampling frame, and storing the prediction mode;
after receiving an actual coding instruction, calling a prediction mode corresponding to the frame to be coded from the stored prediction modes to predict the frame to be coded;
after the prediction operation of all frames to be encoded in the video to be compressed is completed, carrying out subsequent encoding operation according to a prediction result to obtain video compression data of the video to be compressed;
wherein the prediction modes include a plurality of modes of intra prediction and a plurality of modes of inter prediction.
2. The video frame coding method according to claim 1, wherein the obtained prediction mode of the downsampled frame is stored in a data structure of a frame to be coded corresponding to the downsampled frame.
3. The video frame coding method according to claim 1, wherein the obtained prediction mode of the downsampled frame and the identification of the frame to be coded corresponding to the downsampled frame are stored correspondingly in a prediction mode list.
4. The video frame coding method of claim 1, wherein the downsampled frames are partitioned using an 8x8 block partition.
5. A video frame encoding apparatus for use with an h.264 encoder, comprising:
the pre-analysis module is used for sampling a frame to be coded in the video to be compressed to obtain a down-sampling frame after receiving a pre-analysis instruction, pre-analyzing the down-sampling frame to obtain a prediction mode of the down-sampling frame and storing the prediction mode;
the prediction coding module is used for calling a prediction mode corresponding to the frame to be coded from the stored prediction modes to predict the frame to be coded after receiving the actual coding instruction;
the subsequent encoding module is used for performing subsequent encoding operation according to a prediction result after finishing the prediction operation of all frames to be encoded in the video to be compressed, so as to obtain video compression data of the video to be compressed;
wherein the prediction modes include a plurality of modes of intra prediction and a plurality of modes of inter prediction.
6. A video frame encoding device comprising a memory and a processor, the memory having stored thereon a video frame encoding program executable on the processor, the video frame encoding program when executed by the processor implementing the video frame encoding method of any of claims 1-4.
7. The video frame coding device of claim 6, wherein the device is a node that forms a content delivery network, CDN, network or a blockchain network.
8. A computer-readable storage medium having stored thereon a video frame encoding program executable by one or more processors to implement the video frame encoding method of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811528004.1A CN109495742B (en) | 2018-12-13 | 2018-12-13 | Video frame coding method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811528004.1A CN109495742B (en) | 2018-12-13 | 2018-12-13 | Video frame coding method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109495742A CN109495742A (en) | 2019-03-19 |
CN109495742B true CN109495742B (en) | 2023-05-12 |
Family
ID=65710094
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811528004.1A Active CN109495742B (en) | 2018-12-13 | 2018-12-13 | Video frame coding method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109495742B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109640081B (en) * | 2019-02-14 | 2023-07-14 | 深圳市网心科技有限公司 | Intra-frame prediction method, encoder, electronic device and readable storage medium |
CN113301340A (en) * | 2020-09-29 | 2021-08-24 | 阿里巴巴集团控股有限公司 | Encoding parameter determination method, video transmission method and device |
CN116962686A (en) * | 2022-04-15 | 2023-10-27 | 维沃移动通信有限公司 | Inter-frame prediction method and terminal |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103517080A (en) * | 2012-06-21 | 2014-01-15 | 北京数码视讯科技股份有限公司 | Real-time video stream encoder and real-time video stream encoding method |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020196854A1 (en) * | 2001-06-15 | 2002-12-26 | Jongil Kim | Fast video encoder using adaptive hierarchical video processing in a down-sampled domain |
KR100689215B1 (en) * | 2005-04-18 | 2007-03-09 | 동국대학교 산학협력단 | Fast Prediction Mode Decision Method Using Down Sampling and Edge Direction for H.264 |
US8934544B1 (en) * | 2011-10-17 | 2015-01-13 | Google Inc. | Efficient motion estimation in hierarchical structure |
CN104754338A (en) * | 2014-12-30 | 2015-07-01 | 北京奇艺世纪科技有限公司 | Selection method and device for intra-frame predication mode |
US10187655B2 (en) * | 2015-09-30 | 2019-01-22 | Apple Inc. | Memory-to-memory low resolution motion estimation systems and methods |
-
2018
- 2018-12-13 CN CN201811528004.1A patent/CN109495742B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103517080A (en) * | 2012-06-21 | 2014-01-15 | 北京数码视讯科技股份有限公司 | Real-time video stream encoder and real-time video stream encoding method |
Also Published As
Publication number | Publication date |
---|---|
CN109495742A (en) | 2019-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6843239B2 (en) | Method and device for specifying the depth of the coding unit | |
CN109495742B (en) | Video frame coding method, device and equipment | |
US10455229B2 (en) | Prediction mode selection method, apparatus and device | |
CN106961603B (en) | Intracoded frame code rate allocation method and device | |
CN105163127A (en) | Video analysis method and device | |
CN104363450A (en) | Intra-frame coding mode decision-making method and device | |
WO2023045420A1 (en) | Image processing method and apparatus, electronic device, and storage medium | |
JP2021513234A (en) | Video coding methods, computer equipment, and storage media | |
CN106961629B (en) | Video decoding method and device | |
JP7046219B2 (en) | Video coding methods, video coding equipment, electronic devices and computer programs | |
JP2013520124A (en) | Coding structure | |
CN109429064A (en) | A kind of method and apparatus handling video data | |
CN110278443A (en) | The context modeling method and device of division symbolizing position | |
CN109640087A (en) | A kind of intra prediction mode decision method, device and equipment | |
CN111654696B (en) | Intra-frame multi-reference-line prediction method and device, storage medium and terminal | |
JP2021514158A (en) | Video frame coding unit division method, equipment, storage medium and electronic equipment | |
CN113489976A (en) | Predictive coding method and device and electronic equipment | |
CN105100799A (en) | Method for reducing intraframe coding time delay in HEVC encoder | |
CN109493304A (en) | A kind of image processing method and device | |
CN109587502B (en) | Method, device, equipment and computer readable storage medium for intra-frame compression | |
CN115442617A (en) | Video processing method and device based on video coding | |
CN112738522A (en) | Video coding method and device | |
CN116980616A (en) | Mode decision scheduling method and related device | |
CN115917611B (en) | Method and system for video encoding and decoding using reference region | |
CN113066139B (en) | Picture processing method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |