Method, device, equipment and storage medium for realizing continuous encoding of image data
By adopting different encoding methods for uncompressed and compressed data in the embedded system, the programmable encoding control unit is used to reduce the CPU load, solve the problem of high CPU load when encoding and compressed data, and improve the encoding efficiency.
Patent Information
- Application Number
- CN202510109558.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-23
AI Technical Summary
In an embedded system, when encoding compressed data, the image decompression unit needs to be configured by the CPU, resulting in the programmable encoding control unit being unable to perform continuous encoding control, which increases the CPU load and reduces the encoding efficiency.
By determining whether the image data is compressed data, the non-compressed data is encoded by continuous encoding, and the compressed data is encoded by non-continuous encoding. The continuous encoding method is controlled by the programmable encoding control unit based on the encoder configuration information obtained by the CPU, while the non-continuous encoding method is controlled by the programmable encoding control unit based on the encoder configuration information obtained by the CPU after configuring the image decompression unit.
When encoding and compressed data, the programmable encoding control unit reduces the load on the CPU, improves the encoding efficiency, and realizes the coding control unit to complete the encoding of one frame of image data.
Smart Images

Figure CN119562055B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image data processing, and in particular to a method, device, equipment and storage medium for implementing continuous encoding of image data. Background Art
[0002] The VPU (Video Processing Unit) encoder in the embedded system can encode the original YUV / RGB data and generate H.264 (a digital video compression format) or HEVC (High Efficiency Video Coding) data after encoding. In the embedded system, there are both original YUV / RGB data and compressed YUV / RGB data, and the compressed YUV / RGB data needs to be decompressed before encoding before it can be used by the VPU encoder. YUV is a color encoding method that uses Y to represent brightness and U and V to represent chrominance. RGB is a color space based on the three basic colors of R (Red), G (Green), and B (Blue).
[0003] There is a programmable encoding control unit inside the VPU, which can control the encoder to perform continuous encoding operations without the need for the CPU (Central Processing Unit) to directly control the encoder. However, the input data to be controlled must be uncompressed image data (i.e., original YUV / RGB data). There is an image decompression unit outside the VPU, which is used to decompress the compressed YUV / RGB data. Only after decompression can it be encoded by the VPU operation. The image decompression unit needs to be configured once for each frame of image decompression. Since the image decompression unit is located outside the VPU, the programmable encoding control unit cannot directly control the image decompression unit, and the image decompression unit can only be controlled by the CPU.
[0004] When there is coded compressed image data in an embedded system, the programmable coding control unit cannot perform continuous coding control due to the characteristic that each frame of the image decompression unit requires the CPU to configure, because the data source of the encoder must be generated by the image decompression unit, which causes the encoder to be controlled by the CPU to ensure the sequential operation of the image decompression unit and the encoder. Although the programmable coding control unit can effectively reduce the CPU load when controlling continuous coding, the continuous coding mechanism cannot be used when encoding compressed data frames, and the image decompression unit and the encoder must be directly controlled by the CPU to encode. This method makes it impossible to use the programmable coding control unit to improve the coding efficiency. Therefore, how to use the programmable coding control unit to reduce the CPU load and improve the coding efficiency when encoding compressed data has become a problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a method, device, equipment and storage medium for realizing continuous encoding of image data, so that a programmable encoding control unit can be used to reduce the load of the CPU and improve the encoding efficiency when encoding compressed data.
[0006] In a first aspect, an embodiment of the present application provides a method for implementing continuous encoding of image data, the method for implementing continuous encoding of image data comprising:
[0007] The image data to be encoded is obtained in sequence, according to the type of the image data obtained:
[0008] If the current image data is uncompressed image data, the encoding operation is performed based on a continuous encoding method;
[0009] If the current image data is compressed image data, the encoding operation is performed based on a discontinuous encoding method;
[0010] Among them, the continuous encoding method is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained by the CPU, and the discontinuous encoding method is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained after the CPU configures the image decompression unit.
[0011] In combination with the first aspect, in one implementation, the continuous encoding method includes encoding for continuous non-compressed image data and encoding for single non-compressed image data.
[0012] In combination with the first aspect, in one implementation, when encoding is performed on continuous non-compressed image data:
[0013] For the CPU, the CPU sequentially acquires the encoder configuration information corresponding to each frame of non-compressed image data, and sends the encoder configuration information corresponding to each frame of non-compressed image data to the programmable encoding control unit after acquiring the encoder configuration information corresponding to each frame of non-compressed image data;
[0014] For the programmable coding control unit, the programmable coding control unit uses the encoder configuration information to configure the encoder according to the order in which the encoder configuration information is received, and controls the encoder to encode the corresponding non-compressed image data. After encoding the non-compressed image data corresponding to the current encoder configuration information is completed, the encoder is configured using the next encoder configuration information, and the encoder is controlled to encode the non-compressed image data corresponding to the next encoder configuration information.
[0015] In combination with the first aspect, in one implementation, when encoding is performed on a single non-compressed image data:
[0016] The CPU obtains the encoder configuration information corresponding to the current uncompressed image data and sends it to the programmable encoding control unit;
[0017] The programmable encoding control unit configures the encoder based on the encoder configuration information corresponding to the current non-compressed image data, and controls the encoder to encode the current non-compressed image data.
[0018] In combination with the first aspect, in one implementation, the non-continuous encoding method is to perform encoding operations on single compressed image data in sequence.
[0019] In combination with the first aspect, in one implementation, for the discontinuous encoding mode, specifically:
[0020] The CPU obtains the encoder configuration information corresponding to the current compressed image data, and the CPU configures the image decompression unit;
[0021] The CPU sends the encoder configuration information corresponding to the currently compressed image data to the programmable encoding control unit;
[0022] The programmable encoding control unit configures the encoder based on the encoder configuration information corresponding to the current uncompressed image data;
[0023] The image decompression unit performs a decompression operation on the current non-compressed image data, and the programmable encoding control unit controls the encoder to encode the data obtained after decompression.
[0024] In a second aspect, an embodiment of the present application provides a device for implementing continuous encoding of image data, the device for implementing continuous encoding of image data comprising:
[0025] An acquisition module, which is used to sequentially acquire image data to be encoded, and according to the type of the acquired image data, if the current image data is uncompressed image data, drive the first execution module to work, and if the current image data is compressed image data, drive the second execution module to work;
[0026] A first execution module, which is used to perform an encoding operation on current image data based on a continuous encoding method;
[0027] A second execution module, which is used to perform an encoding operation on the current image data based on a non-continuous encoding method;
[0028] Among them, the continuous encoding method is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained by the CPU, and the discontinuous encoding method is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained after the CPU configures the image decompression unit.
[0029] In combination with the second aspect, in one implementation, the continuous encoding method includes encoding for continuous non-compressed image data and encoding for single non-compressed image data.
[0030] In a third aspect, an embodiment of the present application provides a device for implementing continuous encoding of image data, wherein the device comprises a processor, a memory, and an image data continuous encoding implementation program stored in the memory and executable by the processor, wherein when the image data continuous encoding implementation program is executed by the processor, the steps of the above-mentioned image data continuous encoding implementation method are implemented.
[0031] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which is stored a program for implementing continuous encoding of image data. When the program for implementing continuous encoding of image data is executed by a processor, the steps of the above-mentioned method for implementing continuous encoding of image data are implemented.
[0032] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:
[0033] According to the type of image data to be encoded, continuous encoding and discontinuous encoding are used accordingly. The CPU controls the decompression of each frame of compressed image data by controlling the image decompression unit outside the encoding unit. The encoded frame information of the decompressed image data can be directly configured by the programmable encoding control unit for use by the encoder, thereby achieving the encoding of one frame of image data by working in collaboration with the encoding control unit. The programmable encoding control unit and the image decompression unit work in collaboration to distribute the encoding load on the CPU and the programmable encoding control unit, thereby reducing the load of the embedded system when only the CPU is used to control the encoding. When encoding compressed data, the programmable encoding control unit is used to reduce the load of the CPU and improve the encoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a flow chart of the method for implementing continuous encoding of image data in this application;
[0035] Figure 2 This is a logical architecture diagram corresponding to the method for implementing continuous encoding of image data in this application;
[0036] Figure 3 A schematic diagram of the functional modules of the device for implementing continuous encoding of image data of the present application;
[0037] Figure 4 This is a schematic diagram of the hardware structure of the device for implementing continuous encoding of image data in this application. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0040] In a first aspect, an embodiment of the present application provides a method for implementing continuous encoding of image data, which utilizes a programmable encoding control unit to reduce the load of the CPU and improve encoding efficiency when encoding compressed data.
[0041] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the method for implementing the continuous encoding of image data in this application. Figure 1 As shown, the method for implementing continuous encoding of image data includes:
[0042] S1: sequentially obtain the image data to be encoded, and according to the type of the obtained image data, if the current image data is uncompressed image data, go to S2, and if the current image data is compressed image data, go to S3;
[0043] S2: Perform encoding operation based on continuous encoding mode;
[0044] S3: Perform encoding operation based on a discontinuous encoding method;
[0045] Among them, the continuous encoding method is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained by the CPU, and the discontinuous encoding method is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained after the CPU configures the image decompression unit.
[0046] It should be noted that the continuous encoding method includes encoding for continuous non-compressed image data and encoding for single non-compressed image data. For example, a total of 5 frames of image data are included, of which the 1st to 3rd frames are non-compressed image data, the 4th frame is compressed image data, and the 5th frame is non-compressed image data. Then the 1st to 3rd frames of image data are encoded using the continuous encoding method, the 4th frame of image data is encoded using the non-continuous encoding method, and the 5th frame of image data is encoded using the continuous encoding method.
[0047] Furthermore, in a possible implementation, when encoding continuous uncompressed image data:
[0048] For the CPU, the CPU sequentially acquires the encoder configuration information corresponding to each frame of non-compressed image data, and sends the encoder configuration information corresponding to each frame of non-compressed image data to the programmable encoding control unit after acquiring the encoder configuration information corresponding to each frame of non-compressed image data;
[0049] For the programmable coding control unit, the programmable coding control unit uses the encoder configuration information to configure the encoder according to the order in which the encoder configuration information is received, and controls the encoder to encode the corresponding non-compressed image data. After encoding the non-compressed image data corresponding to the current encoder configuration information is completed, the encoder is configured using the next encoder configuration information, and the encoder is controlled to encode the non-compressed image data corresponding to the next encoder configuration information.
[0050] For example, a total of 5 frames of image data are included, among which the 1st to 3rd frames are all non-compressed image data. When encoding the 1st to 3rd frames of image data, for the CPU, the CPU obtains the encoder configuration information of one frame of non-compressed image data each time, that is, the encoding frame information, and sends the obtained encoder configuration information to the programmable encoding control unit, and then performs the encoder configuration information of the next frame of non-compressed image data, and then sends the encoder configuration information of the next frame of non-compressed image data to the programmable encoding control unit, and so on; for the programmable encoding control unit, after receiving the encoder configuration information, the programmable encoding control unit begins to configure the encoder using the current encoder configuration information according to the receiving order of the encoder configuration information, and then controls the encoder to encode the non-compressed image data corresponding to the current encoder configuration information, and then configures the encoder using the next encoder configuration information, and controls the encoder to encode the non-compressed image data corresponding to the next encoder configuration information, and so on, thereby realizing the encoding operation of the 1st to 3rd frames of non-compressed image data. Since the programmable encoding control unit no longer needs the participation of the CPU when configuring the encoder and controlling the encoding operation, continuous encoding can be realized.
[0051] Furthermore, in a possible implementation manner, when encoding is performed on a single non-compressed image data, specifically:
[0052] S221: The CPU obtains the encoder configuration information corresponding to the current uncompressed image data, and sends it to the programmable encoding control unit;
[0053] S222: The programmable encoding control unit configures the encoder based on the encoder configuration information corresponding to the current non-compressed image data, and controls the encoder to encode the current non-compressed image data.
[0054] For example, a total of 6 frames of image data are included, among which the 4th frame is compressed image data, the 5th frame is uncompressed image data, and the 6th frame is compressed image data. When encoding the 5th frame of image data, the CPU obtains the encoder configuration information corresponding to the 5th frame of uncompressed image data, and sends it to the programmable encoding control unit. The programmable encoding control unit configures the encoder based on the encoder configuration information corresponding to the 5th frame of uncompressed image data, and then controls the encoder to encode the 5th frame of uncompressed image data.
[0055] In the present application, the non-continuous encoding method is to perform encoding operations sequentially on a single compressed image data.
[0056] Further, in a possible implementation manner, for the discontinuous encoding mode, specifically:
[0057] S301: The CPU obtains encoder configuration information corresponding to the current compressed image data, and the CPU configures an image decompression unit;
[0058] S302: The CPU sends the obtained encoder configuration information corresponding to the current compressed image data to the programmable encoding control unit;
[0059] S303: The programmable encoding control unit configures the encoder based on the encoder configuration information corresponding to the current non-compressed image data;
[0060] S304: the image decompression unit performs a decompression operation on the current non-compressed image data, and the programmable encoding control unit controls the encoder to encode the decompressed data.
[0061] For example, a total of 6 frames of image data are included, among which the 3rd frame is uncompressed image data, the 4th frame is compressed image data, the 5th frame is compressed image data, and the 6th frame is uncompressed image data. When encoding the 4th and 5th frames of image data, the CPU obtains the encoder configuration information corresponding to the compressed image data of the 4th frame, and the CPU configures the image decompression unit. After the image decompression unit is configured, the CPU sends the encoder configuration information corresponding to the compressed image data of the 4th frame to the programmable encoding control unit. The programmable encoding control unit configures the encoder based on the encoder configuration information corresponding to the compressed image data of the 4th frame. The image decompression unit decompresses the compressed image data of the 4th frame. The programmable encoding The control unit controls the encoder to encode the data obtained after decompression, and completes the encoding of the compressed image data of the 4th frame. Then, the CPU obtains the encoder configuration information corresponding to the compressed image data of the 5th frame, and the CPU configures the image decompression unit accordingly again. After the configuration of the image decompression unit is completed, the CPU sends the encoder configuration information corresponding to the compressed image data of the 5th frame to the programmable encoding control unit. The programmable encoding control unit configures the encoder based on the encoder configuration information corresponding to the compressed image data of the 5th frame. The image decompression unit decompresses the compressed image data of the 5th frame. The programmable encoding control unit controls the encoder to encode the data obtained after decompression, and completes the encoding of the compressed image data of the 5th frame.
[0062] The logical architecture diagram corresponding to the method for implementing continuous encoding of image data in this application is shown in the figure below: Figure 2 As shown, there are compressed image data and uncompressed image data (i.e., original image data) in the embedded system. The uncompressed image data generated by the uncompressed image data generation source and the compressed image data generated by the compressed image data generation source are stored in DDR (double rate synchronous dynamic random access memory). The uncompressed image data can be directly read by the VPU and then encoded, and the compressed image data needs to be decompressed by the image decompression unit before it can be encoded by the VPU.
[0063] For continuous uncompressed image data, the CPU obtains the encoder configuration information corresponding to the current multiple frames of continuous uncompressed image data and passes it to the programmable encoding control unit. The programmable encoding control unit configures the encoder according to the encoder configuration information and encodes the current multiple frames of continuous uncompressed image data. The CPU is no longer required during the encoding process. For non-continuous uncompressed image data, the CPU obtains the encoder configuration information corresponding to the current uncompressed image data and passes it to the programmable encoding control unit. The programmable encoding control unit configures the encoder according to the encoder configuration information and encodes the current uncompressed image data.
[0064] When compressed image data exists in the image data stream to be encoded, the CPU needs to configure the image decompression unit and then send the acquired encoder configuration information to the programmable encoding control unit, which configures the encoder and performs encoding operations. Since each frame of compressed image data requires the participation of the CPU and continuous encoding operations cannot be performed, the non-continuous encoding method described in this application is used to encode the compressed image data.
[0065] It should be noted that VPU encoding works in a serial mode, that is, only one frame of image data can be encoded at the same time. When there are multiple channels of image data to be encoded in the embedded system (for example, there are two channels of encoded data, one for uncompressed image data and the other for compressed image data), the uncompressed image data and the compressed image data will enter the encoder alternately. When several consecutive frames to be encoded are all uncompressed image data, the continuous encoding method described above is used to encode the continuous uncompressed image data. When compressed image data appears, the discontinuous encoding method described above is used to encode a single compressed image data. This allows the encoder to perform continuous encoding when encoding continuous uncompressed image data, which improves the encoding efficiency compared to the method in which the CPU is reconfigured after each frame.
[0066] Furthermore, in a possible implementation, an image decompression unit is disposed inside the VPU, and the image decompression unit is configured by a programmable encoding control unit, which can also implement the method for continuous encoding of image data described in the present application.
[0067] The method for implementing continuous encoding of image data in the embodiment of the present application adopts a continuous encoding method and a discontinuous encoding method according to the type of image data to be encoded. The CPU controls the decompression of each frame of compressed image data by controlling the image decompression unit outside the encoding unit. The encoded frame information of the decompressed image data can be directly configured by the programmable encoding control unit to the encoder for use, thereby achieving the encoding of one frame of image data by working in collaboration with the encoding control unit. The programmable encoding control unit and the image decompression unit work in collaboration to distribute the encoding load on the CPU and the programmable encoding control unit, thereby reducing the load of the embedded system when only the CPU is used to control the encoding. When encoding compressed data, the programmable encoding control unit is used to reduce the load of the CPU and improve the encoding efficiency.
[0068] In a second aspect, an embodiment of the present application also provides a device for implementing continuous encoding of image data.
[0069] In one embodiment, referring to Figure 3 , Figure 3 This is a functional module diagram of the device for implementing continuous encoding of image data in this application. Figure 3 As shown, the device for realizing continuous encoding of image data includes: an acquisition module, a first execution module, and a second execution module.
[0070] The acquisition module is used to sequentially acquire the image data to be encoded, and according to the type of the acquired image data, if the current image data is non-compressed image data, the first execution module is driven to work, and if the current image data is compressed image data, the second execution module is driven to work; the first execution module is used to perform an encoding operation on the current image data based on a continuous encoding method; the second execution module is used to perform an encoding operation on the current image data based on a non-continuous encoding method;
[0071] The continuous encoding mode is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained by the CPU, and the discontinuous encoding mode is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained after the CPU configures the image decompression unit. The continuous encoding mode includes encoding for continuous non-compressed image data and encoding for single non-compressed image data.
[0072] In a third aspect, an embodiment of the present application provides a device for implementing continuous encoding of image data. The device for implementing continuous encoding of image data may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0073] Reference Figure 4 , Figure 4The hardware structure diagram of the device for implementing continuous encoding of image data involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the device for implementing continuous encoding of image data may include a processor, a memory, a communication interface, and a communication bus.
[0074] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0075] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the continuous encoding of image data and the interconnection of devices inside the device, and the interface used to realize the continuous encoding of image data and the interconnection of the device with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.
[0076] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0077] The processor may be a general-purpose processor, and the general-purpose processor may call the image data continuous encoding implementation program stored in the memory, and execute the image data continuous encoding implementation method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the image data continuous encoding implementation program is called may refer to the various embodiments of the image data continuous encoding implementation method of the present application, and will not be repeated here.
[0078] Those skilled in the art will understand that Figure 4 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0079] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0080] The computer-readable storage medium of the present application stores a program for implementing continuous encoding of image data, wherein when the program for implementing continuous encoding of image data is executed by a processor, the steps of the method for implementing continuous encoding of image data as described above are implemented.
[0081] Among them, the method implemented when the image data continuous encoding implementation program is executed can refer to the various embodiments of the image data continuous encoding implementation method of the present application, and will not be repeated here.
[0082] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0083] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0084] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0085] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0087] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for implementing continuous encoding of image data, characterized in that: The method for implementing continuous encoding of image data comprises: The image data to be encoded is obtained in sequence, according to the type of the image data obtained: If the current image data is uncompressed image data, the encoding operation is performed based on the continuous encoding method; If the current image data is compressed image data, the encoding operation is performed based on a discontinuous encoding method; The continuous encoding mode is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained by the CPU, and the discontinuous encoding mode is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained after the CPU configures the image decompression unit; The continuous encoding method includes encoding for continuous non-compressed image data and encoding for single non-compressed image data; the discontinuous encoding method is to perform encoding operations on single compressed image data in sequence; in the discontinuous encoding method, the CPU is configured with an image decompression unit; the VPU is a video processing unit; Among them, for continuous uncompressed image data, the CPU obtains the encoder configuration information corresponding to the current multiple frames of continuous uncompressed image data and transmits it to the programmable encoding control unit. The programmable encoding control unit configures the encoder according to the encoder configuration information and then encodes the current multiple frames of continuous uncompressed image data. The CPU is no longer required to participate in the encoding process; for single uncompressed image data, the CPU obtains the encoder configuration information corresponding to the current uncompressed image data and transmits it to the programmable encoding control unit. The programmable encoding control unit configures the encoder according to the encoder configuration information and then encodes the current uncompressed image data; Among them, for a single compressed image data, after the CPU configures the image decompression unit, it sends the acquired encoder configuration information to the programmable encoding control unit, and the programmable encoding control unit configures the encoder and then performs the encoding operation.
2. A method for implementing continuous encoding of image data as claimed in claim 1, characterized in that: When encoding continuous uncompressed image data: For the CPU, the CPU sequentially acquires the encoder configuration information corresponding to each frame of non-compressed image data, and sends the encoder configuration information corresponding to each frame of non-compressed image data to the programmable encoding control unit after acquiring the encoder configuration information corresponding to each frame of non-compressed image data; For the programmable coding control unit, the programmable coding control unit uses the encoder configuration information to configure the encoder according to the order in which the encoder configuration information is received, and controls the encoder to encode the corresponding non-compressed image data. After encoding the non-compressed image data corresponding to the current encoder configuration information is completed, the encoder is configured using the next encoder configuration information, and the encoder is controlled to encode the non-compressed image data corresponding to the next encoder configuration information.
3. A method for implementing continuous encoding of image data as claimed in claim 1, characterized in that: When encoding a single uncompressed image data: The CPU obtains the encoder configuration information corresponding to the current uncompressed image data and sends it to the programmable encoding control unit; The programmable encoding control unit configures the encoder based on the encoder configuration information corresponding to the current non-compressed image data, and controls the encoder to encode the current non-compressed image data.
4. A method for implementing continuous encoding of image data as claimed in claim 1, characterized in that: For non-continuous encoding, specifically: The CPU obtains the encoder configuration information corresponding to the current compressed image data, and the CPU configures the image decompression unit; The CPU sends the encoder configuration information corresponding to the currently compressed image data to the programmable encoding control unit; The programmable encoding control unit configures the encoder based on the encoder configuration information corresponding to the current uncompressed image data; The image decompression unit performs a decompression operation on the current non-compressed image data, and the programmable encoding control unit controls the encoder to encode the data obtained after decompression.
5. A device for realizing continuous encoding of image data, characterized in that: The image data continuous encoding implementation device comprises: An acquisition module, which is used to sequentially acquire image data to be encoded, and according to the type of the acquired image data, if the current image data is uncompressed image data, drive the first execution module to work, and if the current image data is compressed image data, drive the second execution module to work; A first execution module, which is used to perform an encoding operation on current image data based on a continuous encoding method; A second execution module, which is used to perform an encoding operation on the current image data based on a non-continuous encoding method; The continuous encoding mode is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained by the CPU, and the discontinuous encoding mode is that the programmable encoding control unit of the VPU controls the encoder to implement the encoding operation based on the encoder configuration information obtained after the CPU configures the image decompression unit; The continuous encoding method includes encoding for continuous non-compressed image data and encoding for single non-compressed image data; the discontinuous encoding method is to perform encoding operations on single compressed image data in sequence; in the discontinuous encoding method, the CPU is configured with an image decompression unit; the VPU is a video processing unit; Among them, for continuous uncompressed image data, the CPU obtains the encoder configuration information corresponding to the current multiple frames of continuous uncompressed image data and transmits it to the programmable encoding control unit. The programmable encoding control unit configures the encoder according to the encoder configuration information and then encodes the current multiple frames of continuous uncompressed image data. The CPU is no longer required to participate in the encoding process; for single uncompressed image data, the CPU obtains the encoder configuration information corresponding to the current uncompressed image data and transmits it to the programmable encoding control unit. The programmable encoding control unit configures the encoder according to the encoder configuration information and then encodes the current uncompressed image data; Among them, for a single compressed image data, after the CPU configures the image decompression unit, it sends the acquired encoder configuration information to the programmable encoding control unit, and the programmable encoding control unit configures the encoder and then performs the encoding operation.
6. A device for implementing continuous encoding of image data, characterized in that: The image data continuous encoding implementation device includes a processor, a memory, and an image data continuous encoding implementation program stored in the memory and executable by the processor, wherein when the image data continuous encoding implementation program is executed by the processor, the steps of the image data continuous encoding implementation method as described in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for realizing continuous encoding of image data, wherein when the program for realizing continuous encoding of image data is executed by a processor, the steps of the method for realizing continuous encoding of image data as claimed in any one of claims 1 to 4 are realized.
Citation Information
Patent Citations
Video encoder and graph processing unit
CN101068364A
Video decoding method and digital TV
CN105959797A