WO2024109701A1 - Video encoding/decoding method and apparatus, electronic device, and medium - Google Patents

Video encoding/decoding method and apparatus, electronic device, and medium Download PDF

Info

Publication number
WO2024109701A1
WO2024109701A1 PCT/CN2023/132683 CN2023132683W WO2024109701A1 WO 2024109701 A1 WO2024109701 A1 WO 2024109701A1 CN 2023132683 W CN2023132683 W CN 2023132683W WO 2024109701 A1 WO2024109701 A1 WO 2024109701A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
video
encoding
electronic device
video frame
Prior art date
Application number
PCT/CN2023/132683
Other languages
French (fr)
Chinese (zh)
Inventor
侯方超
Original Assignee
维沃移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2024109701A1 publication Critical patent/WO2024109701A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a group of pictures [GOP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Definitions

  • the present application belongs to the technical field of video data processing, and specifically relates to a video encoding and decoding method, device, electronic equipment and medium.
  • the IPB algorithm can be used to compress the original video. Specifically, several frames of images can be divided into a group of pictures (Group of Pictures, GOP), with I frame as the base frame, I frame predicts P frame, and then I frame and P frame predict B frame, and finally the difference information between I frame data and prediction is stored and transmitted.
  • GOP Group of Pictures
  • the encoding and decoding frame rate in the IPB algorithm is fixed, if the GOP is set to a larger number of frames, it means that a higher compression rate can be achieved on the I frame, but when there are more objects in the shooting scene moving, the video playback is prone to image freezes and is not smooth; if the GOP is set to a smaller number of frames, when there is no obvious movement of objects in the shooting scene, invalid redundant data will continue to be output, resulting in a waste of storage space and encoding and decoding computing power.
  • an embodiment of the present application provides a video encoding and decoding method, the method comprising: encoding first image data as a first key video frame into a video code stream; obtaining second image data; when a target condition is met between the third image data and the second image data, encoding the second image data as a second key video frame into the video code stream; wherein the third image data comprises any one of the following: first image data, fourth image data; the fourth image data is: image data obtained based on target data; the target data is used to indicate brightness change information of pixel points in a first sensor of the electronic device.
  • an embodiment of the present application provides a video encoding and decoding device, which includes: an encoding module and an acquisition module.
  • the encoding module is used to encode the first image data as a first key video frame into a video code stream.
  • the acquisition module is used to acquire the second image data.
  • the encoding module is also used to encode the second image data as a second key video frame into the video code stream when the target condition is met between the third image data and the second image data acquired by the acquisition module.
  • the third image data includes any one of the following: the first image data, the fourth image data; the fourth image data is: image data obtained based on the target data; the target data is used to indicate the brightness change information of the pixel points in the first sensor of the electronic device.
  • an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
  • an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
  • an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
  • an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
  • the electronic device can encode the first image data as the first key video frame into the video frequency code stream; and obtain the second image data, and then, if the target condition is met between the third image data (the third image data includes any of the following: the first image data, the fourth image data) and the second image data, encode the second image data as the second key video frame into the video code stream; wherein the fourth image data is: image data obtained based on the target data (the target data is used to indicate the brightness change information of the pixel point in the first sensor of the electronic device).
  • the electronic device can first encode the first image data as the first key video frame into the video code stream; and only if the target condition is met between the third image data and the second image data, the second image data will be encoded into the video code stream as the second key video frame, thereby avoiding the output of invalid redundant data, resulting in the waste of storage space and encoding and decoding computing power of the electronic device, and the electronic device can encode more key video frames into the video code stream when the target condition is met between the third image data and the second image data, so that the quality of the decoded video can be improved. Therefore, the storage space and encoding and decoding computing power of the electronic device in the video data encoding and decoding process can be saved under the premise of ensuring the image quality.
  • FIG1 is a schematic diagram of a video encoding and decoding method according to an embodiment of the present invention.
  • FIG2 is a second flow chart of a video encoding and decoding method provided in an embodiment of the present application.
  • FIG3 is a third flow chart of a video encoding and decoding method provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of a video code stream provided in an embodiment of the present application.
  • FIG5 is a fourth flow chart of a video encoding and decoding method provided in an embodiment of the present application.
  • FIG6 is a fifth flow chart of a video encoding and decoding method provided in an embodiment of the present application.
  • FIG7 is a sixth flow chart of a video encoding and decoding method provided in an embodiment of the present application.
  • FIG8 is a seventh flow chart of a video encoding and decoding method provided in an embodiment of the present application.
  • FIG11 is a schematic diagram of the structure of a video encoding and decoding device provided in an embodiment of the present application.
  • FIG. 13 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application.
  • first, second, etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first”, “second”, etc. are generally of one type, and the number of objects is not limited.
  • the first object can be one or more.
  • “and/or” in the specification and claims represents at least one of the connected objects, and the character “/" generally indicates that the objects associated with each other are in an "or” relationship.
  • Step 101 The electronic device encodes first image data as a first key video frame into a video code stream.
  • At least one image sensor in the electronic device starts to output pixel point information with light intensity changes and real-time acquisition of video images in real time.
  • the electronic device uses the first frame of the video image collected by the image sensor as the first video key frame, encodes the first image data corresponding to the first video key frame, and writes it into the video code stream.
  • the first image data may specifically be three primary color (Red, Green, Blue, RGB) data collected by the image sensor.
  • the one image sensor when the at least one image sensor includes one image sensor, the one image sensor may specifically be a two-in-one image sensor of a dynamic vision sensor (DVS) and a metal oxide semiconductor sensor (CMOS).
  • DVD dynamic vision sensor
  • CMOS metal oxide semiconductor sensor
  • one of the image sensors may be a dynamic vision sensor (Dynamic Vision Sensor, DVS), and the other image sensor may be a complementary metal-oxide semiconductor sensor (Complementary Metal-Oxide Semiconductor, CMOS).
  • DVS Dynamic Vision Sensor
  • CMOS complementary Metal-oxide semiconductor sensor
  • the above-mentioned video code stream can be stored in a cache encoder, and the electronic device can decode and display the video code stream as needed.
  • the time for acquiring the image data is initialized and a preset time interval (such as the first threshold described below) is set.
  • the preset time interval is used to determine whether to encode the acquired video image data.
  • the electronic device can use the first frame of RGB data collected by the CMOS sensor as the first key frame (i.e., I frame), and encode the first image data (such as RGB data) corresponding to the first key frame, write it into the video code stream, and store it in the cache encoder. Then, the time when the encoded data of the first key frame is currently obtained is initialized to zero, and a preset time interval T is set, that is, every interval T, it is determined whether to encode the image data sent by the image sensor.
  • the first key frame i.e., I frame
  • the first image data such as RGB data
  • the time when the encoded data of the first key frame is currently obtained is initialized to zero, and a preset time interval T is set, that is, every interval T, it is determined whether to encode the image data sent by the image sensor.
  • the first image data may also be decoded and written into a cache decoder.
  • Step 102 The electronic device obtains second image data.
  • an electronic device when an electronic device includes two image sensors, due to the different frame rates of the two image sensors, the electronic device may not necessarily obtain image data collected by the two sensors at the same time. At a certain time, it may only obtain image data collected by the first sensor or only obtain image data collected by the second sensor, or it may simultaneously obtain image data collected by both sensors.
  • the second image data may be image data corresponding to a next frame image after the first image data is captured.
  • the second image data may be image data corresponding to a next frame image of the first image data captured by the CMOS sensor at a preset frame rate.
  • the preset frame rate may be determined based on user settings for the electronic device, and the present application does not impose any restrictions thereon.
  • Step 103 When the third image data and the second image data meet a target condition, the electronic device encodes the second image data as a second key video frame into a video code stream.
  • the electronic device can determine whether the third image data and the second image data meet a target condition, and the target condition may include at least one of the following: the time interval between the acquisition time of the second image data and the encoding time of the first image data (such as the first time interval described below) is greater than or equal to a preset time interval (such as the first threshold described below), and the brightness change information of the pixel points between the third image data and the second image data is greater than or equal to a preset threshold (such as the second threshold described below).
  • the third image data includes any one of the following: first image data and fourth image data.
  • the electronic device may determine the acquisition time of the second image data, and read the third image data from the cache decoder, and store the third image data in the second image data.
  • the brightness change information of corresponding pixels between image data is compared.
  • the first pixel point can be the pixel point of the first row and first column in the third image data
  • the second pixel point is the pixel point of the first row and first column in the second image data
  • the first pixel point and the second pixel point correspond to each other
  • the difference between the brightness value of the first pixel point and the brightness value of the second pixel point can obtain the absolute value of the brightness change value of the two pixels.
  • the absolute value sum of the brightness change values of all corresponding pixels in the third image data and the second image data can be obtained, so that the absolute value sum can be compared with the preset threshold.
  • the electronic device compares the brightness change information of the pixels between the first image data and the second image data; when the third image data is the fourth image data, the electronic device compares the brightness change information of the pixels between the fourth image data and the second image data.
  • the fourth image data is: image data obtained based on target data; the target data is used to indicate brightness change information of pixel points in the first sensor of the electronic device.
  • the above-mentioned first sensor may specifically be a DVS sensor
  • the above-mentioned target data may be image data output by the first sensor of the electronic device when the brightness change received by a pixel point in the sensor exceeds a threshold value.
  • the target data may indicate pixel point information whose brightness has changed in the first sensor, and the pixel point information includes the coordinate position of the pixel point and brightness change information.
  • the above-mentioned target data can also be image data output by a composite sensor of an electronic device when a brightness change received by a pixel point in the sensor exceeds a threshold value.
  • the target data can indicate pixel point information whose brightness has changed in the composite sensor, and the pixel point information includes the coordinate position of the pixel point and brightness change information.
  • the electronic device when the electronic device obtains target data collected by the first sensor before obtaining the second image data, it can reconstruct and generate fourth image data based on the target data and cache data in the cache decoder.
  • the image frame currently captured by the second sensor is used as the second key video frame, and the second image data corresponding to the second video key frame is encoded and written into the video code stream.
  • a video encoding and decoding method provided in an embodiment of the present application further includes the following step 201 .
  • Step 201 When a target condition is satisfied between third image data and second image data, the electronic device updates first image data cached in a cache decoder to second image data.
  • the electronic device when the target condition is met between the third image data and the second image data, the electronic device encodes the second image data as a second key video frame into the video code stream, reinitializes the time for acquiring the second image data, and decodes the second image data and writes it into the cache decoder to update the first image data in the cache decoder.
  • the electronic device encodes the second image data as the second key video frame into the video code stream, it decodes the second image data and writes it into the cache decoder to update the first image data in the cache decoder, and initializes the receiving time of the second image data again, thereby preventing the cumulative errors caused by the reconstruction algorithm from causing poor video image effect during decoding, and thus improving the image quality of the video shot by the electronic device.
  • the third image data is written into the cache decoder.
  • the time interval between the moment when the electronic device acquires the second image data and the moment when the first image data is encoded is greater than or equal to the preset time interval and the electronic device acquires the target image data at the same time.
  • the target data currently collected by the first sensor is encoded into the video bitstream as a first non-key video frame and the fourth image data obtained based on the target data is written into the cache decoder.
  • the target data is encoded into the video code stream as the first non-key video frame and the fourth image data obtained based on the target data is written into the cache decoder.
  • the electronic device does not acquire any data stream, no action is taken to continue waiting for the next image data.
  • the video code stream in the cache encoder can be encapsulated into a video format and the image data in the cache decoder can be released.
  • a video encoding and decoding method provided in an embodiment of the present application further includes the following steps 301 and 302 .
  • Step 301 The electronic device decodes the third key video frame in the video code stream to obtain fifth image data.
  • the electronic device can read a video stream encapsulated in a video format and decode the video stream.
  • the third key video frame may be a video frame corresponding to the first image data in the video code stream, and the electronic device decodes the third key video frame to obtain fifth image data.
  • Step 302 The electronic device reconstructs sixth image data according to the fifth image data and the second non-key video frame.
  • the second non-key video frame is: a non-key video frame associated with the third key video frame.
  • the second non-key video frame may be a video frame corresponding to target data acquired by the first sensor or the composite image sensor obtained by the electronic device.
  • non-key video frame associated with the third key video frame can be understood as: a video frame located after the third key video frame and before the next key video frame in the video code stream.
  • the electronic device may adopt a reconstruction algorithm to obtain sixth image data based on the fifth image data and the second non-critical video frame.
  • the reconstruction algorithm is an algorithm that can regenerate new decoded data based on the data obtained by decoding the key video frame and the decoded data of the non-critical video frame.
  • the reconstruction algorithm may be any one of the following: a deep learning algorithm, an interpolation algorithm, etc., which is not limited by the present application.
  • the video code stream in the cache encoder is encapsulated into a video format, as shown in FIG4 , the video frames in the video code stream are arranged as: I frame, DVS data, DVS data, DVS data...I frame, DVS data, DVS data...I frame, DVS data, DVS data, DVS data....
  • the electronic device first decodes the third key video frame (i.e., the first I frame) in the video code stream to obtain the fifth image data RGB_Decoder; and uses a reconstruction algorithm to reconstruct the fifth image data RGB_Decoder and the second non-key video frame (the video frame corresponding to the DVS after the first I frame and before the second I frame) to obtain the sixth image data (reconstructed image data RGB_Decoder), and replaces the previous fifth image data with the sixth image data, and so on, to decode the video code stream in the cache encoder.
  • the electronic device can first decode the third key video frame in the video code stream to obtain the fifth image data, and use a reconstruction algorithm, it is only necessary to reconstruct the sixth image data based on the fifth image data and the second non-key video frame, thereby avoiding the complex decoding operations of the traditional method, and thus saving the storage space and decoding computing power of the electronic device during the video data decoding process.
  • a video encoding and decoding method provided in an embodiment of the present application further includes the following steps 401 and 402, and the above step 302 can be specifically implemented by the following step 302a.
  • Step 401 The electronic device determines a second time interval according to a preset decoding frame rate.
  • the above-mentioned preset decoding frame rate can be determined according to the refresh rate of the display end.
  • the decoding frame rate is set to adapt to a smaller decoding frame rate.
  • the decoding frame rate is set to adapt to a larger decoding frame rate.
  • the electronic device may determine the second time interval according to an inverse relationship between a preset decoding frame rate and the second time interval.
  • the second time interval can be determined to be 1 millisecond.
  • Step 402 The electronic device determines a target decoding time according to the decoding time of the third key video frame and the second time interval.
  • the target decoding time is the time when the electronic device decodes the video code stream.
  • the electronic device takes the decoding time of the third key video frame as the initial time, and determines a target decoding time every second time interval.
  • the decoding time of the third key video frame is the 1st millisecond
  • the target decoding time is the 2nd millisecond, the 3rd millisecond, the 4th millisecond, and so on.
  • Step 302a At the target decoding time, the electronic device reconstructs the sixth image data according to the fifth image data and the second non-critical video frame.
  • the electronic device determines a decoding algorithm according to a data type of the video stream at a target decoding time.
  • the key video frame is directly decoded and updated to cover the cache decoder; if the data to be decoded in the video code stream at the target decoding time is a non-key video frame, the fifth image data and the data corresponding to the second non-key video frame are input into the reconstruction algorithm to reconstruct the sixth image data, and the data is updated to cover the cache decoder.
  • the electronic device can first determine the second time interval and the target decoding time according to the preset decoding frame rate, and use different methods to decode according to the data type of the video stream at the target decoding time, it avoids a large amount of redundant data calculations and saves computing power.
  • the electronic device can encode the first image data as the first key video frame into the video code stream; and obtain the second image data, and then encode the second image data as the second key video frame into the video code stream when the target condition is met between the third image data (the third image data includes any of the following: the first image data, the fourth image data) and the second image data; wherein the fourth image data is: image data obtained based on the target data (the target data is used to indicate the brightness change information of the pixel point in the first sensor of the electronic device).
  • the electronic device can first encode the first image data as the first key video frame into the video code stream; and only when the target condition is met between the third image data and the second image data, the second image data will be encoded into the video code stream as the second key video frame, thereby avoiding the output of invalid redundant data, resulting in the waste of storage space and encoding and decoding computing power of the electronic device, and the electronic device can encode more key video frames into the video code stream when the target condition is met between the third image data and the second image data, so that the quality of the decoded video can be improved. Therefore, the storage space and encoding and decoding computing power of the electronic device in the video data encoding and decoding process can be saved under the premise of ensuring the image quality.
  • the following specifically describes the process of how the electronic device determines whether the third image data and the second image data meet the target condition.
  • step 103 may be specifically implemented by the following step 103a.
  • Step 103a When the first time interval is greater than or equal to the first threshold and the brightness change information of the pixels between the third image data and the second image data is greater than or equal to the second threshold, the electronic device encodes the second image data as a second key video frame into the video bitstream.
  • the first time interval is the time interval between the first moment and the second moment
  • the first moment is the moment of acquiring the second image data
  • the second moment is the moment of encoding the first image data
  • the encoding time of the first image data is initialized to zero, and the above-mentioned first time interval can be the time interval from the acquisition time of the second image data to zero.
  • the first threshold may be a time interval automatically set by the electronic device, or may be a time interval set by the user.
  • the electronic device may perform difference processing on the third image data and the second image data to compare difference information between brightness change information of pixels indicated by the third image data and the second image data.
  • both the third image data and the second image data include brightness information of N pixels
  • the third image data and the second image data are subjected to difference processing to obtain the absolute values of the brightness change values of the N pixels, and the N absolute values are added to obtain an absolute total value, which can then be compared with the second threshold.
  • the time interval from the time when the electronic device acquires the second image data to the encoding time of the first image data is greater than or equal to a first threshold
  • the difference between the brightness change information of the pixel points indicated by the third image data and the second image data is greater than or equal to a second threshold
  • the image frame currently captured by the second sensor is used as the second key video frame
  • the second image data corresponding to the second video key frame is encoded and written into the video code stream.
  • the second image data will be encoded into the video code stream as the second key video frame only if the difference in brightness change information of the pixel points between the third image data and the second image data is greater than or equal to the second threshold. Therefore, the electronic device can encode only the image data with large brightness changes (that is, the image data collected by the second sensor when the objects in the shooting scene undergo complex movements) into the video code stream at the first time, thereby realizing dynamic acquisition of key video frames, ensuring image quality and saving storage space and decoding computing power of the electronic device during the video data encoding process.
  • a video encoding and decoding method provided in an embodiment of the present application also includes the following step 501, and after the above-mentioned step 103a, a video encoding and decoding method provided in an embodiment of the present application also includes the following step 601.
  • Step 501 The electronic device obtains third image data from a cache decoder of the electronic device.
  • the electronic device when the electronic device obtains the second image data, it is necessary to first obtain the third image data from a cache decoder of the electronic device before determining whether the third image data and the second image data satisfy a target condition.
  • the third image data obtained by the electronic device from the cache decoder may be the first data or the fourth data.
  • the electronic device does not obtain the target data before obtaining the second image data, and does not reconstruct and generate the fourth image data based on the target data, so that the cache decoder does not store the fourth image data but only stores the first image data.
  • the electronic device has acquired the target data before acquiring the second image data.
  • the electronic device reconstructs and generates fourth image data based on the target data and stores the fourth image data in a cache decoder.
  • Step 601 The electronic device updates the third image data in the cache decoder to the second image data.
  • the second image data is also decoded and written into a cache decoder to replace the previous third image data.
  • the cache decoder of the electronic device always only stores the decoded data of one video frame.
  • the electronic device obtains the second image data, before determining whether the third image data and the second image data meet the target condition, the third image data is first obtained from the cache decoder of the electronic device, and after the second image data is encoded into the video code stream as the second key video frame, the second image data is decoded and written into the cache decoder to update the previous third image data. Therefore, the cache decoder of the electronic device always stores only the decoded data of the latest video frame, so the data space of the decoding cache of the electronic device can be saved.
  • the following specifically describes a process in which the electronic device obtains the fourth image data in response to a situation in which the third image data includes the fourth image data.
  • the third image data includes fourth image data.
  • a video encoding and decoding method provided in an embodiment of the present application further includes the following steps 701 and 702 .
  • Step 701 The electronic device obtains first image data from a cache decoder of the electronic device, and obtains target data through a first sensor.
  • the first sensor of the electronic device outputs target data when a brightness change received by a pixel point in the sensor exceeds a threshold value.
  • the target data may indicate pixel point information in the first sensor where brightness has changed, and the pixel point information includes the coordinate position of the pixel point and brightness change information.
  • the electronic device obtains target data collected by the first sensor, and obtains the first image data written at a previous moment from the cache decoder.
  • the third image data includes fourth image data.
  • a video encoding and decoding method provided in an embodiment of the present application further includes the following steps 801 and 802 .
  • Step 801 The electronic device obtains target data through a first sensor.
  • target data is output when pixel brightness change information received by a pixel point in the first sensor within a time period exceeds a threshold value.
  • the target data may indicate pixel point information in the sensor whose brightness has changed, and the pixel point information includes the coordinate position of the pixel point and brightness change information.
  • Step 802 The electronic device encodes the target data as a first non-key video frame into a video code stream.
  • the electronic device after the electronic device obtains the target data, it encodes the image frame corresponding to the target data as a non-key video frame into a video code stream and stores it in a cache encoder.
  • the electronic device After the electronic device obtains the first image data and the target data, it will also encode the target data as the first non-critical video frame into the video code stream, so that the electronic device can collect information indicating the movement of objects in the shooting scene in real time, thereby improving the image quality of the video shot by the electronic device.
  • Step 702 The electronic device reconstructs and generates fourth image data according to the first image data and the target data.
  • the electronic device inputs the acquired first image data and target data into a reconstruction algorithm to reconstruct and generate fourth image data.
  • the first sensor can output pixel information with light intensity changes in real time, it can effectively extract the motion information of the moving object, so the target data output by the first sensor itself contains the motion information of the moving object in the shooting scene, and the target data includes the coordinate position and brightness change information of the pixel points with brightness changes in the first sensor. Therefore, according to the first image data and the target data, the image of the corresponding pixel points in the two data is converted into The pixel information is reconstructed and calculated to generate image data of the current image frame.
  • the electronic device can first obtain the first image data from the cache decoder of the electronic device, and obtain the target data through the first sensor when the object in the shooting scene moves, it can reconstruct and generate the fourth image data based on the two image data. Therefore, the electronic device can collect information indicating the movement of the object in the shooting scene in real time, thereby improving the image quality of the video shot by the electronic device.
  • the target data is written into the cache encoder, and after the electronic device reads the third image data from the cache decoder, the currently acquired target data and the third image data can be input into the reconstruction algorithm to generate reconstructed image data, and the image data can be used to overwrite the original image data of the cache decoder.
  • the electronic device when the electronic device does not acquire any image data, it does not take any action and continues to wait for the next image data.
  • the electronic device includes a first sensor and a second sensor.
  • the first sensor taking the DVS sensor as an example
  • the second sensor collects RGB data.
  • the electronic device uses the first frame collected by the second sensor as the first key frame (i.e., I frame), and encodes the first image data corresponding to the first key frame into the video code stream and stores it in the cache encoder.
  • a first threshold value e.g., time interval T
  • the electronic device decodes the first image data (i.e., RGB_Decoder_pre in the figure) and writes it into the cache decoder. Assuming that the time when the electronic device obtains the image data is t, the electronic device has the following processing methods for the obtained image data:
  • the DVS data is written into the cache encoder, and the first image data (i.e., RGB_Decoder_pre) is read from the cache decoder.
  • the electronic device inputs the DVS data and the first image data at time t into the reconstruction algorithm, reconstructs and generates the fourth image data at the current moment (i.e., the reconstructed RGB_Decoder_pre), and overwrites the original image data of the cache decoder.
  • DVS data and RGB data (i.e., second image data). If the time interval from time t to the initialization time is less than the first threshold, the DVS data is written into the cache encoder, and the fourth image data (i.e., RGB_Decoder_pre in the cache decoder before time t) is read from the cache decoder.
  • the electronic device inputs the DVS data and the fourth image data at time t into the reconstruction algorithm, reconstructs and generates the image data at the current time (i.e., the reconstructed RGB_Decoder_pre), and writes and overwrites the original image data of the cache decoder.
  • the DVS data is written into the cache encoder, and the fourth image data (i.e., RGB_Decoder_pre in the cache decoder before time t) is read from the cache decoder.
  • the electronic device inputs the DVS data and the fourth image data at time t into the reconstruction algorithm, reconstructs and generates the reconstructed image data at the current moment, and compares the reconstructed image data with the second image data.
  • the second image data is encoded into the video bitstream as the second key video frame, and the second image data is decoded and written to overwrite the original fourth image data of the cache decoder; if the brightness change information of the pixel points between the reconstructed image data and the second image data is less than the second threshold, the reconstructed image data is written to overwrite the original fourth image data of the cache decoder.
  • the electronic device reads the fourth image data from the cache decoder (i.e., the RGB_Decoder_pre in the cache decoder before time t).
  • the second image data is used as The second key video frame is encoded into the video code stream, and the second image data is decoded and written to overwrite the original fourth image data of the cache decoder; if the brightness change information of the pixel points between the fourth image data and the second image data is less than the second threshold, the fourth image data is rewritten into the cache decoder.
  • the video encoding and decoding method provided in the embodiment of the present application can be executed by a device.
  • the video encoding and decoding device provided in the embodiment of the present application is described by taking the device execution method as an example.
  • FIG11 shows a video encoding and decoding device 60 involved in the above-mentioned embodiment
  • the video encoding and decoding device 60 includes: an encoding module 61 and an acquisition module 62.
  • the encoding module 61 is used to encode the first image data as a first key video frame into a video code stream.
  • the acquisition module 62 is used to acquire the second image data.
  • the encoding module 61 is also used to encode the second image data as a second key video frame into a video code stream when the target condition is met between the third image data and the second image data acquired by the acquisition module.
  • the third image data includes any one of the following: the first image data, the fourth image data; the fourth image data is: image data obtained based on the target data; the target data is used to indicate the brightness change information of the pixel points in the first sensor of the electronic device.
  • the video encoding and decoding device 60 further includes: a reconstruction module.
  • the acquisition module is further configured to acquire the first image data from a cache decoder of the electronic device and acquire the target data through the first sensor.
  • the reconstruction module is configured to reconstruct and generate the fourth image data based on the first image data and the target data acquired by the acquisition module.
  • the video encoding and decoding device 60 further includes an updating module, wherein the updating module is configured to update the first image data cached in the cache decoder to the second image data when the third image data and the second image data meet a target condition.
  • the acquisition module is further configured to acquire target data through a first sensor.
  • the encoding module is further configured to encode the target data as a first non-key video frame into a video bit stream.
  • the encoding module is specifically used to encode the second image data as a second key video frame into the video code stream when the first time interval is greater than or equal to the first threshold and the brightness change information of the pixel points between the third image data and the second image data is greater than or equal to the second threshold.
  • the first time interval is the time interval between the first moment and the second moment
  • the first moment is the acquisition moment of the second image data
  • the second moment is the encoding moment of the first image data.
  • the video codec device 60 further includes an updating module, wherein the acquiring module is further configured to acquire the third image data from the cache decoder of the video codec device, and the updating module is configured to update the third image data in the cache decoder acquired by the acquiring module to the second image data.
  • the video encoding and decoding device 60 further includes: a decoding module and a reconstruction module.
  • the decoding module is used to decode the third key video frame in the video code stream to obtain fifth image data.
  • the reconstruction module is used to reconstruct the sixth image data according to the fifth image data and the second non-key video frame decoded by the decoding module.
  • the second non-key video frame is: a non-key video frame associated with the third key video frame.
  • the video encoding and decoding device further includes: a determination module.
  • the determination module is used to determine the second time interval according to a preset decoding frame rate; and determine the target decoding time according to the decoding time of the third key video frame and the second time interval.
  • the reconstruction module is specifically used to reconstruct the sixth image data according to the fifth image data and the second non-key video frame at the target decoding time determined by the determination module.
  • the video codec device provided by the embodiment of the present application can first encode the first image data as the first key video frame into the video code stream; and only when the target condition is met between the third image data and the second image data, the second image data is encoded into the video code stream as the second key video frame, thereby avoiding outputting invalid redundant data and causing waste of storage space and coding and decoding computing power of the video codec device. Moreover, when the target condition is met between the third image data and the second image data, the video codec device More key video frames can be encoded into the video code stream, so that the quality of the decoded video can be improved. Therefore, the storage space and encoding and decoding computing power of the video encoding and decoding device in the video data encoding and decoding process can be saved while ensuring the image quality.
  • the video encoding and decoding device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip.
  • the electronic device can be a terminal or other devices other than a terminal.
  • the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, a mobile internet device (mobile internet device, MID), an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc.
  • It can also be a server, a network attached storage (network attached storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
  • network attached storage network attached storage, NAS
  • personal computer personal computer, PC
  • television television
  • teller machine a self-service machine
  • the video encoding and decoding device in the embodiment of the present application may be a device having an operating system.
  • the operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
  • the video encoding and decoding device provided in the embodiment of the present application can implement each process implemented by the method embodiments of Figures 1 to 10. To avoid repetition, they will not be described here.
  • the embodiment of the present application also provides an electronic device 80, including a processor 81 and a memory 82, and the memory 82 stores a program or instruction that can be executed on the processor 81.
  • the program or instruction is executed by the processor 81, the various process steps of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
  • the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
  • FIG. 13 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 100 includes but is not limited to components such as a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 110.
  • the electronic device 100 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 110 through a power management system, so that the power management system can manage charging, discharging, and power consumption.
  • a power source such as a battery
  • the electronic device structure shown in FIG13 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be described in detail here.
  • the processor 110 is specifically used to encode the first image data as a first key video frame into a video code stream; obtain the second image data; when the target condition is met between the third image data and the second image data, encode the second image data as a second key video frame into the video code stream; wherein the third image data includes any one of the following: the first image data, the fourth image data; the fourth image data is: image data obtained based on the target data; the target data is used to indicate the brightness change information of the pixel points in the first sensor of the electronic device.
  • the electronic device provided by the embodiment of the present application can first encode the first image data as the first key video frame into the video code stream; and only when the target condition is met between the third image data and the second image data, the second image data will be encoded into the video code stream as the second key video frame, thereby avoiding the output of invalid redundant data, resulting in a waste of storage space and encoding and decoding computing power of the electronic device, and the electronic device can encode more key video frames into the video code stream when the target condition is met between the third image data and the second image data, so that the quality of the decoded video can be improved. Therefore, the storage space and encoding and decoding computing power of the electronic device in the video data encoding and decoding process can be saved under the premise of ensuring the image quality.
  • the processor 110 is specifically used to obtain first image data from a cache decoder of the electronic device, and obtain target data through a first sensor; and reconstruct and generate fourth image data based on the first image data and the target data.
  • the electronic device can first obtain the first image data from the cache decoder of the electronic device, and obtain the target data through the first sensor when the object in the shooting scene moves, it can reconstruct and generate the fourth image data based on the two image data. Therefore, the electronic device can collect information indicating the movement of the object in the shooting scene in real time, thereby improving the image quality of the video shot by the electronic device.
  • the processor 110 is specifically configured to update the first image data cached in the cache decoder to the second image data when a target condition is satisfied between the third image data and the second image data.
  • the electronic device encodes the second image data as the second key video frame into the video code stream, it decodes the second image data and writes it into the cache decoder to update the first image data in the cache decoder, and initializes the image data receiving time again, thereby preventing the cumulative errors generated by the reconstruction algorithm from causing poor video image reconstruction during decoding, thereby improving the image quality of the video shot by the electronic device.
  • the processor 110 is specifically configured to acquire target data through a first sensor; and encode the target data as a first non-critical video frame into a video bitstream.
  • the electronic device After the electronic device obtains the first image data and the target data, it will also encode the target data as the first non-critical video frame into the video code stream, so that the electronic device can collect information indicating the movement of objects in the shooting scene in real time, thereby improving the image quality of the video shot by the electronic device.
  • the processor 110 is specifically used to encode the second image data as a second key video frame into the video code stream when the first time interval is greater than or equal to a first threshold and the brightness change information of the pixel points between the third image data and the second image data is greater than or equal to a second threshold; wherein the first time interval is the time interval between the first moment and the second moment, the first moment is the moment of acquiring the second image data, and the second moment is the moment of encoding the first image data.
  • the second image data will be encoded into the video code stream as the second key video frame only if the difference in brightness change information of the pixel points between the third image data and the second image data is greater than or equal to the second threshold. Therefore, the electronic device can encode only the image data with large brightness changes (that is, the image data collected by the second sensor when the objects in the shooting scene undergo complex movements) into the video code stream at the first time, thereby realizing dynamic acquisition of key video frames, ensuring image quality and saving storage space and decoding computing power of the electronic device during the video data encoding process.
  • the processor 110 is specifically configured to obtain third image data from a cache decoder of the electronic device; and update the third image data in the cache decoder to the second image data.
  • the electronic device obtains the second image data, before determining whether the third image data and the second image data meet the target condition, the third image data is first obtained from the cache decoder of the electronic device, and after the second image data is encoded into the video code stream as the second key video frame, the second image data is decoded and written into the cache decoder to update the previous third image data. Therefore, the cache decoder of the electronic device always stores only the decoded data of the latest video frame, so the data space of the decoding cache of the electronic device can be saved.
  • the processor 110 is specifically used to decode the third key video frame in the video code stream to obtain fifth image data; reconstruct the sixth image data based on the fifth image data and the second non-key video frame; wherein the second non-key video frame is: a non-key video frame associated with the third key video frame.
  • the electronic device can first decode the third key video frame in the video code stream to obtain the fifth image data, and adopt the reconstruction algorithm, it only needs to be based on the fifth image data and the second non-key video frame.
  • the sixth image data can be reconstructed, thereby avoiding the complex decoding operations of the traditional method, thereby saving the storage space and decoding computing power of the electronic device during the video data decoding process.
  • the processor 110 is specifically configured to determine the second time interval according to a preset decoding frame rate; determine the target decoding time according to the decoding time of the third key video frame and the second time interval; and reconstruct the sixth image data at the target decoding time according to the fifth image data and the second non-key video frame.
  • the electronic device can first determine the target time interval and the target decoding time according to the preset decoding frame rate, and use different methods to decode according to the data type of the video code stream at the target decoding time, a large amount of calculations on redundant data are avoided, saving calculation power consumption.
  • the input unit 1004 may include a graphics processing unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode.
  • the display unit 1006 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.
  • the user input unit 1007 includes a touch panel 1071 and at least one of other input devices 1072.
  • the touch panel 1071 is also called a touch screen.
  • the touch panel 1071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
  • the memory 1009 can be used to store software programs and various data.
  • the memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
  • the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories.
  • the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory may be a random access memory (RAM), a static RAM (SRAM), a dynamic RAM (DRAM), a synchronous DRAM (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct RAM bus random access memory (DRRAM).
  • the memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
  • the processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.
  • the technical solution of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
  • a storage medium such as ROM/RAM, a disk, or an optical disk
  • a terminal which can be a mobile phone, a computer, a server, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present application relates to the technical field of video encoding/decoding, and discloses a video encoding/decoding method and apparatus, an electronic device, and a medium. The video encoding/decoding method comprises: encoding first image data as a first key video frame into a video code stream; acquiring second image data; and when third image data and the second image data meet a target condition, encoding the second image data as a second key video frame into the video code stream, wherein the third image data comprises either of the first image data and fourth image data, the fourth image data is image data obtained on the basis of target data, and the target data is used for indicating brightness change information of pixel points in a first sensor of an electronic device.

Description

视频编解码方法、装置、电子设备及介质Video encoding and decoding method, device, electronic equipment and medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2022年11月24日在中国提交的申请号为202211484822.2的中国专利的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202211484822.2 filed in China on November 24, 2022, the entire contents of which are incorporated herein by reference.
技术领域Technical Field
本申请属于视频数据处理技术领域,具体涉及一种视频编解码方法、装置、电子设备及介质。The present application belongs to the technical field of video data processing, and specifically relates to a video encoding and decoding method, device, electronic equipment and medium.
背景技术Background technique
通常,可以采用IPB算法对原始视频进行压缩。具体地,可以将几帧图像划分为一组画面组(Group of Pictures,GOP),以I帧做为基础帧,以I帧预测P帧,再由I帧和P帧预测B帧,最后将I帧数据与预测的差值信息进行存储和传输。Usually, the IPB algorithm can be used to compress the original video. Specifically, several frames of images can be divided into a group of pictures (Group of Pictures, GOP), with I frame as the base frame, I frame predicts P frame, and then I frame and P frame predict B frame, and finally the difference information between I frame data and prediction is stored and transmitted.
但是,由于IPB算法中的编解码帧率是固定的,如果GOP设置的帧数较大,意味I帧上能实现更高的压缩率,但拍摄场景中的物体运动较多时,视频播放容易有图像卡顿不平滑的现象;如果GOP设置的帧数较小,在拍摄场景中的物体无明显运动时仍会持续输出无效的冗余数据,造成存储空间和编解码算力的浪费。However, since the encoding and decoding frame rate in the IPB algorithm is fixed, if the GOP is set to a larger number of frames, it means that a higher compression rate can be achieved on the I frame, but when there are more objects in the shooting scene moving, the video playback is prone to image freezes and is not smooth; if the GOP is set to a smaller number of frames, when there is no obvious movement of objects in the shooting scene, invalid redundant data will continue to be output, resulting in a waste of storage space and encoding and decoding computing power.
发明内容Summary of the invention
本申请实施例的目的是提供一种视频编解码方法,能够在保证画质的前提下,解决电子设备在视频数据编解码过程中的存储空间和解码算力浪费的问题。The purpose of the embodiments of the present application is to provide a video encoding and decoding method, which can solve the problem of waste of storage space and decoding computing power in the process of video data encoding and decoding of electronic devices under the premise of ensuring image quality.
第一方面,本申请实施例提供了一种视频编解码方法,该方法包括:将第一图像数据作为第一关键视频帧编码入视频码流;获取第二图像数据;在第三图像数据与第二图像数据间满足目标条件的情况下,将该第二图像数据作为第二关键视频帧编码入视频码流;其中,第三图像数据包括以下任一项:第一图像数据、第四图像数据;第四图像数据为:基于目标数据得到的图像数据;目标数据用于指示电子设备的第一传感器中像素点的亮度变化信息。In a first aspect, an embodiment of the present application provides a video encoding and decoding method, the method comprising: encoding first image data as a first key video frame into a video code stream; obtaining second image data; when a target condition is met between the third image data and the second image data, encoding the second image data as a second key video frame into the video code stream; wherein the third image data comprises any one of the following: first image data, fourth image data; the fourth image data is: image data obtained based on target data; the target data is used to indicate brightness change information of pixel points in a first sensor of the electronic device.
第二方面,本申请实施例提供了一种视频编解码装置,该装置包括:编码模块和获取模块。其中,编码模块,用于将第一图像数据作为第一关键视频帧编码入视频码流。获取模块,用于获取第二图像数据。编码模块,还用于在第三图像数据与获取模块获取的第二图像数据间满足目标条件的情况下,将该第二图像数据作为第二关键视频帧编码入视频码流。其中,第三图像数据包括以下任一项:第一图像数据、第四图像数据;第四图像数据为:基于目标数据得到的图像数据;目标数据用于指示电子设备的第一传感器中像素点的亮度变化信息。In a second aspect, an embodiment of the present application provides a video encoding and decoding device, which includes: an encoding module and an acquisition module. The encoding module is used to encode the first image data as a first key video frame into a video code stream. The acquisition module is used to acquire the second image data. The encoding module is also used to encode the second image data as a second key video frame into the video code stream when the target condition is met between the third image data and the second image data acquired by the acquisition module. The third image data includes any one of the following: the first image data, the fourth image data; the fourth image data is: image data obtained based on the target data; the target data is used to indicate the brightness change information of the pixel points in the first sensor of the electronic device.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
在本申请实施例中,电子设备可以将第一图像数据作为第一关键视频帧编码入视 频码流;并获取第二图像数据,然后在第三图像数据(该第三图像数据包括以下任一项:第一图像数据、第四图像数据)和第二图像数据间满足目标条件的情况下,将第二图像数据作为第二关键视频帧编码入视频码流;其中,第四图像数据为:基于目标数据(该目标数据用于指示电子设备的第一传感器中像素点的亮度变化信息)得到的图像数据。由于电子设备可以先将第一图像数据作为第一关键视频帧编码入视频码流;并只有在第三图像数据和第二图像数据间满足目标条件的情况下,才会将第二图像数据作为第二关键视频帧编码入视频码流,因而可以避免输出无效的冗余数据,造成电子设备的存储空间和编解码算力的浪费,而且电子设备在第三图像数据和第二图像数据间满足目标条件的情况下,可以将更多的关键视频帧编码入视频码流,这样,可以提高解码后的视频的质量。因此,可以在保证画质的前提下节省电子设备在视频数据编解码过程中的存储空间和编解码算力。In the embodiment of the present application, the electronic device can encode the first image data as the first key video frame into the video frequency code stream; and obtain the second image data, and then, if the target condition is met between the third image data (the third image data includes any of the following: the first image data, the fourth image data) and the second image data, encode the second image data as the second key video frame into the video code stream; wherein the fourth image data is: image data obtained based on the target data (the target data is used to indicate the brightness change information of the pixel point in the first sensor of the electronic device). Since the electronic device can first encode the first image data as the first key video frame into the video code stream; and only if the target condition is met between the third image data and the second image data, the second image data will be encoded into the video code stream as the second key video frame, thereby avoiding the output of invalid redundant data, resulting in the waste of storage space and encoding and decoding computing power of the electronic device, and the electronic device can encode more key video frames into the video code stream when the target condition is met between the third image data and the second image data, so that the quality of the decoded video can be improved. Therefore, the storage space and encoding and decoding computing power of the electronic device in the video data encoding and decoding process can be saved under the premise of ensuring the image quality.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例提供的视频编解码方法的流程示意图之一;FIG1 is a schematic diagram of a video encoding and decoding method according to an embodiment of the present invention;
图2是本申请实施例提供的视频编解码方法的流程示意图之二;FIG2 is a second flow chart of a video encoding and decoding method provided in an embodiment of the present application;
图3是本申请实施例提供的视频编解码方法的流程示意图之三;FIG3 is a third flow chart of a video encoding and decoding method provided in an embodiment of the present application;
图4是本申请实施例提供的视频码流的示意图;FIG4 is a schematic diagram of a video code stream provided in an embodiment of the present application;
图5是本申请实施例提供的视频编解码方法的流程示意图之四;FIG5 is a fourth flow chart of a video encoding and decoding method provided in an embodiment of the present application;
图6是本申请实施例提供的视频编解码方法的流程示意图之五;FIG6 is a fifth flow chart of a video encoding and decoding method provided in an embodiment of the present application;
图7是本申请实施例提供的视频编解码方法的流程示意图之六;FIG7 is a sixth flow chart of a video encoding and decoding method provided in an embodiment of the present application;
图8是本申请实施例提供的视频编解码方法的流程示意图之七;FIG8 is a seventh flow chart of a video encoding and decoding method provided in an embodiment of the present application;
图9是本申请实施例提供的视频编解码方法的流程示意图之八;FIG9 is a flowchart of a video encoding and decoding method according to an embodiment of the present application;
图10是本申请实施例提供的视频编解码方法的流程示意图之九;FIG10 is a ninth flowchart of a video encoding and decoding method according to an embodiment of the present application;
图11是本申请实施例提供的视频编解码装置的结构示意图;FIG11 is a schematic diagram of the structure of a video encoding and decoding device provided in an embodiment of the present application;
图12是本申请实施例提供的电子设备的结构示意图;FIG12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
图13是本申请实施例提供的电子设备的硬件结构示意图。FIG. 13 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally indicates that the objects associated with each other are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的视频编解码方法、装置、电子设备及介质进行详细地说明。The video encoding and decoding method, device, electronic device and medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
图1示出了本申请实施例提供的一种视频编解码方法的流程图。如图1所示,本申请实施例提供的一种视频编解码方法可以包括下述的步骤101至步骤103。Fig. 1 shows a flow chart of a video encoding and decoding method provided by an embodiment of the present application. As shown in Fig. 1, a video encoding and decoding method provided by an embodiment of the present application may include the following steps 101 to 103.
步骤101、电子设备将第一图像数据作为第一关键视频帧编码入视频码流。Step 101: The electronic device encodes first image data as a first key video frame into a video code stream.
可选地,本申请实施例中,在电子设备中的视频摄制功能被触发开启后,电子设备中的至少一个图像传感器开始实时输出有光强变化的像素点信息和实时采集视频图 像信息,同时,电子设备将图像传感器采集到的视频图像的第一帧作为第一视频关键帧,并对该第一视频关键帧对应的第一图像数据进行编码后,写入视频码流。Optionally, in the embodiment of the present application, after the video recording function in the electronic device is triggered and turned on, at least one image sensor in the electronic device starts to output pixel point information with light intensity changes and real-time acquisition of video images in real time. At the same time, the electronic device uses the first frame of the video image collected by the image sensor as the first video key frame, encodes the first image data corresponding to the first video key frame, and writes it into the video code stream.
进一步可选地,本申请实施例中,上述第一图像数据具体可以为图像传感器采集到的三原色(Red,Green,Blue,RGB)数据。Further optionally, in the embodiment of the present application, the first image data may specifically be three primary color (Red, Green, Blue, RGB) data collected by the image sensor.
进一步可选地,本申请实施例中,上述至少一个图像传感器包括一个图像传感器的情况下,该一个图像传感器具体可以为动态视觉传感器(Dynamic Vision Sensor,DVS)和金属氧化物半导体传感器(Complementary Metal-Oxide Semiconductor,CMOS)的二合一图像传感器。Further optionally, in an embodiment of the present application, when the at least one image sensor includes one image sensor, the one image sensor may specifically be a two-in-one image sensor of a dynamic vision sensor (DVS) and a metal oxide semiconductor sensor (CMOS).
进一步可选地,本申请实施例中,上述至少一个图像传感器包括两个图像传感器的情况下,其中一个图像传感器具体可以为动态视觉传感器(Dynamic Vision Sensor,DVS),另一个图像传感器具体可以为金属氧化物半导体传感器(Complementary Metal-Oxide Semiconductor,CMOS)。Further optionally, in an embodiment of the present application, when the at least one image sensor includes two image sensors, one of the image sensors may be a dynamic vision sensor (Dynamic Vision Sensor, DVS), and the other image sensor may be a complementary metal-oxide semiconductor sensor (Complementary Metal-Oxide Semiconductor, CMOS).
可选地,本申请实施例中,上述视频码流可以存储在缓存编码器内,电子设备可以根据需要对视频码流进行解码并显示。Optionally, in an embodiment of the present application, the above-mentioned video code stream can be stored in a cache encoder, and the electronic device can decode and display the video code stream as needed.
可选地,本申请实施例中,在电子设备将第一图像数据作为第一关键视频帧编码入视频码流后,初始化获取图像数据的时间并设置预设时间间隔(如下述第一阈值),该预设时间间隔用于判断是否对获取的视频图像数据进行编码。Optionally, in an embodiment of the present application, after the electronic device encodes the first image data as the first key video frame into the video code stream, the time for acquiring the image data is initialized and a preset time interval (such as the first threshold described below) is set. The preset time interval is used to determine whether to encode the acquired video image data.
示例性地,电子设备可以将CMOS传感器采集的第一帧RGB数据作为第一关键帧(即I帧),并对该第一关键帧对应的第一图像数据(如RGB数据)进行编码写入视频码流并存入缓存编码器后,初始化当前获取到第一关键帧的编码数据的时间为零时,并设置一个预设时间间隔T,即每间隔时间T,判断是否对图像传感器发送的图像数据进行编码。Exemplarily, the electronic device can use the first frame of RGB data collected by the CMOS sensor as the first key frame (i.e., I frame), and encode the first image data (such as RGB data) corresponding to the first key frame, write it into the video code stream, and store it in the cache encoder. Then, the time when the encoded data of the first key frame is currently obtained is initialized to zero, and a preset time interval T is set, that is, every interval T, it is determined whether to encode the image data sent by the image sensor.
可选地,本申请实施例中,在电子设备将第一图像数据作为第一关键视频帧编码入视频码流后,还可以对该第一图像数据进行解码并写入缓存解码器内。Optionally, in an embodiment of the present application, after the electronic device encodes the first image data as the first key video frame into a video code stream, the first image data may also be decoded and written into a cache decoder.
步骤102、电子设备获取第二图像数据。Step 102: The electronic device obtains second image data.
可以理解,电子设备包括两个图像传感器的情况下,由于两个图像传感器的帧率不同,电子设备不一定同时获取到两个传感器采集的图像数据,在某一时间可以只获取到第一个传感器采集的图像数据也可以只获取到第二个传感器采集的图像数据,还可以同时获取到两个传感器采集的图像数据。It can be understood that when an electronic device includes two image sensors, due to the different frame rates of the two image sensors, the electronic device may not necessarily obtain image data collected by the two sensors at the same time. At a certain time, it may only obtain image data collected by the first sensor or only obtain image data collected by the second sensor, or it may simultaneously obtain image data collected by both sensors.
可选地,本申请实施例中,上述第二图像数据可以为采集的第一图像数据后的下一帧图像对应的图像数据,具体地,该第二图像数据可以为CMOS传感器按照预设帧率采集的第一图像数据的下一帧图像对应的图像数据,该预设帧率可以根据用户对电子设备的设置来确定,本申请不做限制。Optionally, in an embodiment of the present application, the second image data may be image data corresponding to a next frame image after the first image data is captured. Specifically, the second image data may be image data corresponding to a next frame image of the first image data captured by the CMOS sensor at a preset frame rate. The preset frame rate may be determined based on user settings for the electronic device, and the present application does not impose any restrictions thereon.
步骤103、电子设备在第三图像数据和第二图像数据间满足目标条件的情况下,将第二图像数据作为第二关键视频帧编码入视频码流。Step 103: When the third image data and the second image data meet a target condition, the electronic device encodes the second image data as a second key video frame into a video code stream.
可选地,本申请实施例中,电子设备可以确定第三图像数据和第二图像数据间是否满足目标条件,该目标条件可以包括以下至少一项:第二图像数据的获取时刻至第一图像数据的编码时刻之间的时间间隔(如下述的第一时间间隔)大于或等于预设时间间隔(如下述的第一阈值)、第三图像数据和第二图像数据间的像素点的亮度变化信息大于或等于预设阈值(如下述的第二阈值)。Optionally, in an embodiment of the present application, the electronic device can determine whether the third image data and the second image data meet a target condition, and the target condition may include at least one of the following: the time interval between the acquisition time of the second image data and the encoding time of the first image data (such as the first time interval described below) is greater than or equal to a preset time interval (such as the first threshold described below), and the brightness change information of the pixel points between the third image data and the second image data is greater than or equal to a preset threshold (such as the second threshold described below).
本申请实施例中,上述第三图像数据包括以下任一项:第一图像数据、第四图像数据。In the embodiment of the present application, the third image data includes any one of the following: first image data and fourth image data.
可选地,本申请实施例中,电子设备在获取到第二图像数据后,可以确定第二图像数据的获取时间,并从缓存解码器内读取第三图像数据,将第三图像数据和第二图 像数据间对应的像素点的亮度变化信息进行比较。Optionally, in the embodiment of the present application, after acquiring the second image data, the electronic device may determine the acquisition time of the second image data, and read the third image data from the cache decoder, and store the third image data in the second image data. The brightness change information of corresponding pixels between image data is compared.
示例性地,假设第一像素点可以是第三图像数据中的第一行第一列的像素点,第二像素点是第二图像数据中的第一行第一列的像素点,第一像素点和第第二像素点相对应,将第一像素点的亮度值和第二像素点的亮度值进行作差可以得到两个像素点的亮度变化值的绝对值,同理,可以得到第三图像数据和第二图像数据中所有对应像素点的亮度变化值的绝对值总和,从而可以将该绝对值总和与预设阈值进行比较。Exemplarily, assuming that the first pixel point can be the pixel point of the first row and first column in the third image data, and the second pixel point is the pixel point of the first row and first column in the second image data, the first pixel point and the second pixel point correspond to each other, and the difference between the brightness value of the first pixel point and the brightness value of the second pixel point can obtain the absolute value of the brightness change value of the two pixels. Similarly, the absolute value sum of the brightness change values of all corresponding pixels in the third image data and the second image data can be obtained, so that the absolute value sum can be compared with the preset threshold.
可以理解,当第三图像数据为第一图像数据时,电子设备将第一图像数据和第二图像数据间的像素点的亮度变化信息进行比较;当第三图像数据为第四图像数据时,电子设备将第四图像数据和第二图像数据间的像素点的亮度变化信息进行比较。It can be understood that when the third image data is the first image data, the electronic device compares the brightness change information of the pixels between the first image data and the second image data; when the third image data is the fourth image data, the electronic device compares the brightness change information of the pixels between the fourth image data and the second image data.
本申请实施例中,上述第四图像数据为:基于目标数据得到的图像数据;目标数据用于指示电子设备的第一传感器中像素点的亮度变化信息。In the embodiment of the present application, the fourth image data is: image data obtained based on target data; the target data is used to indicate brightness change information of pixel points in the first sensor of the electronic device.
可选地,本申请实施例中,上述第一传感器具体可以为DVS传感器,上述目标数据可以为电子设备的第一传感器在传感器中的像素点接收的亮度变化超过一个阈值时输出的图像数据,该目标数据可以指示第一传感器中亮度发生变化的像素点信息,该像素点信息包括像素点的坐标位置和亮度变化信息。Optionally, in an embodiment of the present application, the above-mentioned first sensor may specifically be a DVS sensor, and the above-mentioned target data may be image data output by the first sensor of the electronic device when the brightness change received by a pixel point in the sensor exceeds a threshold value. The target data may indicate pixel point information whose brightness has changed in the first sensor, and the pixel point information includes the coordinate position of the pixel point and brightness change information.
可选地,本申请实施例中,上述目标数据还可以为电子设备的复合传感器在传感器中的像素点接收的亮度变化超过一个阈值时输出的图像数据,该目标数据可以指示复合传感器中亮度发生变化的像素点信息,该像素点信息包括像素点的坐标位置和亮度变化信息。Optionally, in an embodiment of the present application, the above-mentioned target data can also be image data output by a composite sensor of an electronic device when a brightness change received by a pixel point in the sensor exceeds a threshold value. The target data can indicate pixel point information whose brightness has changed in the composite sensor, and the pixel point information includes the coordinate position of the pixel point and brightness change information.
可选地,本申请实施例中,电子设备在获取到第二图像数据之前获取到第一传感器采集的目标数据时,可以根据目标数据和缓存解码器内的缓存数据重建生成第四图像数据。Optionally, in an embodiment of the present application, when the electronic device obtains target data collected by the first sensor before obtaining the second image data, it can reconstruct and generate fourth image data based on the target data and cache data in the cache decoder.
可选地,本申请实施例中,在电子设备获取到第二图像数据的时间满足预设时间间隔,且第三图像数据和第二图像数据间的数据差异满足预设阈值的情况下,将第二传感器当前采集到的图像帧作为第二关键视频帧,并对该第二视频关键帧对应的第二图像数据进行编码后,写入视频码流。Optionally, in an embodiment of the present application, when the time when the electronic device acquires the second image data satisfies a preset time interval and the data difference between the third image data and the second image data satisfies a preset threshold, the image frame currently captured by the second sensor is used as the second key video frame, and the second image data corresponding to the second video key frame is encoded and written into the video code stream.
可选地,本申请实施例中,结合图1,如图2所示,在上述步骤102之后,本申请实施例提供的一种视频编解码方法还包括下述的步骤201。Optionally, in an embodiment of the present application, in combination with FIG. 1 , as shown in FIG. 2 , after the above step 102 , a video encoding and decoding method provided in an embodiment of the present application further includes the following step 201 .
步骤201、电子设备在第三图像数据和第二图像数据间满足目标条件的情况下,将缓存解码器中缓存的第一图像数据,更新为第二图像数据。Step 201: When a target condition is satisfied between third image data and second image data, the electronic device updates first image data cached in a cache decoder to second image data.
可选地,本申请实施例中,在第三图像数据和第二图像数据间满足目标条件的情况下,电子设备将第二图像数据作为第二关键视频帧编码入视频码流后,重新初始化获取第二图像数据的时间,并对该第二图像数据进行解码写入缓存解码器以更新缓存解码器内的第一图像数据。Optionally, in an embodiment of the present application, when the target condition is met between the third image data and the second image data, the electronic device encodes the second image data as a second key video frame into the video code stream, reinitializes the time for acquiring the second image data, and decodes the second image data and writes it into the cache decoder to update the first image data in the cache decoder.
如此可知,由于电子设备在将第二图像数据作为第二关键视频帧编码入视频码流后,对该第二图像数据进行解码并写入缓存解码器以更新缓存解码器内的第一图像数据,并再次初始化第二图像数据的接收时间,从而可以防止受重建算法产生的累积误差导致解码时视频图像的效果不佳,因此可以提升电子设备拍摄的视频的图像画质。It can be seen that after the electronic device encodes the second image data as the second key video frame into the video code stream, it decodes the second image data and writes it into the cache decoder to update the first image data in the cache decoder, and initializes the receiving time of the second image data again, thereby preventing the cumulative errors caused by the reconstruction algorithm from causing poor video image effect during decoding, and thus improving the image quality of the video shot by the electronic device.
可选地,本申请实施例中,在电子设备获取第二图像数据的时刻至第一图像数据的编码时刻之间的时间间隔大于或等于预设时间间隔且电子设备没有获取到目标数据的情况下,若第三图像数据和第二图像数据间的像素点的亮度变化信息小于预设阈值,则将第三图像数据写入缓存解码器中。Optionally, in an embodiment of the present application, when the time interval between the moment when the electronic device acquires the second image data and the moment when the first image data is encoded is greater than or equal to a preset time interval and the electronic device has not acquired the target data, if the brightness change information of the pixel points between the third image data and the second image data is less than a preset threshold, the third image data is written into the cache decoder.
可选地,本申请实施例中,在电子设备获取第二图像数据的时刻至第一图像数据的编码时刻之间的时间间隔大于或等于预设时间间隔且电子设备同时获取到了目标数 据的情况下,若第三图像数据和第二图像数据间的像素点的亮度变化信息小于预设阈值,则将第一传感器当前采集到的目标数据作为第一非关键视频帧编码入视频码流并将基于目标数据得到的第四图像数据写入缓存解码器中。Optionally, in the embodiment of the present application, the time interval between the moment when the electronic device acquires the second image data and the moment when the first image data is encoded is greater than or equal to the preset time interval and the electronic device acquires the target image data at the same time. In the case of a third image data, if the brightness change information of the pixel points between the third image data and the second image data is less than a preset threshold, the target data currently collected by the first sensor is encoded into the video bitstream as a first non-key video frame and the fourth image data obtained based on the target data is written into the cache decoder.
可选地,本申请实施例中,在电子设备获取第二图像数据的时刻至第一图像数据的编码时刻之间的时间间隔小于预设时间间隔且电子设备没有获取到了目标数据的情况下,不做任何动作继续等待下一个图像数据。Optionally, in an embodiment of the present application, when the time interval between the moment when the electronic device acquires the second image data and the moment when the first image data is encoded is less than a preset time interval and the electronic device has not acquired the target data, no action is taken and it continues to wait for the next image data.
可选地,本申请实施例中,在电子设备获取第二图像数据的时刻至第一图像数据的编码时刻之间的时间间隔小于预设时间间隔且电子设备获取到了目标数据的情况下,将目标数据作为第一非关键视频帧编码入视频码流并将基于目标数据得到的第四图像数据写入缓存解码器中。可选地,本申请实施例中,在电子设备未获取到任何数据流的情况下,不做任何动作继续等待下一个图像数据。Optionally, in the embodiment of the present application, when the time interval between the moment when the electronic device acquires the second image data and the moment when the first image data is encoded is less than the preset time interval and the electronic device acquires the target data, the target data is encoded into the video code stream as the first non-key video frame and the fourth image data obtained based on the target data is written into the cache decoder. Optionally, in the embodiment of the present application, when the electronic device does not acquire any data stream, no action is taken to continue waiting for the next image data.
可选地,本申请实施例中,在电子设备完成视频的编码过程后,可以将缓存编码器内的视频码流封装为视频格式并释放缓存解码器内的图像数据。Optionally, in an embodiment of the present application, after the electronic device completes the video encoding process, the video code stream in the cache encoder can be encapsulated into a video format and the image data in the cache decoder can be released.
可选地,本申请实施例中,结合图1,如图3所示,在上述步骤103之后,本申请实施例提供的一种视频编解码方法还包括下述的步骤301和步骤302。Optionally, in an embodiment of the present application, in combination with FIG. 1 , as shown in FIG. 3 , after the above step 103 , a video encoding and decoding method provided in an embodiment of the present application further includes the following steps 301 and 302 .
步骤301、电子设备将视频码流中的第三关键视频帧进行解码,得到第五图像数据。Step 301: The electronic device decodes the third key video frame in the video code stream to obtain fifth image data.
可选地,本申请实施例中,电子设备可以读取封装为视频格式的视频码流并对该视频码流进行解码。Optionally, in an embodiment of the present application, the electronic device can read a video stream encapsulated in a video format and decode the video stream.
可选地,本申请实施例中,上述第三关键视频帧可以为视频码流中的第一图像数据对应的视频帧,电子设备对该第三关键视频帧进行解码,得到第五图像数据。Optionally, in an embodiment of the present application, the third key video frame may be a video frame corresponding to the first image data in the video code stream, and the electronic device decodes the third key video frame to obtain fifth image data.
步骤302、电子设备根据第五图像数据和第二非关键视频帧,重建得到第六图像数据。Step 302: The electronic device reconstructs sixth image data according to the fifth image data and the second non-key video frame.
本申请实施例中,第二非关键视频帧为:第三关键视频帧关联的非关键视频帧。In the embodiment of the present application, the second non-key video frame is: a non-key video frame associated with the third key video frame.
可选地,本申请实施例中,上述第二非关键视频帧可以为电子设备获取到的第一传感器或者复合图像传感器采集的目标数据对应的一帧视频帧。Optionally, in the embodiment of the present application, the second non-key video frame may be a video frame corresponding to target data acquired by the first sensor or the composite image sensor obtained by the electronic device.
需要说明的是,上述“第三关键视频帧关联的非关键视频帧”可以理解为:视频码流中位于第三关键视频帧之后,下一关键视频帧之前的一帧视频帧。It should be noted that the above-mentioned “non-key video frame associated with the third key video frame” can be understood as: a video frame located after the third key video frame and before the next key video frame in the video code stream.
可选地,本申请实施例中,电子设备可以采用重建算法,根据第五图像数据和第二非关键视频帧得到第六图像数据,该重建算法为可以根据关键视频帧解码得到的数据和非关键视频帧的解码数据重新生成新的解码数据的算法,该重建算法可以为以下任意一项:深度学习算法、插帧算法等,本申请不作限制。Optionally, in an embodiment of the present application, the electronic device may adopt a reconstruction algorithm to obtain sixth image data based on the fifth image data and the second non-critical video frame. The reconstruction algorithm is an algorithm that can regenerate new decoded data based on the data obtained by decoding the key video frame and the decoded data of the non-critical video frame. The reconstruction algorithm may be any one of the following: a deep learning algorithm, an interpolation algorithm, etc., which is not limited by the present application.
举例说明,在电子设备完成视频的编码过程后,将缓存编码器内的视频码流封装为视频格式,如图4所示,该视频码流中的视频帧排列为:I帧、DVS数据、DVS数据、DVS数据…I帧、DVS数据、DVS数据…I帧、DVS数据、DVS数据、DVS数据…。电子设备先将视频码流中的第三关键视频帧(即第一个I帧)进行解码,得到第五图像数据RGB_Decoder;并采用重建算法将第五图像数据RGB_Decoder和第二非关键视频帧(第一个I帧之后,第二个I帧之前的DVS对应的视频帧),重建得到第六图像数据(重建后的图像数据RGB_Decoder),并将第六图像数据替换之前的第五图像数据,以此类推,对缓存编码器内的视频码流进行解码。For example, after the electronic device completes the video encoding process, the video code stream in the cache encoder is encapsulated into a video format, as shown in FIG4 , the video frames in the video code stream are arranged as: I frame, DVS data, DVS data, DVS data…I frame, DVS data, DVS data…I frame, DVS data, DVS data, DVS data…. The electronic device first decodes the third key video frame (i.e., the first I frame) in the video code stream to obtain the fifth image data RGB_Decoder; and uses a reconstruction algorithm to reconstruct the fifth image data RGB_Decoder and the second non-key video frame (the video frame corresponding to the DVS after the first I frame and before the second I frame) to obtain the sixth image data (reconstructed image data RGB_Decoder), and replaces the previous fifth image data with the sixth image data, and so on, to decode the video code stream in the cache encoder.
如此可知,由于电子设备可以先将视频码流中的第三关键视频帧进行解码,得到第五图像数据,并采用重建算法,只需要根据第五图像数据和第二非关键视频帧,就可以重建得到第六图像数据,从而避免传统方法复杂的解码运算,因此节省了电子设备在视频数据解码过程中的存储空间和解码算力。 It can be seen that since the electronic device can first decode the third key video frame in the video code stream to obtain the fifth image data, and use a reconstruction algorithm, it is only necessary to reconstruct the sixth image data based on the fifth image data and the second non-key video frame, thereby avoiding the complex decoding operations of the traditional method, and thus saving the storage space and decoding computing power of the electronic device during the video data decoding process.
可选地,本申请实施例中,结合图3,如图5所示,在上述步骤301之后,本申请实施例提供的一种视频编解码方法还包括下述的步骤401和步骤402,上述步骤302具体可以通过下述步骤302a来实现。Optionally, in an embodiment of the present application, in combination with Figure 3, as shown in Figure 5, after the above step 301, a video encoding and decoding method provided in an embodiment of the present application further includes the following steps 401 and 402, and the above step 302 can be specifically implemented by the following step 302a.
步骤401、电子设备根据预设解码帧率,确定第二时间间隔。Step 401: The electronic device determines a second time interval according to a preset decoding frame rate.
可选地,本申请实施例中,上述预设解码帧率可以根据显示端的刷新率来确定,在显示端的刷新率较低时,通过设置解码帧率适配较小的解码帧率,在显示端的刷新率较高时,通过设置解码帧率适配较大的解码帧率。Optionally, in an embodiment of the present application, the above-mentioned preset decoding frame rate can be determined according to the refresh rate of the display end. When the refresh rate of the display end is low, the decoding frame rate is set to adapt to a smaller decoding frame rate. When the refresh rate of the display end is high, the decoding frame rate is set to adapt to a larger decoding frame rate.
可选地,本申请实施例中,电子设备可以根据预设解码帧率和第二时间间隔的倒数关系,确定第二时间间隔。Optionally, in an embodiment of the present application, the electronic device may determine the second time interval according to an inverse relationship between a preset decoding frame rate and the second time interval.
示例性地,假设预设解码帧率为1000帧/每秒,则可以确定第二时间间隔为1毫秒。Exemplarily, assuming that the preset decoding frame rate is 1000 frames per second, the second time interval can be determined to be 1 millisecond.
步骤402、电子设备根据第三关键视频帧的解码时刻和第二时间间隔,确定目标解码时刻。Step 402: The electronic device determines a target decoding time according to the decoding time of the third key video frame and the second time interval.
可选地,本申请实施例中,上述目标解码时刻为电子设备对视频码流进行解码的时刻。Optionally, in an embodiment of the present application, the target decoding time is the time when the electronic device decodes the video code stream.
可选地,本申请实施例中,电子设备以第三关键视频帧的解码时刻为初始时刻,每隔一个第二时间间隔,确定一个目标解码时刻。Optionally, in an embodiment of the present application, the electronic device takes the decoding time of the third key video frame as the initial time, and determines a target decoding time every second time interval.
示例性地,假设第二时间间隔为1毫秒,第三关键视频帧的解码时刻为第1毫秒,则目标解码时刻为第2毫秒、第3毫秒、第4毫秒……。Exemplarily, assuming that the second time interval is 1 millisecond, the decoding time of the third key video frame is the 1st millisecond, and the target decoding time is the 2nd millisecond, the 3rd millisecond, the 4th millisecond, and so on.
步骤302a、电子设备在目标解码时刻,根据第五图像数据和第二非关键视频帧,重建得到第六图像数据。Step 302a: At the target decoding time, the electronic device reconstructs the sixth image data according to the fifth image data and the second non-critical video frame.
可选地,本申请实施例中,电子设备在目标解码时刻根据视频码流的数据类型确定解码算法。Optionally, in an embodiment of the present application, the electronic device determines a decoding algorithm according to a data type of the video stream at a target decoding time.
其中,若目标解码时刻的视频码流中待解码的数据为关键视频帧,则直接将关键视频帧进行解码并更新覆盖到缓存解码器中;若目标解码时刻的视频码流中待解码的数据为非关键视频帧,则将第五图像数据和第二非关键视频帧对应的数据输入重建算法,重建得到第六图像数据。并更新覆盖到缓存解码器中。If the data to be decoded in the video code stream at the target decoding time is a key video frame, the key video frame is directly decoded and updated to cover the cache decoder; if the data to be decoded in the video code stream at the target decoding time is a non-key video frame, the fifth image data and the data corresponding to the second non-key video frame are input into the reconstruction algorithm to reconstruct the sixth image data, and the data is updated to cover the cache decoder.
如此可知,由于电子设备可以先根据预设解码帧率确定第二时间间隔以及目标解码时刻,并在目标解码时刻根据视频码流的数据类型采用不同的方法进行解码,从而避免了对冗余数据的大量运算,节省了运算功耗。It can be seen that since the electronic device can first determine the second time interval and the target decoding time according to the preset decoding frame rate, and use different methods to decode according to the data type of the video stream at the target decoding time, it avoids a large amount of redundant data calculations and saves computing power.
本申请实施例提供的视频编解码方法,电子设备可以将第一图像数据作为第一关键视频帧编码入视频码流;并获取第二图像数据,然后在第三图像数据(该第三图像数据包括以下任一项:第一图像数据、第四图像数据)和第二图像数据间满足目标条件的情况下,将第二图像数据作为第二关键视频帧编码入视频码流;其中,第四图像数据为:基于目标数据(该目标数据用于指示电子设备的第一传感器中像素点的亮度变化信息)得到的图像数据。由于电子设备可以先将第一图像数据作为第一关键视频帧编码入视频码流;并只有在第三图像数据和第二图像数据间满足目标条件的情况下,才会将第二图像数据作为第二关键视频帧编码入视频码流,因而可以避免输出无效的冗余数据,造成电子设备的存储空间和编解码算力的浪费,而且电子设备在第三图像数据和第二图像数据间满足目标条件的情况下,可以将更多的关键视频帧编码入视频码流,这样,可以提高解码后的视频的质量。因此,可以在保证画质的前提下节省电子设备在视频数据编解码过程中的存储空间和编解码算力。In the video encoding and decoding method provided by the embodiment of the present application, the electronic device can encode the first image data as the first key video frame into the video code stream; and obtain the second image data, and then encode the second image data as the second key video frame into the video code stream when the target condition is met between the third image data (the third image data includes any of the following: the first image data, the fourth image data) and the second image data; wherein the fourth image data is: image data obtained based on the target data (the target data is used to indicate the brightness change information of the pixel point in the first sensor of the electronic device). Since the electronic device can first encode the first image data as the first key video frame into the video code stream; and only when the target condition is met between the third image data and the second image data, the second image data will be encoded into the video code stream as the second key video frame, thereby avoiding the output of invalid redundant data, resulting in the waste of storage space and encoding and decoding computing power of the electronic device, and the electronic device can encode more key video frames into the video code stream when the target condition is met between the third image data and the second image data, so that the quality of the decoded video can be improved. Therefore, the storage space and encoding and decoding computing power of the electronic device in the video data encoding and decoding process can be saved under the premise of ensuring the image quality.
以下具体说明电子设备是如何确定第三图像数据和第二图像数据是否满足目标条件的过程。 The following specifically describes the process of how the electronic device determines whether the third image data and the second image data meet the target condition.
可选地,本申请实施例中,结合图1,如图6所示,在上述步骤103具体可以通过下述步骤103a来实现。Optionally, in the embodiment of the present application, in combination with FIG. 1 , as shown in FIG. 6 , the above step 103 may be specifically implemented by the following step 103a.
步骤103a、电子设备在第一时间间隔大于或等于第一阈值,且第三图像数据和第二图像数据间的像素点的亮度变化信息大于或等于第二阈值的情况下,将第二图像数据作为第二关键视频帧编码入视频码流。Step 103a: When the first time interval is greater than or equal to the first threshold and the brightness change information of the pixels between the third image data and the second image data is greater than or equal to the second threshold, the electronic device encodes the second image data as a second key video frame into the video bitstream.
本申请实施例中,第一时间间隔为第一时刻至第二时刻间的时间间隔,第一时刻为第二图像数据的获取时刻,第二时刻为第一图像数据的编码时刻。In the embodiment of the present application, the first time interval is the time interval between the first moment and the second moment, the first moment is the moment of acquiring the second image data, and the second moment is the moment of encoding the first image data.
可选地,本申请实施例中,电子设备对第一图像数据进行编码写入视频码流存入缓存编码器后,将第一图像数据的编码时刻初始化为零时,上述第一时间间隔可以为第二图像数据的获取时刻到零时的时间间隔。Optionally, in an embodiment of the present application, after the electronic device encodes the first image data and writes the video code stream into the cache encoder, the encoding time of the first image data is initialized to zero, and the above-mentioned first time interval can be the time interval from the acquisition time of the second image data to zero.
可选地,本申请实施例中,上述第一阈值可以为电子设备自动设置的时间间隔,也可以为用户设置的时间间隔。Optionally, in the embodiment of the present application, the first threshold may be a time interval automatically set by the electronic device, or may be a time interval set by the user.
可选地,本申请实施例中,电子设备可以将第三图像数据和第二图像数据进行作差处理,以比较第三图像数据和第二图像数据指示的像素点的亮度变化信息之间的差异信息。Optionally, in the embodiment of the present application, the electronic device may perform difference processing on the third image data and the second image data to compare difference information between brightness change information of pixels indicated by the third image data and the second image data.
示例性地,假设第三图像数据和第二图像数据都包括N个像素点的亮度信息,将第三图像数据和第二图像数据进行作差处理,可以得到N个像素点的亮度变化值的绝对值,将该N个绝对值相加可以的得到一个绝对值总值,从而可以将该绝对值总值与第二阈值进行比较。Exemplarily, assuming that both the third image data and the second image data include brightness information of N pixels, the third image data and the second image data are subjected to difference processing to obtain the absolute values of the brightness change values of the N pixels, and the N absolute values are added to obtain an absolute total value, which can then be compared with the second threshold.
可选地,本申请实施例中,在电子设备获取到第二图像数据的时间至第一图像数据的编码时刻的时间间隔大于或等于第一阈值的情况下,若第三图像数据和第二图像数据指示的像素点的亮度变化信息之间的差值大于或等于第二阈值时,将第二传感器当前采集到的图像帧作为第二关键视频帧,并对该第二视频关键帧对应的第二图像数据进行编码后,写入视频码流。Optionally, in an embodiment of the present application, when the time interval from the time when the electronic device acquires the second image data to the encoding time of the first image data is greater than or equal to a first threshold, if the difference between the brightness change information of the pixel points indicated by the third image data and the second image data is greater than or equal to a second threshold, the image frame currently captured by the second sensor is used as the second key video frame, and the second image data corresponding to the second video key frame is encoded and written into the video code stream.
如此可知,由于电子设备在获取到第二图像数据的时间至第一图像数据的编码时刻的时间间隔大于或等于第一阈值的情况下,若第三图像数据和第二图像数据间的像素点的亮度变化信息的差值大于或等于第二阈值,才会将第二图像数据作为第二关键视频帧编码入视频码流,因此电子设备可以在第一时间只将亮度变化较大的图像数据(即拍摄场景中物体发生复杂运动时第二传感器采集的图像数据)编码入视频码流,从而实现了关键视频帧的动态采集,保证了画质且节省了电子设备在视频数据编码过程中的存储空间和解码算力。It can be seen that since the time interval from the time when the electronic device acquires the second image data to the encoding time of the first image data is greater than or equal to the first threshold, the second image data will be encoded into the video code stream as the second key video frame only if the difference in brightness change information of the pixel points between the third image data and the second image data is greater than or equal to the second threshold. Therefore, the electronic device can encode only the image data with large brightness changes (that is, the image data collected by the second sensor when the objects in the shooting scene undergo complex movements) into the video code stream at the first time, thereby realizing dynamic acquisition of key video frames, ensuring image quality and saving storage space and decoding computing power of the electronic device during the video data encoding process.
可选地,本申请实施例中,结合图6,如图7所示,在上述步骤103a之前,本申请实施例提供的一种视频编解码方法还包括下述的步骤501,上述步骤103a之后,本申请实施例提供的一种视频编解码方法还还包括下述的步骤601。Optionally, in an embodiment of the present application, in combination with Figure 6, as shown in Figure 7, before the above-mentioned step 103a, a video encoding and decoding method provided in an embodiment of the present application also includes the following step 501, and after the above-mentioned step 103a, a video encoding and decoding method provided in an embodiment of the present application also includes the following step 601.
步骤501、电子设备从电子设备的缓存解码器中获取第三图像数据。Step 501: The electronic device obtains third image data from a cache decoder of the electronic device.
可选地,本申请实施例中,电子设备在获取到第二图像数据的情况下,确定第三图像数据和第二图像数据间是否满足目标条件之前需要先从电子设备的缓存解码器中获取第三图像数据。Optionally, in an embodiment of the present application, when the electronic device obtains the second image data, it is necessary to first obtain the third image data from a cache decoder of the electronic device before determining whether the third image data and the second image data satisfy a target condition.
其中,电子设备从缓存解码器中获取的第三图像数据可以为第一数据也可以为第四数据。The third image data obtained by the electronic device from the cache decoder may be the first data or the fourth data.
在一种示例中,电子设备在获取到第二图像数据之前,没有获取到目标数据,电子设备并没有基于目标数据重建生成第四图像数据,从而缓存解码器中并没有存储第四图像数据,只存储有第一图像数据。In one example, the electronic device does not obtain the target data before obtaining the second image data, and does not reconstruct and generate the fourth image data based on the target data, so that the cache decoder does not store the fourth image data but only stores the first image data.
在另一种示例中,电子设备在获取到第二图像数据之前,已经获取过目标数据, 电子设备基于目标数据重建生成了第四图像数据并存储在缓存解码器中。In another example, the electronic device has acquired the target data before acquiring the second image data. The electronic device reconstructs and generates fourth image data based on the target data and stores the fourth image data in a cache decoder.
步骤601、电子设备将缓存解码器中的第三图像数据,更新为第二图像数据。Step 601: The electronic device updates the third image data in the cache decoder to the second image data.
可选地,本申请实施例中,在电子设备将第二图像数据作为第二关键视频帧编码入视频码流后,还会对该第二图像数据进行解码并写入缓存解码器内以替换之前的第三图像数据。Optionally, in an embodiment of the present application, after the electronic device encodes the second image data as the second key video frame into the video code stream, the second image data is also decoded and written into a cache decoder to replace the previous third image data.
可以理解,电子设备的缓存解码器内始终只存储一帧视频帧的解码数据。It can be understood that the cache decoder of the electronic device always only stores the decoded data of one video frame.
如此可知,由于电子设备在获取到第二图像数据的情况下,在确定第三图像数据和第二图像数据间是否满足目标条件之前先从电子设备的缓存解码器中获取第三图像数据,并在第二图像数据作为第二关键视频帧编码入视频码流后,对该第二图像数据进行解码并写入缓存解码器内以更新之前的第三图像数据。从而电子设备的缓存解码器内始终只存储最新的一帧视频帧的解码数据,因此可以节省电子设备的解码缓存的数据空间。Thus, it can be known that, when the electronic device obtains the second image data, before determining whether the third image data and the second image data meet the target condition, the third image data is first obtained from the cache decoder of the electronic device, and after the second image data is encoded into the video code stream as the second key video frame, the second image data is decoded and written into the cache decoder to update the previous third image data. Therefore, the cache decoder of the electronic device always stores only the decoded data of the latest video frame, so the data space of the decoding cache of the electronic device can be saved.
以下针对第三图像数据包括第四图像数据的情况,具体说明电子设备得到第四图像数据的过程。The following specifically describes a process in which the electronic device obtains the fourth image data in response to a situation in which the third image data includes the fourth image data.
可选地,本申请实施例中,上述第三图像数据包括第四图像数据,结合图1,如图8所示,在上述步骤102之后,本申请实施例提供的一种视频编解码方法还包括下述的步骤701和步骤702。Optionally, in an embodiment of the present application, the third image data includes fourth image data. In combination with FIG. 1 , as shown in FIG. 8 , after the above step 102 , a video encoding and decoding method provided in an embodiment of the present application further includes the following steps 701 and 702 .
步骤701、电子设备从电子设备的缓存解码器中获取第一图像数据,并通过第一传感器获取目标数据。Step 701: The electronic device obtains first image data from a cache decoder of the electronic device, and obtains target data through a first sensor.
可选地,本申请实施例中,电子设备的第一传感器在传感器中的像素点接收的亮度变化超过一个阈值时输出目标数据,该目标数据可以指示第一传感器中亮度发生变化的像素点信息,该像素点信息包括像素点的坐标位置和亮度变化信息。Optionally, in an embodiment of the present application, the first sensor of the electronic device outputs target data when a brightness change received by a pixel point in the sensor exceeds a threshold value. The target data may indicate pixel point information in the first sensor where brightness has changed, and the pixel point information includes the coordinate position of the pixel point and brightness change information.
可选地,本申请实施例中,电子设备获取第一传感器采集的目标数据,并从缓存解码器中获取前一时刻写入的第一图像数据。Optionally, in an embodiment of the present application, the electronic device obtains target data collected by the first sensor, and obtains the first image data written at a previous moment from the cache decoder.
可选地,本申请实施例中,上述第三图像数据包括第四图像数据,结合图8,如图9所示,在上述步骤102之后,本申请实施例提供的一种视频编解码方法还包括下述的步骤801和步骤802。Optionally, in an embodiment of the present application, the third image data includes fourth image data. In combination with FIG. 8 , as shown in FIG. 9 , after the above step 102 , a video encoding and decoding method provided in an embodiment of the present application further includes the following steps 801 and 802 .
步骤801、电子设备通过第一传感器获取目标数据。Step 801: The electronic device obtains target data through a first sensor.
可选地,本申请实施例中,在第一传感器中的像素点在一个时间段内接收的像素亮度变化信息超过一个阈值时输出目标数据,该目标数据可以指示传感器中亮度发生变化的像素点信息,该像素点信息包括像素点的坐标位置和亮度变化信息。Optionally, in an embodiment of the present application, target data is output when pixel brightness change information received by a pixel point in the first sensor within a time period exceeds a threshold value. The target data may indicate pixel point information in the sensor whose brightness has changed, and the pixel point information includes the coordinate position of the pixel point and brightness change information.
步骤802、电子设备将目标数据作为第一非关键视频帧编码入视频码流。Step 802: The electronic device encodes the target data as a first non-key video frame into a video code stream.
可选地,本申请实施例中,电子设备获取目标数据后,将该目标数据对应的图像帧作为一帧非关键视频帧编码入视频码流,并存入缓存编码器中。Optionally, in an embodiment of the present application, after the electronic device obtains the target data, it encodes the image frame corresponding to the target data as a non-key video frame into a video code stream and stores it in a cache encoder.
如此可知,由于电子设备在获取第一图像数据和目标数据之后,还会将目标数据作为第一非关键视频帧编码入视频码流,从而可以使电子设备实时采集到指示拍摄场景中物体发生运动的信息,因此可以提升电子设备拍摄的视频的图像画质。It can be seen that after the electronic device obtains the first image data and the target data, it will also encode the target data as the first non-critical video frame into the video code stream, so that the electronic device can collect information indicating the movement of objects in the shooting scene in real time, thereby improving the image quality of the video shot by the electronic device.
步骤702、电子设备根据第一图像数据和目标数据,重建生成第四图像数据。Step 702: The electronic device reconstructs and generates fourth image data according to the first image data and the target data.
可选地,本申请实施例中,电子设备将获取的第一图像数据和目标数据输入重建算法中,重建生成第四图像数据。Optionally, in an embodiment of the present application, the electronic device inputs the acquired first image data and target data into a reconstruction algorithm to reconstruct and generate fourth image data.
可以理解,由于第一传感器可以实时输出具有光强变化的像素点信息,能有效提取运动对象的运动信息,从而第一传感器输出的目标数据本身包含有拍摄场景中运动对象的运动信息,该目标数据包括第一传感器内亮度发生变化的像素点的坐标位置和亮度变化信息。因此根据第一图像数据和目标数据,将两种数据中对应的像素点的像 素信息进行重建计算,以生成当前图像帧的图像数据。It can be understood that since the first sensor can output pixel information with light intensity changes in real time, it can effectively extract the motion information of the moving object, so the target data output by the first sensor itself contains the motion information of the moving object in the shooting scene, and the target data includes the coordinate position and brightness change information of the pixel points with brightness changes in the first sensor. Therefore, according to the first image data and the target data, the image of the corresponding pixel points in the two data is converted into The pixel information is reconstructed and calculated to generate image data of the current image frame.
如此可知,由于电子设备可以先从电子设备的缓存解码器中获取第一图像数据,并在拍摄场景中的物体发生运动时通过第一传感器获取目标数据,从而可以根据两种图像数据重建生成第四图像数据,因此可以使电子设备实时采集到指示拍摄场景中物体发生运动的信息,提升了电子设备拍摄的视频的图像画质。Thus, it can be seen that since the electronic device can first obtain the first image data from the cache decoder of the electronic device, and obtain the target data through the first sensor when the object in the shooting scene moves, it can reconstruct and generate the fourth image data based on the two image data. Therefore, the electronic device can collect information indicating the movement of the object in the shooting scene in real time, thereby improving the image quality of the video shot by the electronic device.
可选地,本申请实施例中,在电子设备只获取到目标数据的情况下,则将目标数据写入到缓存编码器内,并且电子设备从缓存解码器中读取第三图像数据后,可以将当前获取的目标数据和第三图像数据输入到重建算法,生成重建后的图像数据,并将该图像数据覆盖缓存解码器原来的图像数据。Optionally, in an embodiment of the present application, when the electronic device only acquires target data, the target data is written into the cache encoder, and after the electronic device reads the third image data from the cache decoder, the currently acquired target data and the third image data can be input into the reconstruction algorithm to generate reconstructed image data, and the image data can be used to overwrite the original image data of the cache decoder.
可选地,本申请实施例中,在电子设备没有获取到任何图像数据的情况下,不做任何动作继续等待下一个图像数据。Optionally, in the embodiment of the present application, when the electronic device does not acquire any image data, it does not take any action and continues to wait for the next image data.
以下举例具体说明本申请实施例提供的视频编解码方法。The following examples specifically illustrate the video encoding and decoding method provided in the embodiments of the present application.
举例说明,如图10所示,电子设备包括第一传感器和第二传感器,触发开启电子设后,第一传感器(以DVS传感器为例)采集DVS数据,第二传感器采集RGB数据,电子设备将第二传感器采集的第一帧作为第一关键帧(即I帧),并对该第一关键帧对应的第一图像数据进行编码写入视频码流并存入缓存编码器后,初始化当前获取到第一关键帧的编码数据的时间为零时,并设置一个第一阈值(例如时间间隔T)。同时,电子设备对该第一图像数据进行解码(即图中RGB_Decoder_pre)并写入缓存解码器内。假设电子设备获取图像数据的时间为t,电子设备对获取的图像数据有以下几种处理方式:For example, as shown in FIG10, the electronic device includes a first sensor and a second sensor. After the electronic device is triggered to turn on, the first sensor (taking the DVS sensor as an example) collects DVS data, and the second sensor collects RGB data. The electronic device uses the first frame collected by the second sensor as the first key frame (i.e., I frame), and encodes the first image data corresponding to the first key frame into the video code stream and stores it in the cache encoder. When the time when the encoded data of the first key frame is currently obtained is initialized to zero, a first threshold value (e.g., time interval T) is set. At the same time, the electronic device decodes the first image data (i.e., RGB_Decoder_pre in the figure) and writes it into the cache decoder. Assuming that the time when the electronic device obtains the image data is t, the electronic device has the following processing methods for the obtained image data:
t时刻只获取到DVS数据,则将DVS数据写入到缓存编码器内,并从缓存解码器中读取第一图像数据(即RGB_Decoder_pre)。电子设备将t时刻的DVS数据和第一图像数据输入到重建算法,重建生成当前时刻的第四图像数据(即重建后的RGB_Decoder_pre),并覆盖掉缓存解码器原来的图像数据。If only DVS data is obtained at time t, the DVS data is written into the cache encoder, and the first image data (i.e., RGB_Decoder_pre) is read from the cache decoder. The electronic device inputs the DVS data and the first image data at time t into the reconstruction algorithm, reconstructs and generates the fourth image data at the current moment (i.e., the reconstructed RGB_Decoder_pre), and overwrites the original image data of the cache decoder.
t时刻只有RGB数据,若t时刻到初始化时刻的时间间隔小于第一阈值,则不做任何动作继续等待下一个图像数据。There is only RGB data at time t. If the time interval from time t to the initialization time is less than the first threshold, no action is taken and the next image data is continued to be waited.
t时刻有DVS数据和RGB数据(即第二图像数据),若t时刻到初始化时刻的时间间隔小于第一阈值,则将DVS数据写入到缓存编码器内,并从缓存解码器中读取第四图像数据(即t时刻之前缓存解码器内的RGB_Decoder_pre)。电子设备将t时刻的DVS数据和第四图像数据输入到重建算法,重建生成当前时刻的图像数据(即重建后的RGB_Decoder_pre),写入并覆盖缓存解码器原来的图像数据。At time t, there are DVS data and RGB data (i.e., second image data). If the time interval from time t to the initialization time is less than the first threshold, the DVS data is written into the cache encoder, and the fourth image data (i.e., RGB_Decoder_pre in the cache decoder before time t) is read from the cache decoder. The electronic device inputs the DVS data and the fourth image data at time t into the reconstruction algorithm, reconstructs and generates the image data at the current time (i.e., the reconstructed RGB_Decoder_pre), and writes and overwrites the original image data of the cache decoder.
t时刻有DVS数据和RGB数据(即第二图像数据),若t时刻到初始化时刻的时间间隔大于第一阈值,则将DVS数据写入到缓存编码器内,并从缓存解码器中读取第四图像数据(即t时刻之前缓存解码器内的RGB_Decoder_pre)。电子设备将t时刻的DVS数据和第四图像数据输入到重建算法,重建生成当前时刻的重建图像数据,并将该重建图像数据和第二图像数据进行比较,若该重建图像数据和第二图像数据间的像素点的亮度变化信息大于或等于第二阈值,则将第二图像数据作为第二关键视频帧编码入视频码流,同时对第二图像数据进行解码写入并覆盖缓存解码器原来的第四图像数据;若该重建图像数据和第二图像数据间的像素点的亮度变化信息小于第二阈值,则将该重建图像数据写入并覆盖缓存解码器原来的第四图像数据。At time t, there are DVS data and RGB data (i.e., the second image data). If the time interval from time t to the initialization time is greater than the first threshold, the DVS data is written into the cache encoder, and the fourth image data (i.e., RGB_Decoder_pre in the cache decoder before time t) is read from the cache decoder. The electronic device inputs the DVS data and the fourth image data at time t into the reconstruction algorithm, reconstructs and generates the reconstructed image data at the current moment, and compares the reconstructed image data with the second image data. If the brightness change information of the pixel points between the reconstructed image data and the second image data is greater than or equal to the second threshold, the second image data is encoded into the video bitstream as the second key video frame, and the second image data is decoded and written to overwrite the original fourth image data of the cache decoder; if the brightness change information of the pixel points between the reconstructed image data and the second image data is less than the second threshold, the reconstructed image data is written to overwrite the original fourth image data of the cache decoder.
t时刻只有RGB数据(即第二图像数据),若t时刻到初始化时刻的时间间隔大于第一阈值,电子设备从缓存解码器内读取第四图像数据(即t时刻之前缓存解码器内的RGB_Decoder_pre)。若该第四图像数据(此时第三数据为第四图像数据)和第二图像数据间的像素点的亮度变化信息大于或等于第二阈值,则将第二图像数据作为 第二关键视频帧编码入视频码流,同时对第二图像数据进行解码写入并覆盖缓存解码器原来的第四图像数据;若该第四图像数据和第二图像数据间的像素点的亮度变化信息小于第二阈值,则将该第四图像数据重新写入缓存解码器。At time t, there is only RGB data (i.e., the second image data). If the time interval from time t to the initialization time is greater than the first threshold, the electronic device reads the fourth image data from the cache decoder (i.e., the RGB_Decoder_pre in the cache decoder before time t). If the brightness change information of the pixel points between the fourth image data (the third data is the fourth image data at this time) and the second image data is greater than or equal to the second threshold, the second image data is used as The second key video frame is encoded into the video code stream, and the second image data is decoded and written to overwrite the original fourth image data of the cache decoder; if the brightness change information of the pixel points between the fourth image data and the second image data is less than the second threshold, the fourth image data is rewritten into the cache decoder.
t时刻无任何图像数据,不做任何动作继续等待下一个图像数据。There is no image data at time t, so no action is taken and the system continues to wait for the next image data.
本申请实施例提供的视频编解码方法,执行主体可以为装置。本申请实施例中以装置执行方法为例,说明本申请实施例提供的视频编解码装置。The video encoding and decoding method provided in the embodiment of the present application can be executed by a device. In the embodiment of the present application, the video encoding and decoding device provided in the embodiment of the present application is described by taking the device execution method as an example.
图11示出了上述实施例中所涉及的一种视频编解码装置60,该视频编解码装置60包括:编码模块61和获取模块62。编码模块61,用于将第一图像数据作为第一关键视频帧编码入视频码流。获取模块62,用于获取第二图像数据。编码模块61,还用于在第三图像数据与获取模块获取的第二图像数据间满足目标条件的情况下,将该第二图像数据作为第二关键视频帧编码入视频码流。其中,第三图像数据包括以下任一项:第一图像数据、第四图像数据;第四图像数据为:基于目标数据得到的图像数据;目标数据用于指示电子设备的第一传感器中像素点的亮度变化信息。FIG11 shows a video encoding and decoding device 60 involved in the above-mentioned embodiment, and the video encoding and decoding device 60 includes: an encoding module 61 and an acquisition module 62. The encoding module 61 is used to encode the first image data as a first key video frame into a video code stream. The acquisition module 62 is used to acquire the second image data. The encoding module 61 is also used to encode the second image data as a second key video frame into a video code stream when the target condition is met between the third image data and the second image data acquired by the acquisition module. The third image data includes any one of the following: the first image data, the fourth image data; the fourth image data is: image data obtained based on the target data; the target data is used to indicate the brightness change information of the pixel points in the first sensor of the electronic device.
在一种可能的实现方式中,上述视频编解码装置60还包括:重建模块。其中,获取模块,还用于从电子设备的缓存解码器中获取第一图像数据,并通过第一传感器获取目标数据。重建模块,用于根据获取模块获取的第一图像数据和目标数据,重建生成第四图像数据。In a possible implementation, the video encoding and decoding device 60 further includes: a reconstruction module. The acquisition module is further configured to acquire the first image data from a cache decoder of the electronic device and acquire the target data through the first sensor. The reconstruction module is configured to reconstruct and generate the fourth image data based on the first image data and the target data acquired by the acquisition module.
在一种可能的实现方式中,上述视频编解码装置60还包括:更新模块。其中,更新模块,用于在第三图像数据与第二图像数据间满足目标条件的情况下,将缓存解码器中缓存的第一图像数据,更新为第二图像数据。In a possible implementation, the video encoding and decoding device 60 further includes an updating module, wherein the updating module is configured to update the first image data cached in the cache decoder to the second image data when the third image data and the second image data meet a target condition.
在一种可能的实现方式中,上述获取模块,还用于通过第一传感器获取目标数据。上述编码模块还用于将目标数据作为第一非关键视频帧编码入视频码流。In a possible implementation, the acquisition module is further configured to acquire target data through a first sensor. The encoding module is further configured to encode the target data as a first non-key video frame into a video bit stream.
在一种可能的实现方式中,上述编码模块具体用于在第一时间间隔大于或等于第一阈值、且第三图像数据和第二图像数据间的像素点的亮度变化信息大于或等于第二阈值的情况下,将第二图像数据作为第二关键视频帧编码入视频码流。其中,第一时间间隔为第一时刻至第二时刻间的时间间隔,第一时刻为第二图像数据的获取时刻,第二时刻为第一图像数据的编码时刻。In a possible implementation, the encoding module is specifically used to encode the second image data as a second key video frame into the video code stream when the first time interval is greater than or equal to the first threshold and the brightness change information of the pixel points between the third image data and the second image data is greater than or equal to the second threshold. The first time interval is the time interval between the first moment and the second moment, the first moment is the acquisition moment of the second image data, and the second moment is the encoding moment of the first image data.
在一种可能的实现方式中,上述视频编解码装置60还包括:更新模块。其中,获取模块,还用于从视频编解码装置的缓存解码器中获取第三图像数据。更新模块,用于将获取模块获取的缓存解码器中的第三图像数据,更新为第二图像数据。In a possible implementation, the video codec device 60 further includes an updating module, wherein the acquiring module is further configured to acquire the third image data from the cache decoder of the video codec device, and the updating module is configured to update the third image data in the cache decoder acquired by the acquiring module to the second image data.
在一种可能的实现方式中,上述视频编解码装置60还包括:解码模块和重建模块。其中,解码模块,用于将视频码流中的第三关键视频帧进行解码,得到第五图像数据。重建模块,用于根据解码模块解码得到的第五图像数据和第二非关键视频帧,重建得到第六图像数据。其中,第二非关键视频帧为:第三关键视频帧关联的非关键视频帧。In a possible implementation, the video encoding and decoding device 60 further includes: a decoding module and a reconstruction module. The decoding module is used to decode the third key video frame in the video code stream to obtain fifth image data. The reconstruction module is used to reconstruct the sixth image data according to the fifth image data and the second non-key video frame decoded by the decoding module. The second non-key video frame is: a non-key video frame associated with the third key video frame.
在一种可能的实现方式中,上述视频编解码装置还包括:确定模块。其中,确定模块用于根据预设解码帧率,确定第二时间间隔;并根据第三关键视频帧的解码时刻和第二时间间隔,确定目标解码时刻。重建模块,具体用于在确定模块确定的目标解码时刻,根据第五图像数据和第二非关键视频帧,重建得到第六图像数据。In a possible implementation, the video encoding and decoding device further includes: a determination module. The determination module is used to determine the second time interval according to a preset decoding frame rate; and determine the target decoding time according to the decoding time of the third key video frame and the second time interval. The reconstruction module is specifically used to reconstruct the sixth image data according to the fifth image data and the second non-key video frame at the target decoding time determined by the determination module.
本申请实施例提供的视频编解码装置,由于视频编解码装置可以先将第一图像数据作为第一关键视频帧编码入视频码流;并只有在第三图像数据和第二图像数据间满足目标条件的情况下,才会将第二图像数据作为第二关键视频帧编码入视频码流,因而可以避免输出无效的冗余数据,造成视频编解码装置的存储空间和编解码算力的浪费,而且视频编解码装置在第三图像数据和第二图像数据间满足目标条件的情况下, 可以将更多的关键视频帧编码入视频码流,这样,可以提高解码后的视频的质量。因此,可以在保证画质的前提下节省视频编解码装置在视频数据编解码过程中的存储空间和编解码算力。The video codec device provided by the embodiment of the present application can first encode the first image data as the first key video frame into the video code stream; and only when the target condition is met between the third image data and the second image data, the second image data is encoded into the video code stream as the second key video frame, thereby avoiding outputting invalid redundant data and causing waste of storage space and coding and decoding computing power of the video codec device. Moreover, when the target condition is met between the third image data and the second image data, the video codec device More key video frames can be encoded into the video code stream, so that the quality of the decoded video can be improved. Therefore, the storage space and encoding and decoding computing power of the video encoding and decoding device in the video data encoding and decoding process can be saved while ensuring the image quality.
本申请实施例中的视频编解码装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(mobile internet device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(network attached storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The video encoding and decoding device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, a mobile internet device (mobile internet device, MID), an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (network attached storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
本申请实施例中的视频编解码装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The video encoding and decoding device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
本申请实施例提供的视频编解码装置能够实现图1至图10的方法实施例实现的各个过程,为避免重复,这里不再赘述。The video encoding and decoding device provided in the embodiment of the present application can implement each process implemented by the method embodiments of Figures 1 to 10. To avoid repetition, they will not be described here.
可选地,本申请实施例中,如图12所示,本申请实施例还提供一种电子设备80,包括处理器81和存储器82,存储器82上存储有可在所述处理器81上运行的程序或指令,该程序或指令被处理器81执行时实现上述方法实施例的各个过程步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, in an embodiment of the present application, as shown in Figure 12, the embodiment of the present application also provides an electronic device 80, including a processor 81 and a memory 82, and the memory 82 stores a program or instruction that can be executed on the processor 81. When the program or instruction is executed by the processor 81, the various process steps of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
图13为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 13 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备100包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器110等部件。The electronic device 100 includes but is not limited to components such as a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 110.
本领域技术人员可以理解,电子设备100还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图13中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 110 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The electronic device structure shown in FIG13 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be described in detail here.
其中,处理器110,具体用于将第一图像数据作为第一关键视频帧编码入视频码流;获取第二图像数据;在第三图像数据与第二图像数据间满足目标条件的情况下,将该第二图像数据作为第二关键视频帧编码入视频码流;其中,第三图像数据包括以下任一项:第一图像数据、第四图像数据;第四图像数据为:基于目标数据得到的图像数据;目标数据用于指示电子设备的第一传感器中像素点的亮度变化信息。Among them, the processor 110 is specifically used to encode the first image data as a first key video frame into a video code stream; obtain the second image data; when the target condition is met between the third image data and the second image data, encode the second image data as a second key video frame into the video code stream; wherein the third image data includes any one of the following: the first image data, the fourth image data; the fourth image data is: image data obtained based on the target data; the target data is used to indicate the brightness change information of the pixel points in the first sensor of the electronic device.
本申请实施例提供的电子设备,由于电子设备可以先将第一图像数据作为第一关键视频帧编码入视频码流;并只有在第三图像数据和第二图像数据间满足目标条件的情况下,才会将第二图像数据作为第二关键视频帧编码入视频码流,因而可以避免输出无效的冗余数据,造成电子设备的存储空间和编解码算力的浪费,而且电子设备在第三图像数据和第二图像数据间满足目标条件的情况下,可以将更多的关键视频帧编码入视频码流,这样,可以提高解码后的视频的质量。因此,可以在保证画质的前提下节省电子设备在视频数据编解码过程中的存储空间和编解码算力。 The electronic device provided by the embodiment of the present application can first encode the first image data as the first key video frame into the video code stream; and only when the target condition is met between the third image data and the second image data, the second image data will be encoded into the video code stream as the second key video frame, thereby avoiding the output of invalid redundant data, resulting in a waste of storage space and encoding and decoding computing power of the electronic device, and the electronic device can encode more key video frames into the video code stream when the target condition is met between the third image data and the second image data, so that the quality of the decoded video can be improved. Therefore, the storage space and encoding and decoding computing power of the electronic device in the video data encoding and decoding process can be saved under the premise of ensuring the image quality.
可选地,本申请实施例中,处理器110,具体用于从电子设备的缓存解码器中获取第一图像数据,并通过第一传感器获取目标数据;根据第一图像数据和目标数据,重建生成第四图像数据。Optionally, in an embodiment of the present application, the processor 110 is specifically used to obtain first image data from a cache decoder of the electronic device, and obtain target data through a first sensor; and reconstruct and generate fourth image data based on the first image data and the target data.
如此可知,由于电子设备可以先从电子设备的缓存解码器中获取第一图像数据,并在拍摄场景中的物体发生运动时通过第一传感器获取目标数据,从而可以根据两种图像数据重建生成第四图像数据,因此可以使电子设备实时采集到指示拍摄场景中物体发生运动的信息,提升了电子设备拍摄的视频的图像画质。Thus, it can be seen that since the electronic device can first obtain the first image data from the cache decoder of the electronic device, and obtain the target data through the first sensor when the object in the shooting scene moves, it can reconstruct and generate the fourth image data based on the two image data. Therefore, the electronic device can collect information indicating the movement of the object in the shooting scene in real time, thereby improving the image quality of the video shot by the electronic device.
可选地,本申请实施例中,处理器110,具体用于在第三图像数据与第二图像数据间满足目标条件的情况下,将缓存解码器中缓存的第一图像数据,更新为第二图像数据。Optionally, in the embodiment of the present application, the processor 110 is specifically configured to update the first image data cached in the cache decoder to the second image data when a target condition is satisfied between the third image data and the second image data.
如此可知,由于电子设备在将第二图像数据作为第二关键视频帧编码入视频码流后,对该第二图像数据进行解码并写入缓存解码器以更新缓存解码器内的第一图像数据,并再次初始化图像数据接收时间,从而可以防止受重建算法产生累积误差导致解码时视频图像重建的效果不佳,因此可以提升电子设备拍摄的视频的图像画质。It can be seen that after the electronic device encodes the second image data as the second key video frame into the video code stream, it decodes the second image data and writes it into the cache decoder to update the first image data in the cache decoder, and initializes the image data receiving time again, thereby preventing the cumulative errors generated by the reconstruction algorithm from causing poor video image reconstruction during decoding, thereby improving the image quality of the video shot by the electronic device.
可选地,本申请实施例中,处理器110,具体用于通过第一传感器获取目标数据;将目标数据作为第一非关键视频帧编码入视频码流。Optionally, in an embodiment of the present application, the processor 110 is specifically configured to acquire target data through a first sensor; and encode the target data as a first non-critical video frame into a video bitstream.
如此可知,由于电子设备在获取第一图像数据和目标数据之后,还会将目标数据作为第一非关键视频帧编码入视频码流,从而可以使电子设备实时采集到指示拍摄场景中物体发生运动的信息,因此可以提升电子设备拍摄的视频的图像画质。It can be seen that after the electronic device obtains the first image data and the target data, it will also encode the target data as the first non-critical video frame into the video code stream, so that the electronic device can collect information indicating the movement of objects in the shooting scene in real time, thereby improving the image quality of the video shot by the electronic device.
可选地,本申请实施例中,处理器110,具体用于在第一时间间隔大于或等于第一阈值、且第三图像数据和第二图像数据间的像素点的亮度变化信息大于或等于第二阈值的情况下,将第二图像数据作为第二关键视频帧编码入视频码流;其中,第一时间间隔为第一时刻至第二时刻间的时间间隔,第一时刻为第二图像数据的获取时刻,第二时刻为第一图像数据的编码时刻。Optionally, in an embodiment of the present application, the processor 110 is specifically used to encode the second image data as a second key video frame into the video code stream when the first time interval is greater than or equal to a first threshold and the brightness change information of the pixel points between the third image data and the second image data is greater than or equal to a second threshold; wherein the first time interval is the time interval between the first moment and the second moment, the first moment is the moment of acquiring the second image data, and the second moment is the moment of encoding the first image data.
如此可知,由于电子设备在获取到第二图像数据的时间至第一图像数据的编码时刻的时间间隔大于或等于第一阈值的情况下,若第三图像数据和第二图像数据间的像素点的亮度变化信息的差值大于或等于第二阈值,才会将第二图像数据作为第二关键视频帧编码入视频码流,因此电子设备可以在第一时间只将亮度变化较大的图像数据(即拍摄场景中物体发生复杂运动时第二传感器采集的图像数据)编码入视频码流,从而实现了关键视频帧的动态采集,保证了画质且节省了电子设备在视频数据编码过程中的存储空间和解码算力。It can be seen that since the time interval from the time when the electronic device acquires the second image data to the encoding time of the first image data is greater than or equal to the first threshold, the second image data will be encoded into the video code stream as the second key video frame only if the difference in brightness change information of the pixel points between the third image data and the second image data is greater than or equal to the second threshold. Therefore, the electronic device can encode only the image data with large brightness changes (that is, the image data collected by the second sensor when the objects in the shooting scene undergo complex movements) into the video code stream at the first time, thereby realizing dynamic acquisition of key video frames, ensuring image quality and saving storage space and decoding computing power of the electronic device during the video data encoding process.
可选地,本申请实施例中,处理器110,具体用于从电子设备的缓存解码器中获取第三图像数据;将缓存解码器中的第三图像数据,更新为第二图像数据。Optionally, in the embodiment of the present application, the processor 110 is specifically configured to obtain third image data from a cache decoder of the electronic device; and update the third image data in the cache decoder to the second image data.
如此可知,由于电子设备在获取到第二图像数据的情况下,在确定第三图像数据和第二图像数据间是否满足目标条件之前先从电子设备的缓存解码器中获取第三图像数据,并在第二图像数据作为第二关键视频帧编码入视频码流后,对该第二图像数据进行解码并写入缓存解码器内以更新之前的第三图像数据。从而电子设备的缓存解码器内始终只存储最新的一帧视频帧的解码数据,因此可以节省电子设备的解码缓存的数据空间。Thus, it can be known that, when the electronic device obtains the second image data, before determining whether the third image data and the second image data meet the target condition, the third image data is first obtained from the cache decoder of the electronic device, and after the second image data is encoded into the video code stream as the second key video frame, the second image data is decoded and written into the cache decoder to update the previous third image data. Therefore, the cache decoder of the electronic device always stores only the decoded data of the latest video frame, so the data space of the decoding cache of the electronic device can be saved.
可选地,本申请实施例中,处理器110,具体用于将视频码流中的第三关键视频帧进行解码,得到第五图像数据;根据第五图像数据和第二非关键视频帧,重建得到第六图像数据;其中,第二非关键视频帧为:第三关键视频帧关联的非关键视频帧。Optionally, in an embodiment of the present application, the processor 110 is specifically used to decode the third key video frame in the video code stream to obtain fifth image data; reconstruct the sixth image data based on the fifth image data and the second non-key video frame; wherein the second non-key video frame is: a non-key video frame associated with the third key video frame.
如此可知,由于电子设备可以先将视频码流中的第三关键视频帧进行解码,得到第五图像数据,并采用重建算法,只需要根据第五图像数据和第二非关键视频帧,就 可以重建得到第六图像数据,从而避免传统方法复杂的解码运算,因此节省了电子设备在视频数据解码过程中的存储空间和解码算力。Thus, it can be seen that since the electronic device can first decode the third key video frame in the video code stream to obtain the fifth image data, and adopt the reconstruction algorithm, it only needs to be based on the fifth image data and the second non-key video frame. The sixth image data can be reconstructed, thereby avoiding the complex decoding operations of the traditional method, thereby saving the storage space and decoding computing power of the electronic device during the video data decoding process.
可选地,本申请实施例中,处理器110,具体用于根据预设解码帧率,确定第二时间间隔;根据第三关键视频帧的解码时刻和第二时间间隔,确定目标解码时刻;在目标解码时刻,根据第五图像数据和第二非关键视频帧,重建得到第六图像数据。如此可知,由于电子设备可以先根据预设解码帧率确定目标时间间隔以及目标解码时刻,并在目标解码时刻根据视频码流的数据类型采用不同的方法进行解码,从而避免了对冗余数据的大量运算,节省了运算功耗。Optionally, in an embodiment of the present application, the processor 110 is specifically configured to determine the second time interval according to a preset decoding frame rate; determine the target decoding time according to the decoding time of the third key video frame and the second time interval; and reconstruct the sixth image data at the target decoding time according to the fifth image data and the second non-key video frame. As can be seen, since the electronic device can first determine the target time interval and the target decoding time according to the preset decoding frame rate, and use different methods to decode according to the data type of the video code stream at the target decoding time, a large amount of calculations on redundant data are avoided, saving calculation power consumption.
应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(graphics processing unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板1061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板1061。用户输入单元1007包括触控面板1071以及其他输入设备1072中的至少一种。触控面板1071,也称为触摸屏。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其他输入设备1072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processing unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
存储器1009可用于存储软件程序以及各种数据。存储器1009可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1009可以包括易失性存储器或非易失性存储器,或者,存储器1009可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DRRAM)。本申请实施例中的存储器1009包括但不限于这些和任意其它适合类型的存储器。The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static RAM (SRAM), a dynamic RAM (DRAM), a synchronous DRAM (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct RAM bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
处理器110可包括一个或多个处理单元;可选的,处理器110集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添 加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. For example, the described method may be performed in an order different from that described, and may also be added. Various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。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, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims (16)

  1. 一种视频编解码方法,所述方法包括:A video encoding and decoding method, the method comprising:
    将第一图像数据作为第一关键视频帧编码入视频码流;Encoding the first image data as a first key video frame into a video bitstream;
    获取第二图像数据;acquiring second image data;
    在第三图像数据与所述第二图像数据间满足目标条件的情况下,将所述第二图像数据作为第二关键视频帧编码入所述视频码流;When the third image data and the second image data satisfy a target condition, encoding the second image data as a second key video frame into the video code stream;
    其中,所述第三图像数据包括以下任一项:所述第一图像数据、第四图像数据;所述第四图像数据为:基于目标数据得到的图像数据;所述目标数据用于指示电子设备的第一传感器中像素点的亮度变化信息。Among them, the third image data includes any one of the following: the first image data and the fourth image data; the fourth image data is: image data obtained based on target data; the target data is used to indicate brightness change information of pixel points in the first sensor of the electronic device.
  2. 根据权利要求1所述的方法,其中,所述第三图像数据包括所述第四图像数据;The method according to claim 1, wherein the third image data includes the fourth image data;
    在所述获取第二图像数据之后,所述方法还包括:After acquiring the second image data, the method further includes:
    从所述电子设备的缓存解码器中获取所述第一图像数据,并通过所述第一传感器获取所述目标数据;Acquire the first image data from a cache decoder of the electronic device, and acquire the target data through the first sensor;
    根据所述第一图像数据和所述目标数据,重建生成所述第四图像数据。The fourth image data is reconstructed and generated based on the first image data and the target data.
  3. 根据权利要求2所述的方法,其中,在所述获取第二图像数据之后,所述方法还包括:The method according to claim 2, wherein after acquiring the second image data, the method further comprises:
    在所述第三图像数据与所述第二图像数据间满足所述目标条件的情况下,将所述缓存解码器中缓存的所述第一图像数据,更新为所述第二图像数据。When the target condition is satisfied between the third image data and the second image data, the first image data cached in the cache decoder is updated to the second image data.
  4. 根据权利要求1所述的方法,其中,所述第三图像数据包括所述第四图像数据,在所述获取第二图像数据之后,所述方法还包括:The method according to claim 1, wherein the third image data includes the fourth image data, and after acquiring the second image data, the method further comprises:
    通过所述第一传感器获取所述目标数据;Acquiring the target data through the first sensor;
    将所述目标数据作为第一非关键视频帧编码入所述视频码流。The target data is encoded into the video code stream as a first non-key video frame.
  5. 根据权利要求1所述的方法,其中,所述在第三图像数据与所述第二图像数据间满足目标条件的情况下,将所述第二图像数据作为第二关键视频帧编码入所述视频码流,包括:The method according to claim 1, wherein, when the third image data and the second image data meet a target condition, encoding the second image data as a second key video frame into the video bitstream comprises:
    在第一时间间隔大于或等于第一阈值、且所述第三图像数据和所述第二图像数据间的像素点的亮度变化信息大于或等于第二阈值的情况下,将所述第二图像数据作为所述第二关键视频帧编码入所述视频码流;When the first time interval is greater than or equal to a first threshold and the brightness change information of the pixel points between the third image data and the second image data is greater than or equal to a second threshold, encoding the second image data as the second key video frame into the video bitstream;
    其中,所述第一时间间隔为第一时刻至第二时刻间的时间间隔,所述第一时刻为所述第二图像数据的获取时刻,所述第二时刻为所述第一图像数据的编码时刻。The first time interval is the time interval between a first moment and a second moment, the first moment is the moment of acquiring the second image data, and the second moment is the moment of encoding the first image data.
  6. 根据权利要求5所述的方法,其中,在所述将所述第二图像数据作为第二关键视频帧编码入所述视频码流之前,所述方法还包括:The method according to claim 5, wherein, before encoding the second image data as a second key video frame into the video code stream, the method further comprises:
    从所述电子设备的缓存解码器中获取所述第三图像数据;Acquire the third image data from a cache decoder of the electronic device;
    在所述将所述第二图像数据作为第二关键视频帧编码入所述视频码流之后还包括:After encoding the second image data as a second key video frame into the video code stream, the method further includes:
    将所述缓存解码器中的所述第三图像数据,更新为所述第二图像数据。The third image data in the cache decoder is updated to the second image data.
  7. 根据权利要求1所述的方法,其中,在所述将所述第二图像数据作为第二关键视频帧编码入所述视频码流之后,所述方法还包括:The method according to claim 1, wherein, after encoding the second image data as a second key video frame into the video bitstream, the method further comprises:
    将所述视频码流中的第三关键视频帧进行解码,得到第五图像数据;Decoding the third key video frame in the video code stream to obtain fifth image data;
    根据所述第五图像数据和第二非关键视频帧,重建得到第六图像数据;Reconstructing sixth image data according to the fifth image data and the second non-key video frame;
    其中,所述第二非关键视频帧为:所述第三关键视频帧关联的非关键视频帧。The second non-key video frame is a non-key video frame associated with the third key video frame.
  8. 根据权利要求7所述的方法,其中,在所述将所述视频码流中的第三关键视 频帧进行解码,得到第五图像数据之后,所述方法还包括:The method according to claim 7, wherein, in the step of converting the third key video in the video code stream After decoding the video frame to obtain fifth image data, the method further includes:
    根据预设解码帧率,确定第二时间间隔;Determining a second time interval according to a preset decoding frame rate;
    根据所述第三关键视频帧的解码时刻和所述第二时间间隔,确定目标解码时刻;Determining a target decoding time according to the decoding time of the third key video frame and the second time interval;
    根据所述第五图像数据和第二非关键视频帧,重建得到第六图像数据,包括:Reconstructing the sixth image data according to the fifth image data and the second non-key video frame includes:
    在所述目标解码时刻,根据所述第五图像数据和所述第二非关键视频帧,重建得到所述第六图像数据。At the target decoding time, the sixth image data is reconstructed based on the fifth image data and the second non-critical video frame.
  9. 一种视频编解码装置,所述装置包括:编码模块和获取模块;A video encoding and decoding device, the device comprising: an encoding module and an acquisition module;
    所述编码模块,用于将第一图像数据作为第一关键视频帧编码入视频码流;The encoding module is used to encode the first image data as a first key video frame into a video code stream;
    所述获取模块,用于获取第二图像数据;The acquisition module is used to acquire second image data;
    所述编码模块,还用于在第三图像数据与所述获取模块获取的第二图像数据间满足目标条件的情况下,将所述第二图像数据作为第二关键视频帧编码入所述视频码流;The encoding module is further configured to encode the second image data as a second key video frame into the video code stream when the third image data and the second image data acquired by the acquisition module meet a target condition;
    其中,所述第三图像数据包括以下任一项:所述第一图像数据、第四图像数据;所述第四图像数据为:基于目标数据得到的图像数据;所述目标数据用于指示电子设备的第一传感器中像素点的亮度变化信息。Among them, the third image data includes any one of the following: the first image data and the fourth image data; the fourth image data is: image data obtained based on target data; the target data is used to indicate brightness change information of pixel points in the first sensor of the electronic device.
  10. 根据权利要求9所述的视频编解码装置,其中,所述视频编解码装置还包括:重建模块;The video encoding and decoding device according to claim 9, wherein the video encoding and decoding device further comprises: a reconstruction module;
    所述获取模块,还用于从所述电子设备的缓存解码器中获取所述第一图像数据,并通过所述第一传感器获取所述目标数据;The acquisition module is further used to acquire the first image data from a cache decoder of the electronic device, and acquire the target data through the first sensor;
    所述重建模块,用于根据所述获取模块获取的第一图像数据和所述目标数据,重建生成所述第四图像数据。The reconstruction module is used to reconstruct and generate the fourth image data based on the first image data acquired by the acquisition module and the target data.
  11. 根据权利要求9所述的视频编解码装置,其中,The video encoding and decoding device according to claim 9, wherein:
    所述编码模块具体用于在第一时间间隔大于或等于第一阈值、且所述第三图像数据和所述第二图像数据间的像素点的亮度变化信息大于或等于第二阈值的情况下,将所述第二图像数据作为所述第二关键视频帧编码入所述视频码流;The encoding module is specifically configured to encode the second image data as the second key video frame into the video bitstream when the first time interval is greater than or equal to a first threshold and the brightness change information of the pixel points between the third image data and the second image data is greater than or equal to a second threshold;
    其中,所述第一时间间隔为第一时刻至第二时刻间的时间间隔,所述第一时刻为所述第二图像数据的获取时刻,所述第二时刻为所述第一图像数据的编码时刻。The first time interval is the time interval between a first moment and a second moment, the first moment is the moment of acquiring the second image data, and the second moment is the moment of encoding the first image data.
  12. 根据权利要求9所述的视频编解码装置,其中,所述视频编解码装置还包括:解码模块和重建模块;The video encoding and decoding device according to claim 9, wherein the video encoding and decoding device further comprises: a decoding module and a reconstruction module;
    所述解码模块,用于将所述视频码流中的第三关键视频帧进行解码,得到第五图像数据;The decoding module is used to decode the third key video frame in the video code stream to obtain fifth image data;
    所述重建模块,用于根据所述解码模块解码得到的第五图像数据和第二非关键视频帧,重建得到第六图像数据;The reconstruction module is used to reconstruct the sixth image data according to the fifth image data and the second non-key video frame decoded by the decoding module;
    其中,所述第二非关键视频帧为:所述第三关键视频帧关联的非关键视频帧。The second non-key video frame is a non-key video frame associated with the third key video frame.
  13. 一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至8中任一项所述的视频编解码方法的步骤。An electronic device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the video encoding and decoding method as described in any one of claims 1 to 8 are implemented.
  14. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至8中任一项所述的视频编解码方法的步骤。A readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the video encoding and decoding method according to any one of claims 1 to 8 are implemented.
  15. 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至8任一项所述的视频编解码方法的步骤。A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the video encoding and decoding method according to any one of claims 1 to 8.
  16. 一种计算机程序产品,所述程序产品被至少一个处理器执行以实现如权利要求1至8中任一项所述的视频编解码方法的步骤。 A computer program product, wherein the program product is executed by at least one processor to implement the steps of the video encoding and decoding method according to any one of claims 1 to 8.
PCT/CN2023/132683 2022-11-24 2023-11-20 Video encoding/decoding method and apparatus, electronic device, and medium WO2024109701A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211484822.2 2022-11-24
CN202211484822.2A CN115834889A (en) 2022-11-24 2022-11-24 Video encoding and decoding method, device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
WO2024109701A1 true WO2024109701A1 (en) 2024-05-30

Family

ID=85531254

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/132683 WO2024109701A1 (en) 2022-11-24 2023-11-20 Video encoding/decoding method and apparatus, electronic device, and medium

Country Status (2)

Country Link
CN (1) CN115834889A (en)
WO (1) WO2024109701A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115834889A (en) * 2022-11-24 2023-03-21 维沃移动通信有限公司 Video encoding and decoding method, device, electronic equipment and medium
CN117156142A (en) * 2023-08-29 2023-12-01 维沃移动通信有限公司 Video encoding and decoding methods, devices, electronic equipment and readable storage media

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050169371A1 (en) * 2004-01-30 2005-08-04 Samsung Electronics Co., Ltd. Video coding apparatus and method for inserting key frame adaptively
CN101090500A (en) * 2007-07-13 2007-12-19 华为技术有限公司 Code-decode method and device for video fast forward
CN105072439A (en) * 2015-07-31 2015-11-18 珠海市杰理科技有限公司 Method and device for inserting key frame in video encoding
CN108737825A (en) * 2017-04-13 2018-11-02 腾讯科技(深圳)有限公司 Method for coding video data, device, computer equipment and storage medium
CN113068001A (en) * 2019-12-16 2021-07-02 浙江宇视科技有限公司 Data processing method, device, equipment and medium based on cascade camera
CN114189686A (en) * 2021-12-23 2022-03-15 咪咕文化科技有限公司 Video encoding method, apparatus, device, and computer-readable storage medium
CN115834889A (en) * 2022-11-24 2023-03-21 维沃移动通信有限公司 Video encoding and decoding method, device, electronic equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050169371A1 (en) * 2004-01-30 2005-08-04 Samsung Electronics Co., Ltd. Video coding apparatus and method for inserting key frame adaptively
CN101090500A (en) * 2007-07-13 2007-12-19 华为技术有限公司 Code-decode method and device for video fast forward
CN105072439A (en) * 2015-07-31 2015-11-18 珠海市杰理科技有限公司 Method and device for inserting key frame in video encoding
CN108737825A (en) * 2017-04-13 2018-11-02 腾讯科技(深圳)有限公司 Method for coding video data, device, computer equipment and storage medium
CN113068001A (en) * 2019-12-16 2021-07-02 浙江宇视科技有限公司 Data processing method, device, equipment and medium based on cascade camera
CN114189686A (en) * 2021-12-23 2022-03-15 咪咕文化科技有限公司 Video encoding method, apparatus, device, and computer-readable storage medium
CN115834889A (en) * 2022-11-24 2023-03-21 维沃移动通信有限公司 Video encoding and decoding method, device, electronic equipment and medium

Also Published As

Publication number Publication date
CN115834889A (en) 2023-03-21

Similar Documents

Publication Publication Date Title
WO2024109701A1 (en) Video encoding/decoding method and apparatus, electronic device, and medium
JP5295045B2 (en) Method and apparatus for providing high resolution images in embedded devices
CN113068040A (en) Image compression method and device, electronic equipment and readable storage medium
CN112770059B (en) Photographing method and device and electronic equipment
JP3223962B2 (en) Image decoding method
CN111526404B (en) Single frame playing method, video playing device, monitoring equipment and storage medium
CN114298889A (en) Image processing circuit and image processing method
TW201914303A (en) Video encoding apparatus
CN112565603A (en) Image processing method and device and electronic equipment
WO2023207872A1 (en) Video encoding and decoding method, video codec and electronic device
CN115361582A (en) A video real-time super-resolution processing method, device, terminal and storage medium
CN112367486B (en) Video processing method and device
WO2025001955A1 (en) Video coding method and apparatus, and electronic device and readable storage medium
TWI423682B (en) Image processing method
CN116320395A (en) Image processing method, device, electronic equipment and readable storage medium
WO2023024832A1 (en) Data processing method and apparatus, computer device and storage medium
CN116744016A (en) Image processing methods, devices, electronic equipment and storage media
JP2021013145A (en) Video transmission device and video transmission method
CN115834906A (en) Video encoding and decoding method, device, electronic equipment and medium
JP2001197479A (en) Method and device for processing differential image
US20250111541A1 (en) Compressed Video Streaming for Multi-Camera Systems
WO2025060765A1 (en) Video processing method, electronic device, and computer-readable storage medium
CN118678214A (en) Image processing circuit, image display method, electronic device, and storage medium
JP2021013148A (en) Video transmission device and video transmission method
WO2024183387A1 (en) Image coding method and apparatus, image decoding method and apparatus, and system

Legal Events

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

Ref document number: 23893791

Country of ref document: EP

Kind code of ref document: A1