WO2020103384A1 - 视频编码方法、装置、电子设备及计算机可读存储介质 - Google Patents

视频编码方法、装置、电子设备及计算机可读存储介质

Info

Publication number
WO2020103384A1
WO2020103384A1 PCT/CN2019/082431 CN2019082431W WO2020103384A1 WO 2020103384 A1 WO2020103384 A1 WO 2020103384A1 CN 2019082431 W CN2019082431 W CN 2019082431W WO 2020103384 A1 WO2020103384 A1 WO 2020103384A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
value
quantization parameter
encoded
motion
Prior art date
Application number
PCT/CN2019/082431
Other languages
English (en)
French (fr)
Inventor
吴辉
詹国松
Original Assignee
浙江宇视科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江宇视科技有限公司 filed Critical 浙江宇视科技有限公司
Priority to US17/294,461 priority Critical patent/US11838507B2/en
Priority to EP19887129.5A priority patent/EP3886436A4/en
Publication of WO2020103384A1 publication Critical patent/WO2020103384A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • 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
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • 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/167Position within a video image, e.g. region of interest [ROI]
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/174Methods 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 an image region, e.g. an object the region being a slice, e.g. a line of blocks or a group of blocks
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Definitions

  • This document relates to the field of video processing technology, for example, to a video encoding method, device, electronic device, and computer-readable storage medium.
  • video applications based on network communication technologies such as video surveillance, video conferencing, video education and training, and video live broadcasting, have become part of people's study, work, and life.
  • the digitization and high-definition of the video image format have improved the clarity of the image.
  • the video image format has begun to develop from the mainstream 1080P resolution to 5M, 8M, or even 12M resolution ultra-high definition. With higher requirements.
  • the bandwidth upgrade speed of the current network infrastructure is much slower than the development speed of the video image format. How to achieve higher resolution video streaming under the limited network transmission bandwidth is a technical problem that researchers need to solve.
  • This article provides a video encoding method, device, electronic equipment, and computer-readable storage medium, which can reduce the encoding rate of the video stream while ensuring image quality.
  • This article provides a video encoding method.
  • the method includes: acquiring an image to be encoded, and acquiring state information of each macroblock in the image to be encoded; according to the state information of each macroblock, the image to be encoded Divide into multiple status areas; determine the quantization parameter adjustment value of each status area in the image to be encoded according to a preset quantization parameter value table; obtain the quantization of each macroblock in the reference frame image of the image to be encoded Parameter encoding value; according to the quantization parameter encoding value of each macroblock in the reference frame image and the quantization parameter adjustment value of each state area in the image to be encoded, determine each macroblock in the image to be encoded Encoding value of the quantization parameter of the image; use the encoding value of the quantization parameter of each macroblock in the image to be encoded to perform compression encoding on the image to be encoded.
  • This document also provides a video encoding device, which includes a state information statistics module, a state region dividing module, a quantization parameter adjustment value determination module, a quantization parameter encoding value acquisition module, a quantization parameter encoding value determination module, and a compression encoding module.
  • the state information statistics module is configured to obtain the image to be coded, and to obtain the state information of each macroblock in the image to be coded;
  • the state area division module is configured to divide the image to be coded according to the state information of each macroblock Divided into multiple status areas;
  • the quantization parameter adjustment value determination module is configured to determine the quantization parameter adjustment value of each status area in the image to be encoded according to a preset quantization parameter value table;
  • the quantization parameter encoding value acquisition module is configured to acquire A quantization parameter encoding value of each macroblock in the reference frame image of the image to be encoded;
  • a quantization parameter encoding value determination module configured to be based on the quantization parameter encoding value of each macroblock in the reference frame image, and the to-be-encoded
  • the quantization parameter adjustment value of each state area in the image determines the quantization parameter encoding value of each macroblock in the image to be encoded;
  • the compression encoding module is configured to encode using the quantization parameter of each macro
  • This article also provides an electronic device, including:
  • At least one processor At least one processor
  • Memory set to store at least one program
  • the at least one processor When the at least one program is executed by the at least one processor, the at least one processor implements the method as described above.
  • This document also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method as described above is implemented.
  • FIG. 1 shows a block schematic diagram of a video encoding device provided by an embodiment of this document.
  • FIG. 2 shows a flowchart of a video encoding method provided by an embodiment of this document.
  • FIG. 3 shows an example diagram of the first GOP encoding method provided by the embodiment of this document.
  • FIG. 4 shows an example diagram of a second GOP encoding method provided by an embodiment of this document.
  • FIG. 5 shows a block schematic diagram of a video encoding device provided by an embodiment of this document.
  • Icons 100-video encoding device; 101-processor; 102-memory; 103-bus; 104-communication interface; 105-video encoder; 200-video encoding device; 201-status information statistics module; 202-status area division Module; 203-QP adjustment value determination module; 204-QP encoding value acquisition module; 205-QP encoding value determination module; 206-compression encoding module; 207-GOP length calculation module; 208-GOP adjustment module; 209-first execution Module; 210-second execution module; 211-third execution module.
  • a video encoding method and device provided by the embodiments herein divide the image to be encoded into multiple status regions according to the state information of each macroblock in the image to be encoded, and according to a preset quantization parameter value table, Determine the quantization parameter adjustment value of each state area in the image to be encoded; determine the image to be encoded according to the quantization parameter adjustment value of each state area in the image to be encoded and the quantization parameter encoding value of each macroblock in the reference frame image
  • the encoded value of the quantization parameter of each macroblock in the image; the encoded value of the quantization parameter of each macroblock in the image to be encoded is compression-encoded.
  • the embodiment of this document sets the quantization parameter coding value of each macroblock according to the state of each macroblock before compression coding, so that in subsequent compression coding, each macroblock can be subjected to compression coding processing suitable for its state, For example, the quality of macroblocks that do not change much can be reduced, so that the amount of data can be reduced to the greatest extent, and the coding rate of the video stream can be effectively reduced while ensuring the image quality.
  • ROI video encoding for video key information reconstruction and transmission bandwidth limitation, ROI (Region Of Interest) video encoding can be used to achieve a compromise between data compression and high-quality preservation of key information, specifically , ROI video coding performs high-quality lossless coding on the selected area of interest by selecting the area of interest in the picture, and standard-definition video compression to reduce the bit rate and image quality of other areas that are not selected, thereby helping to save network bandwidth Take up and video storage space.
  • ROI video encoding can reduce the video bit stream while improving the image quality at the same bit rate.
  • the ROI video encoding is based on the rectangular boundary treatment
  • the region of interest in the encoded image is subdivided and controlled by quantization parameters, which usually causes the residual coefficients in the code stream to be distributed in a block shape, and the region of interest and other regions in the decoded video image are usually serious.
  • quantization parameters usually causes the residual coefficients in the code stream to be distributed in a block shape
  • the region of interest and other regions in the decoded video image are usually serious.
  • Sense of hierarchy In addition, simple ROI control can not greatly reduce the code rate while ensuring the overall effect of high quality, especially when there are many moving objects, ROI video coding can not reduce the code rate while ensuring the quality.
  • the quantizer parameter (QP) coding value (that is, QP coding value) of each macroblock is set according to the state of each macroblock, and so on.
  • the QP value is the quantization parameter value
  • the QP value table is the quantization parameter value table
  • the QP adjustment value is the quantization parameter adjustment value, which will not be described in detail
  • FIG. 1 shows a block schematic diagram of a video encoding device 100 provided by an embodiment of this document.
  • the video encoding device 100 includes a processor 101, a memory 102, a bus 103, a communication interface 104, and a video encoder 105.
  • the processor 101, the memory 102, and the communication interface 104 are connected through a bus 103, and the video encoder 105 and the processor 101 are Cooperate.
  • the video encoding device 100 may be used to perform compression encoding processing on a sequence of video frames obtained by live video recording.
  • the video encoding device 100 may be a front-end camera device, such as a surveillance camera, a webcam, a civilian-grade camera, or a professional-grade camera.
  • the camera, etc. may also be an embedded hard disk recorder (Digital Video Recorder, DVR), or a hardware circuit structure involving video encoding in a front-end camera device or an embedded hard disk recorder.
  • DVR Digital Video Recorder
  • the video encoding device 100 may also be used for sampling and compression encoding of video analog signals.
  • the video encoding device 100 may be a PC-type hard disk recorder, a computer device with a video capture card, a PC-type hard disk recorder, or
  • the computer equipment with a video capture card involves a combination of hardware components and software modules for video encoding.
  • the video encoding device 100 may also be used to decode the encoded video data file and then encode the video stream data or video data file into a new bitstream.
  • the video encoding device 100 may be a video server , Network video recorder (NVR), graphics workstation, PC, laptop, etc.
  • NVR Network video recorder
  • the memory 102 may include a high-speed random access memory (RAM: Random Access Memory), or may include a non-volatile memory (non-volatile memory), such as at least one disk memory.
  • RAM Random Access Memory
  • non-volatile memory such as at least one disk memory.
  • the communication connection between the video encoding device 100 and at least one other network element is achieved through at least one communication interface 104 (which may be wired or wireless).
  • the bus 103 may be an ISA bus, a PCI bus, an EISA bus, or the like. In FIG. 1, only one bidirectional arrow is used, but it does not mean that there is only one bus or one type of bus.
  • the memory 102 is used to store programs, such as the video encoding device 200 shown in FIG. 5.
  • the video encoding device 200 includes at least one software function module that can be stored in the memory 102 in the form of software or firmware or solidified in an operating system (OS) of the video encoding device 100.
  • OS operating system
  • the processor 101 executes the program to implement the video encoding method disclosed in the following embodiments.
  • the processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 101 or instructions in the form of software.
  • the aforementioned processor 101 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc .; it may also be a digital signal processor (DSP) or an application specific integrated circuit (ASIC), ready-made programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP network processor
  • ASIC application specific integrated circuit
  • FPGA ready-made programmable gate array
  • the video encoder 105 is used to compress and encode a video frame sequence to form video stream data.
  • the video encoder 105 may be, but not limited to, a video encoding chip, a video encoding hardware device, a video encoding software module, and the like.
  • the video encoder 105 may be either a separate chip, device, or software module, or a chip, device, or software module integrated with the video decoder.
  • the embodiments herein also provide an electronic device, the electronic device is the video encoding device 100 described above.
  • the embodiments herein also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor 101, the video encoding method disclosed in the following embodiments is implemented.
  • the video encoding device 100 aligns and monitors a video frame sequence captured in a typical scene as an example to describe the video encoding method provided by the embodiment herein.
  • the typical scene for monitoring is a scene where the target scene is relatively fixed during the shooting process.
  • the background area that remains unmoved occupies a larger picture area, and the motion area and the background area can be separated by motion detection .
  • the types of moving objects in the monitoring typical scene remain relatively stable.
  • the moving objects in the monitoring typical scene are mainly pedestrians and in and out of the vehicle; when the monitoring typical scene is When traffic is on the road, the moving objects in a typical scene are mainly vehicles.
  • video surveillance, video conferencing, video live broadcasting, video education and training, and video interactive communication are all typical monitoring scenarios.
  • the QP value table obtained in this way includes a plurality of test exposure gain values, and the QP value of the moving high frequency region, the QP value of the moving low frequency region, the QP value of the still high frequency region, and the QP value of the still low frequency region corresponding to each test exposure gain value ,
  • Each test exposure gain value includes exposure value and gain value.
  • FIG. 2 shows a flowchart of a video encoding method provided by an embodiment of this document.
  • the video coding method uses the Group of Pictures (GOP) as the coding structure unit to sequentially compress the video frame sequence.
  • the GOP includes the key frame at the starting position and the predicted frame behind the key frame (and so on, in the following,
  • the GOP coding structure is the picture group coding structure
  • the GOP length is the picture group length
  • the GOP adjustment module is the picture group adjustment module, which will not be repeated here.
  • the video encoding method includes the following steps:
  • Step S101 Acquire an image to be encoded, and acquire status information of each macroblock in the image to be encoded.
  • the image to be coded is data before compression coding
  • the image to be coded may be an I frame, a P frame, or a B frame, where the I frame is a key frame in the GOP coding structure, and the key frame adopts full frame compression coding ;
  • P frame is a forward predictive coded frame.
  • the forward predictive coded frame uses the previous I frame or P frame of this frame as the reference frame. Only the difference data between the current frame and the reference frame is recorded during encoding.
  • B frame is a bidirectional predictive coded frame, and the bidirectional predictive coded frame uses the previous frame and the next frame of this frame as the reference frame , Only the difference data between the current frame and the reference frame is recorded during encoding, and the difference data between the current frame and the previous frame and the next frame is superimposed on the basis of the previous frame and the next frame during decoding to obtain a complete B frame Video image.
  • the macroblock is the basic unit of video coding.
  • a macroblock is composed of a luma pixel block and two additional chroma pixel blocks.
  • the number of macroblocks divided for each image in a video frame sequence is the same, and The number of pixels included in the rows and columns of each macroblock is a multiple of 4, for example, the macroblock size may be 32 ⁇ 32, 16 ⁇ 16, 4 ⁇ 4, and so on.
  • the state information of each macroblock in the image to be encoded needs to be obtained.
  • the state information includes motion detection information, brightness information, and noise variance information.
  • the size of the macroblock may be 16 ⁇ 16 , And record the current exposure gain value of the image to be encoded at the same time.
  • the motion detection information can be determined by comparing the image to be encoded with the reference frame image.
  • the reference frame image can be the previous I frame; if the image to be encoded is the P frame, the reference frame image can be It is the previous I frame or P frame of the current frame; if the image to be encoded is a B frame, the reference image may be the previous frame and the next frame of the current frame.
  • Step S102 Divide the image to be coded into multiple status areas according to the status information of each macroblock.
  • the image to be encoded is divided into multiple status areas according to the status information of each macroblock.
  • the multiple status areas include high-frequency bright areas of motion and motion Low frequency bright zone, high frequency dark zone, low frequency dark zone, high frequency dark zone, low frequency dark zone, high frequency zone, low frequency zone, low frequency zone, high frequency zone Frequent dark areas and static low frequency dark areas.
  • the method for dividing the image to be coded into multiple status regions may include:
  • the image to be encoded is divided into a motion area and a static area. Since noise will affect the motion detection information, the discrimination threshold used to divide the motion area from the still area can be flexibly adjusted according to the current exposure gain value of the image to be encoded, that is to say, the current exposure gain value of the image to be encoded corresponds to no In the noise interval, low noise interval, and high noise interval, the thresholds used to divide the motion area and the static area are different. It needs to be flexibly adjusted to offset the influence of noise on the motion detection information, and improve the motion area in each monitoring scene. Detection accuracy;
  • the moving area is divided into moving bright area, moving dark area and moving dark area
  • the static area is divided into static bright area, static dark area and static dark area. Since the distinction threshold of the screen brightness does not depend on the gain shutter, there is no need to adjust the distinction threshold when dividing the area according to the brightness information;
  • the motion bright zone, the motion dark zone, the motion dark zone, the static bright zone, the static dark zone and the static dark zone are divided into a high-frequency bright zone, a low-frequency bright zone, a high-frequency dark zone, and a motion Low frequency dark area, motion high frequency dark area, motion low frequency dark area, static high frequency bright area, static low frequency bright area, static high frequency dark area, static low frequency dark area, static high frequency dark area and static low frequency dark area.
  • noise also affects the noise variance information, when dividing the area based on the noise variance information, it is also necessary to flexibly adjust the discrimination threshold according to the gain shutter to offset the influence of noise on the noise variance information, improving each monitoring Accuracy of detecting high and low frequency areas of the picture in the scene.
  • the motion bright area can be divided into a motion high frequency bright area and a motion low frequency bright area
  • a motion dark area can be divided into a motion high frequency dark area and a motion low frequency dark area
  • a motion over dark area can be divided into a motion high Frequent dark areas and low frequency dark areas of motion
  • the static bright areas are divided into static high frequency bright areas and static low frequency bright areas
  • the static dark areas are divided into static high frequency dark areas and static low frequency dark areas
  • the static dark areas are divided It is a static high-frequency dark area and a static low-frequency dark area.
  • Step S103 determine the QP adjustment value of each state area in the image to be encoded.
  • the specific determination process may include: acquiring the current exposure gain value of the image to be encoded; comparing the current exposure gain value with multiple test exposure gain values one by one, from multiple test exposure gain values Determine the target exposure gain value consistent with the current exposure gain value; according to the target exposure gain value corresponding to the high-frequency motion QP value, low-frequency motion QP value, static high-frequency area QP value and static low-frequency area QP value, determine the pending The QP adjustment value of each status area in the encoded image.
  • the minimum QP encoding value of the I frame needs to be limited, and the minimum QP encoding value is preferably the QP corresponding to the target exposure gain value in the preset QP value table. , This restriction can reduce the code rate while meeting user needs.
  • the method for determining the QP adjustment value of each status region may be: Since each test exposure gain value in the preset QP value table corresponds to a noise interval, the noise interval may be a low noise interval, a medium noise interval, or a high The noise interval, the intermediate noise interval may be a transition interval between a low noise interval and a high noise interval, so first determine the noise interval corresponding to the target exposure gain value, and then determine the QP adjustment value of each state area according to the noise interval, specifically including:
  • the QP value of the moving high frequency region, the QP value of the moving low frequency region, the QP value of the still high frequency region and the QP value of the still low frequency region according to the target exposure gain value according to the first preset formula Determine the QP adjustment value of each status area in the image to be encoded.
  • the first preset formula may be:
  • QP QP1 + QP2 + QP3 + QP4
  • the formula determines the QP adjustment value for each state area in the image to be encoded.
  • the second preset formula may be:
  • QP QP1 + QP2 + QP3 + QP4
  • the target exposure gain value corresponds to the high noise interval
  • the target exposure gain value corresponding to the movement high frequency region QP value, the movement low frequency region QP value, the stationary high frequency region QP value and the stationary low frequency region QP value according to the third preset formula Determine the QP adjustment value of each status area in the image to be encoded.
  • the third preset formula may be:
  • QP QP1 + QP2 + QP3 + QP4
  • QP1 in QP1 is good , QP is general, and QP is poor may be the movement corresponding to the target exposure gain value in the preset QP value table
  • the QP value in the high frequency region, the QP value in the low frequency region of motion, the QP value in the static high frequency region and the QP value in the static low frequency region are good, general and poor QP values;
  • a and b can be the difference between the QP value of the static high-frequency area and the QP value of the static low-frequency area corresponding to the target exposure gain value. The user can also flexibly adjust it according to actual needs.
  • the motion, feature and ROI mid-frequency region in QP3 is the transition zone between the motion, feature and ROI high-frequency region and the motion, feature and ROI low-frequency region.
  • a and b may not take the difference between the QP value in the static high-frequency region and the QP value in the static low-frequency region, but are preset to other values.
  • the characteristic area may be set according to actual needs. For example, an area with a characteristic such as a human face recognized may be used as the characteristic area.
  • the theoretical code rate is a theoretical value of the code rate of the image to be encoded, and the theoretical code rate may be calculated according to a preset after the step S102 (that is, after the image to be encoded is divided into a plurality of status areas) The method calculates that the actual code rate may be a code rate obtained by the video encoder 105 performing actual pre-encoding on the image to be encoded.
  • the value of QP1 in the static dark zone can be set according to actual needs.
  • the value of QP1 in the static dark zone needs to make the inequality QP> QP worse ;
  • the value of QP1 in the static dark zone can be set according to actual needs.
  • the value of QP1 in the static dark zone needs to make the inequality QP> 2 * QP worse- QP generally holds.
  • SKIP macroblock coding means that the pixel residuals and motion vector residuals of the macroblock are not written into the code stream during encoding, only The macro block is identified by the SKIP macro block, and an approximate alternative recovery method is used to recover the pixels of the current macro block in the current frame through the reference frame during decoding.
  • SKIP macroblocks are P-SKIP macroblocks
  • B-SKIP macroblocks are B-SKIP macroblocks.
  • the coding rate can be reduced by adjusting the inter-frame SKIP strategy.
  • P-frame macroblocks in the static area are generally encoded using P_SKIP macroblocks, but under different exposure gain values, P-block or I-block coding may be used due to the influence of noise, which will make the code The rate increases.
  • P_SKIP macroblock coding can be forced to use a large proportion of the static dark areas to actively reduce the code rate.
  • the QP adjustment value of the dark area is raised to the static high frequency area QP value corresponding to the target exposure gain value in the preset QP value table and The poorer QP value in the static low-frequency region QP value; continue to increase the QP adjustment value in the dark area, or directly use P_SKIP macroblock coding to improve the bit rate, so as to reduce the bit rate, so that the resulting video encoding bit rate meets expectations
  • the standard is appropriate.
  • the reference frame image of the image to be encoded is a P frame
  • the average bit rate of the unit macroblock of the static area of the reference frame image is higher than a preset threshold
  • the corresponding area of the image to be encoded is also a static area
  • the QP value of each macroblock in the middle still area is increased by the P_SKIP macroblock coding ratio.
  • the QP code value of each macroblock in the still region of the image to be coded can be obtained by adding c to the corresponding macroblock QP code value in the reference frame image, and the calculation formula of c is
  • the inter-frame SKIP strategy of the B frame is similar to the P frame, and will not be repeated here.
  • Step S104 Acquire the QP encoded value of each macroblock in the reference frame image of the image to be encoded.
  • step S104 in order to determine the QP encoding value of the macroblock information of each macroblock in the image to be encoded, it is also necessary to obtain the macroblock information of each macroblock in the reference frame image of the image to be encoded, the size of each macroblock Both can be 16 ⁇ 16, and the macroblock information can include, but is not limited to, code rate, macroblock type, QP encoding value, etc., and record the exposure gain value corresponding to the reference frame image. It should be noted that the execution of step S104 is not limited to after step S103, but may also be executed before step S101, which is not limited herein.
  • step S105 the QP code value of each macro block in the image to be coded is determined according to the QP code value of each macro block in the reference frame image and the QP adjustment value of each status area in the image to be coded.
  • the user can determine the QP encoding value of each macroblock in the image to be encoded, just to ensure that the minimum QP encoding value in the image to be encoded takes the preset
  • the QP corresponding to the target exposure gain value in the QP value table is better .
  • the QP code value of each macroblock in the reference frame image and the QP adjustment value of each state area in the image to be coded are superimposed to obtain the code to be coded QP encoded value of each macroblock in the image.
  • the video encoding method provided by the embodiments herein may include the steps of sequentially compressing a video frame sequence using an image group as an encoding structural unit, the image group including a key frame at a starting position and the key frame The following prediction frame.
  • the compression of a single video frame can be achieved through the steps S101 to S105.
  • step S106 the QP code value of each macroblock in the image to be coded is used for compression coding of the image to be coded.
  • the image to be encoded is compression-encoded according to the QP encoding value of each macroblock.
  • the process of compression encoding of the image to be encoded may be: generating a residual coefficient based on the difference between the image to be encoded and the reference frame image, and controlling the size of the residual coefficient through the QP encoding value of each macroblock in the image to be encoded, thereby reducing Encoding bit rate.
  • the video frame sequence is sequentially compressed using the GOP as the coding structure unit.
  • the GOP includes a key frame at a starting position and a prediction frame behind the key frame.
  • the GOP coding structure may be any GOP coding in the field of video coding technology. Structure.
  • the IPPP coding structure is used as an example to introduce the technical solution in detail.
  • the I-frame is a full-frame compressed frame. The smaller the I-frame interval in the video frame sequence, the smaller the GOP length, and the greater the video coding bit rate. Therefore, in order to effectively reduce the video encoding bit rate from the encoding structure, the embodiment herein further includes steps S107-S108.
  • Step S107 Obtain the motion vector of the image to be encoded, and calculate the GOP length of the image to be encoded according to the motion vector.
  • the GOP and the GOP length of the image to be encoded are adjusted according to the motion vector of the image to be encoded.
  • clear I frames account for about 50% of the total code rate, which is a relatively large loss.
  • the current monitoring area is usually set to an I frame of about 2 seconds, mainly to improve the ability to resist network packet loss, but this This kind of setting severely restricts the improvement of video encoding compression ratio. Therefore, the GOP needs to be increased. Specifically, the GOP needs to be increased according to the motion vector of the image to be encoded and the corresponding exposure gain value, which can effectively improve the compression rate of the video encoding.
  • the GOP length formula is used Calculate the GOP length of the image to be encoded, where GOPSIZE is the GOP length of the image to be encoded, GOPSIZE max is the maximum GOP length, GOPSIZE min is the minimum GOP length, MV cur is the motion vector of the image to be encoded, MV min Is the minimum value of the motion vector, and MV max is the maximum value of the motion vector.
  • GOPSIZE max and GOPSIZE min are adjusted by the user according to the exposure gain value of the image to be encoded.
  • the interval of I frames in the GOP encoding structure may be many times the original, so the anti-network can be further optimized For packet loss capability, please refer to step S108 for details.
  • Step S108 Adjust the GOP according to the GOP length of the image to be encoded.
  • the adjusted GOP includes a frame of key frames and at least one prediction frame encoding segment, where the prediction frame encoding segment includes a frame reference prediction frame and a multi-frame normal prediction frame , Reference prediction frames are coded with reference to key frames, and ordinary prediction frames are frame-by-frame reference coded within the prediction frame coding section.
  • each common prediction frame is coded with reference to the previous frame of the common prediction frame, where the previous frame of the common prediction frame may be a reference prediction frame or may be For other ordinary prediction frames.
  • the adjusted GOP includes a key frame (ie, I frame) and at least one prediction frame encoding segment.
  • the prediction frame encoding segment includes a frame reference prediction frame (for example, P1 frame, etc.) and a multi-frame general prediction frame (For example, P11 frame, P12 frame, P1n frame, etc.), reference prediction frames are coded with reference to key frames (ie, I frames), and ordinary prediction frames are frame-by-frame reference coded in the prediction frame coding section.
  • the reference prediction frame appears every 2 seconds to ensure that if a certain P frame is lost, the image can be recovered within 2 seconds.
  • reference prediction frames are coded with reference to key frames (i.e. I frames), and reference prediction frames after reference prediction frames are frame-by-frame reference coded.
  • Key frames i.e. I frames
  • the reference prediction frame is used to ensure the recovery of the video image after the loss of the common prediction frame, so that it can increase the GOP multiple times and effectively reduce the code rate of the video encoding while ensuring the quality of the decoded video image.
  • I frame data packet loss occurs, it can be solved by forcing I frames, which can reduce the impact of GOP increase to a certain extent.
  • step S109 the control information of the adjusted GOP is acquired, and the control information is filled in supplemental enhancement information (Supplemental Enhancement Information, SEI) of key frames to decode the adjusted GOP according to the control information during decoding and playback.
  • SEI Supplemental Enhancement Information
  • the decoder needs to be optimized for control.
  • the playback click time corresponds to an ordinary predicted frame
  • the other between the ordinary predicted frames need to be controlled.
  • the video frame is decoded but not displayed.
  • the playback click time is P22 frame
  • P21 is a frame before P22 and adjacent to P22. Therefore, during the video encoding process, you can carry the set control information through SEI (Supplemental Enhancement Information, supplemental enhancement information), which is beneficial to ensure that the playback screen will not jump during playback.
  • SEI Supplemental Enhancement Information
  • Step S110 Obtain the motion information of the key frame in the adjusted GOP, and re-apply for the key frame when the motion information is greater than the preset motion threshold.
  • a preset motion threshold for example, 50%
  • Step S111 when there is no motion information in the image to be encoded, the GOP of the image to be encoded includes a key frame and at least one predicted frame, and each predicted frame is encoded with reference to the key frame.
  • the GOP encoding structure shown in FIG. 3 is optimized in the case of full frames.
  • the video encoding device 100 can reach the maximum frame rate, generally 25 to 30 frames per second.
  • the encoding frame rate can be adjusted according to the motion detection information.
  • the specific adjustment method may be: when there is motion information, the GOP coding structure shown in FIG. 3 is used for full frame rate coding, and when there is no motion information, the coding structure described in FIG. 4 is used for coding, and the frame rate may be as low as 16 seconds 1 frame, at the same time need to carry frame rate information for decoding playback time window.
  • FIG. 5 shows a block schematic diagram of a video encoding apparatus 200 provided by an embodiment of this document.
  • the video encoding device 200 includes a status information statistics module 201, a status area dividing module 202, a QP adjustment value determination module 203, a QP encoding value acquisition module 204, a QP encoding value determination module 205, a compression encoding module 206, a GOP length calculation module 207, GOP The adjustment module 208, the first execution module 209, the second execution module 210, and the third execution module 211.
  • the state information statistics module 201 is configured to acquire the image to be encoded, and acquire the status information of each macroblock in the image to be encoded.
  • the state area dividing module 202 is configured to divide the image to be coded into a plurality of state areas according to the state information of each macroblock.
  • the state area dividing module 202 is specifically configured to divide the image to be coded into a motion area and a static area according to the motion detection information; according to the brightness information, the motion area is divided into a motion bright area, a motion dark area and a motion After dark area, the static area is divided into static bright area, static dark area and static dark area; according to the noise variance information, the motion bright area, motion dark area, motion dark area, static bright area, static dark area and The static dark areas are divided into high-frequency bright areas, low-frequency bright areas, high-frequency dark areas, low-frequency dark areas, high-frequency dark areas, low-frequency dark areas, high-frequency dark areas, low-frequency bright areas, and static. High frequency dark area, static low frequency dark area, static high frequency dark area and static low frequency dark area.
  • the state area dividing module 202 may be configured to divide the motion bright area into a motion high frequency bright area and a motion low frequency bright area, and divide the motion dark area into a motion high frequency dark area and a motion low frequency dark area according to the noise variance information, to divide the motion
  • the dark areas are divided into moving high-frequency dark areas and moving low-frequency dark areas
  • the static bright areas are divided into static high-frequency bright areas and static low-frequency bright areas
  • the static dark areas are divided into static high-frequency dark areas and static low-frequency dark areas
  • the static dark areas are divided into static high-frequency dark areas and static low-frequency dark areas.
  • the QP adjustment value determination module 203 is configured to determine the QP adjustment value of each state area in the image to be encoded according to a preset QP value table.
  • the QP adjustment value determination module 203 is specifically configured to obtain the current exposure gain value of the image to be encoded; compare the current exposure gain value with multiple test exposure gain values one by one, and select from multiple test exposure gain values Determine the target exposure gain value consistent with the current exposure gain value; according to the target exposure gain value corresponding to the movement high-frequency region QP value, movement low-frequency region QP value, still high-frequency region QP value and still low-frequency region QP value, determine The QP adjustment value of each status area in the image to be encoded.
  • the QP code value obtaining module 204 is configured to obtain the QP code value of each macroblock in the reference frame image of the image to be coded.
  • the QP encoding value determination module 205 is configured to determine the QP encoding of each macroblock in the image to be encoded according to the QP encoding value of each macroblock in the reference frame image and the QP adjustment value of each status area in the image to be encoded value.
  • the compression encoding module 206 is configured to use the QP encoding value of each macroblock in the image to be encoded to perform compression encoding on the image to be encoded.
  • the GOP length calculation module 207 is configured to obtain the motion vector of the image to be encoded, and calculate the GOP length of the image to be encoded according to the motion vector.
  • the GOP length calculation module 207 is specifically configured to use the GOP length formula according to the motion vector of the image to be encoded Calculate the GOP length of the image to be encoded, where GOPSIZE is the GOP length of the image to be encoded, GOPSIZE max is the maximum GOP length, GOPSIZE min is the minimum GOP length, MV cur is the motion vector of the image to be encoded, MV min Is the minimum value of the motion vector, and MV max is the maximum value of the motion vector.
  • the GOP adjustment module 208 is configured to adjust the GOP according to the GOP length of the image to be encoded.
  • the adjusted GOP includes a frame of key frames and at least one prediction frame encoding segment, where the prediction frame encoding segment includes a frame of reference prediction frames and multiple
  • reference prediction frames refer to key frames for encoding, and ordinary prediction frames perform frame-by-frame reference encoding in the prediction frame encoding section.
  • each common prediction frame is coded with reference to the previous frame of the common prediction frame, where the previous frame of the common prediction frame may be a reference prediction frame or may be For other ordinary prediction frames.
  • the first execution module 209 is configured to obtain the control information of the adjusted GOP, and fill the control information in the SEI of the key frame to decode the adjusted GOP according to the control information during decoding and playback.
  • the second execution module 210 is configured to obtain motion information of key frames in the adjusted GOP, and re-apply for key frames when the motion information is greater than a preset motion threshold.
  • the third execution module 211 is configured that when there is no motion information in the image to be encoded, the GOP of the image to be encoded includes a key frame and at least one predicted frame, and each predicted frame is encoded with reference to the key frame.
  • the video encoding method and device include: acquiring the image to be encoded, and acquiring the state information of each macroblock in the image to be encoded; according to the state information of each macroblock , Divide the image to be encoded into multiple status areas; determine the QP adjustment value of each status area in the image to be encoded according to the preset QP value table; obtain the QP encoding of each macroblock in the reference frame image of the image to be encoded Value; according to the QP code value of each macroblock in the reference frame image and the QP adjustment value of each status area in the image to be coded, determine the QP code value of each macroblock in the image to be coded;
  • the QP encoded value of each macroblock is compression-encoded for the image to be encoded.
  • each macro block before compression coding, the QP coding value of each macro block is set according to the state of each macro block, so that in subsequent compression coding, each macro block can be adapted to the state of each macro block Compression encoding processing, for example, can reduce the quality of macroblocks that do not change much, so that the amount of data can be reduced to the greatest extent, and the encoding rate of the video stream is effectively reduced while ensuring the image quality.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution in this article essentially or part of the contribution to the related technology or part of the technical solution can be reflected in the form of a software product
  • the computer software product is stored in a storage medium, including several instructions It is used to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this document.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or CD-ROM and other media that can store program code .

Landscapes

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

Abstract

本文提供一种视频编码方法、装置、电子设备和计算机可读存储介质,所述方法包括:获取待编码图像中每个宏块的状态信息;依据每个宏块的状态信息,将所述待编码图像划分为多个状态区域;按照预设量化参数值表,确定出所述待编码图像中每个状态区域的量化参数调整值;获取所述待编码图像的参考帧图像内每个宏块的量化参数编码值;确定出所述待编码图像内每个宏块的量化参数编码值;对所述待编码图像进行压缩编码。

Description

视频编码方法、装置、电子设备及计算机可读存储介质
本公开要求在2018年11月19日提交中国专利局、申请号为201811376866.7的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。
技术领域
本文涉及视频处理技术领域,例如涉及一种视频编码方法、装置、电子设备及计算机可读存储介质。
背景技术
随着视频处理技术的发展,基于网络通信技术的视频应用,例如视频监控、视频会议、视频教育培训、视频直播等,已经成为人们学习、工作、生活等中的一部分。
视频图像格式的数字化和高清化,使得图像的清晰度得到全面的提升,视频图像格式已经从主流的1080P分辨率开始向5M、8M、甚至12M分辨率的超高清发展,这就对网络传输带宽有了更高的要求。但是,目前网络基础设施的带宽升级速度远低于视频图像格式的发展速度,如何在有限的网络传输带宽条件下实现更高分辨率的视频流传输,是研究人员亟待解决的技术问题。
发明内容
本文提供了一种视频编码方法、装置、电子设备及计算机可读存储介质,能够降低视频流编码码率的同时保证图像质量。
本文提供了一种视频编码方法,所述方法包括:获取待编码图像,并获取所述待编码图像中每个宏块的状态信息;依据每个宏块的状态信息,将所述待编码图像划分为多个状态区域;按照预设量化参数值表,确定出所述待编码图 像中每个状态区域的量化参数调整值;获取所述待编码图像的参考帧图像内每个宏块的量化参数编码值;依据所述参考帧图像内每个宏块的量化参数编码值、以及所述待编码图像中每个状态区域的量化参数调整值,确定出所述待编码图像内每个宏块的量化参数编码值;利用所述待编码图像内每个宏块的量化参数编码值,对所述待编码图像进行压缩编码。
本文还提供了一种视频编码装置,所述装置包括状态信息统计模块、状态区域划分模块、量化参数调整值确定模块、量化参数编码值获取模块、量化参数编码值确定模块及压缩编码模块。其中,状态信息统计模块配置为获取待编码图像,并获取所述待编码图像中每个宏块的状态信息;状态区域划分模块配置为依据每个宏块的状态信息,将所述待编码图像划分为多个状态区域;量化参数调整值确定模块配置为按照预设量化参数值表,确定出所述待编码图像中每个状态区域的量化参数调整值;量化参数编码值获取模块配置为获取所述待编码图像的参考帧图像内每个宏块的量化参数编码值;量化参数编码值确定模块配置为依据所述参考帧图像内每个宏块的量化参数编码值、以及所述待编码图像中每个状态区域的量化参数调整值,确定出所述待编码图像内每个宏块的量化参数编码值;压缩编码模块配置为利用所述待编码图像内每个宏块的量化参数编码值,对所述待编码图像进行压缩编码。
本文还提供了一种电子设备,包括:
至少一个处理器;
存储器,设置为存储至少一个程序,
当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如上所述的方法。
本文还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储 有计算机程序,所述计算机程序被处理器执行时实现如上所述的方法。
附图说明
图1示出了本文实施例提供的视频编码设备的方框示意图。
图2示出了本文实施例提供的视频编码方法流程图。
图3示出了本文实施例提供的GOP第一编码方式示例图。
图4示出了本文实施例提供的GOP第二编码方式示例图。
图5示出了本文实施例提供的视频编码装置的方框示意图。
图标:100-视频编码设备;101-处理器;102-存储器;103-总线;104-通信接口;105-视频编码器;200-视频编码装置;201-状态信息统计模块;202-状态区域划分模块;203-QP调整值确定模块;204-QP编码值获取模块;205-QP编码值确定模块;206-压缩编码模块;207-GOP长度计算模块;208-GOP调整模块;209-第一执行模块;210-第二执行模块;211-第三执行模块。
具体实施方式
相对于相关技术,本文实施例提供的一种视频编码方法及装置,通过待编码图像中每个宏块的状态信息将待编码图像划分为多个状态区域,并按照预设量化参数值表,确定出待编码图像中每个状态区域的量化参数调整值;依据待编码图像中每个状态区域的量化参数调整值和参考帧图像内每个宏块的量化参数编码值,确定出待编码图像内每个宏块的量化参数编码值;利用待编码图像内每个宏块的量化参数编码值对待编码图像进行压缩编码。本文实施例在压缩编码之前,根据每个宏块的状态设置每个宏块的量化参数编码值,这样在后续 压缩编码的时候,能够对每个宏块进行与其状态相适应的压缩编码处理,例如可以将变化不大的宏块的质量降低,这样可以最大程度降低数据量,在保证图像质量的同时有效降低了视频流编码码率。
在进行视频编码时,针对视频关键信息重构和传输带宽限制问题,可以采用ROI(Region Of Interest,感兴趣区域)视频编码来实现数据压缩和关键信息高质量保存之间的折衷,具体来说,ROI视频编码通过选择画面中感兴趣的区域,对选择的感兴趣区域进行高质量无损编码,对未被选择的其他区域降低码率和图像质量进行标准清晰度视频压缩,从而利于节省网络带宽占用和视频存储空间。与相关的固定码率编码方法相比,ROI视频编码可以在降低视频码流的同时提升同码率下的画质。
但是,由于ROI是一个矩形区域,无法做过于强烈的控制,否则会造成解码后的视频图像中感兴趣区域与其他区域画面有严重的层次感,具体来说,ROI视频编码是基于矩形分界对待编码图像中的感兴趣区域进行细分并进行量化参数控制,而这通常造成码流中的残差系数呈块状分布,解码出来的视频图像中感兴趣区域与其他区域画面也就通常存在严重的层次感。另外,单纯的ROI控制并不能在大幅度减低码率的同时保证高质量的整体效果,特别是当运动物体多的情况下,ROI视频编码不能在保证质量的同时,很好的降低码率。
本文提出了一种视频编码方法及装置,在压缩编码之前,根据每个宏块的状态设置每个宏块的量化参数(Quantizer Parameter,QP)编码值(也即QP编码值,以此类推,在下文中,QP值即为量化参数值,QP值表即为量化参数值表,QP调整值即为量化参数调整值,对此不作赘述),这样在后续压缩编码的 时候,能够对每个宏块进行与其状态相适应的压缩编码处理,例如可以将变化不大的宏块的质量降低,这样可以最大程度降低数据量,在保证图像质量的同时有效降低了视频流编码码率,下面进行详细描述。
请参照图1,图1示出了本文实施例提供的视频编码设备100的方框示意图。视频编码设备100包括处理器101、存储器102、总线103、通信接口104和视频编码器105,所述处理器101、存储器102和通信接口104通过总线103连接,视频编码器105和处理器101相配合。
作为一种实施方式,视频编码设备100可以用于对现场视频录像获得的视频帧序列进行压缩编码处理,视频编码设备100可以是前端摄像装置,如监控摄像机、网络摄像头、民用级摄像机、专业级摄像机等,也可以是嵌入式硬盘录像机(Digital Video Recorder,DVR),还可以是前端摄像装置或者嵌入式硬盘录像机中涉及视频编码的硬件电路结构。
作为另一种实施方式,视频编码设备100还可以用于对视频模拟信号进行采样和压缩编码处理,视频编码设备100可以是PC式硬盘录像机、具有视频采集卡的计算机设备、PC式硬盘录像机或具有视频采集卡的计算机设备中涉及视频编码的硬件部分与软件模块的结合体等。
作为又一种实施方式,视频编码设备100还可以用于对编码后的视频数据文件先解码再编码成新的码流的视频流数据或者视频数据文件,所述视频编码设备100可以是视频服务器、网络视频录像机(Network Video Record,NVR)、图形工作站、PC机、笔记本电脑等。
存储器102可能包括高速随机存取存储器(RAM:Random Access Memory),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存 储器。通过至少一个通信接口104(可以是有线或者无线)实现该视频编码设备100与至少一个其它网元之间的通信连接。
总线103可以是ISA总线、PCI总线或EISA总线等。图1中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。
其中,存储器102用于存储程序,例如图5所示的视频编码装置200。视频编码装置200包括至少一个可以软件或固件(firmware)的形式存储于所述存储器102中或固化在所述视频编码设备100的操作系统(operating system,OS)中的软件功能模块。所述处理器101在接收到执行指令后,执行所述程序以实现下述实施例揭示的视频编码方法。
处理器101可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的每步骤可以通过处理器101中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器101可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
视频编码器105用于对视频帧序列进行压缩编码形成视频流数据,视频编码器105可以是,但不限于视频编码芯片、视频编码硬件装置、视频编码软件模块等。就实现形式而言,视频编码器105既可以是单独的芯片、装置、软件模块,也可以是和视频解码器集成在一起的芯片、装置、软件模块。
本文实施例还提供了一种电子设备,所述电子设备为上述视频编码设备100。
本文实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质 上存储有计算机程序,计算机程序被处理器101执行时实现下述实施例揭示的视频编码方法。
第一实施例
本实施例以视频编码设备100对准监控典型场景捕获的视频帧序列为例,对本文实施例提供的视频编码方法进行说明。
监控典型场景是摄像过程中目标场景相对固定的场景,在监控典型场景下获得的视频帧画面中,保持不动的背景区域占据较大的画面区域,可通过运动检测将运动区域和背景区域分离。同时,一个时间周期内,监控典型场景中的运动物体的种类保持相对的稳定,例如当监控典型场景为楼宇监控时,监控典型场景中的运动物体主要是行人和进出车辆;当监控典型场景为交通道路时,监控典型场景中的运动物体主要是车辆。在日常工作和生活中,视频监控、视频会议、视频直播、视频教育培训、视频交互通信均属于监控典型场景。
在实施本实施例提供的视频编码方法之前,需要在实验室环境下对视频编码设备100进行不同曝光增益测试,来得到该视频编码设备100在不同曝光增益下的QP值表。具体的测试方法为:
使视频编码设备100对准监控典型场景,并给予不同程度的光照,在光照充足的情况下,调整画面中每个宏块的QP值,并对画面中的场景进行主观评价,在画面的运动低频区域、运动高频区域、静止低频区域及静止高频区域中选取出较好、一般、较差的区域,并记录每个区域对应的QP值、以及视频编码设备100的曝光值和增益值,假设QP 较好=25~51、QP 一般=30~51、QP 较差=35~51,主观评价画面中运动低频区域较好、运动高频区域和静止低频区域一般,静止高频区域较差,则取运动低频区域QP 较好=25、运动高频区域和静止低频区域QP 一般 =35、静止高频区域QP 较差=45;
然后反复执行上述过程,直到画面亮度降至最低,得到该视频编码设备100在不同测试曝光增益值下的QP取值表,另外,在测试过程中记录无噪声区间、低噪声区间、高噪声区间下的增益快门信息及噪声方差。这样得到的QP取值表包括多个测试曝光增益值、以及与每个测试曝光增益值对应的运动高频区域QP值、运动低频区域QP值、静止高频区域QP值、静止低频区域QP值,每个测试曝光增益值均包括曝光值和增益值。
请参照图2,图2示出了本文实施例提供的视频编码方法流程图。该视频编码方法以图像组(Group of Pictures,GOP)为编码结构单位对视频帧序列进行顺次压缩,GOP包括起始位置的关键帧和关键帧后面的预测帧(以此类推,在下文中,GOP编码结构即为图像组编码结构,GOP长度即为图像组长度,GOP调整模块即为图像组调整模块,对此不作赘述),该视频编码方法包括以下步骤:
步骤S101,获取待编码图像,并获取待编码图像中每个宏块的状态信息。
在本实施例中,待编码图像为压缩编码之前的数据,待编码图像可以是I帧、P帧或B帧,其中,I帧为GOP编码结构中的关键帧,关键帧采用全帧压缩编码;P帧为前向预测编码帧,前向预测编码帧采用本帧的前一I帧或P帧作为参考帧,编码时只记录本帧与参考帧之间的差值数据,解码时在参考帧的基础上叠加本帧与参考帧之间的差值数据获得完整的P帧视频图像;B帧为双向预测编码帧,双向预测编码帧采用本帧的前一帧和后一帧作为参考帧,编码时只记录本帧与参考帧之间的差值数据,解码时在前一帧和后一帧的基础上叠加本帧与前一帧和后一帧的差值数据获得完整的B帧视频图像。
在本文实施例中,宏块为视频编码的基本单位,一个宏块由一个亮度像素块和附加的两个色度像素块组成,一个视频帧序列中每帧图像分割的宏块数量相同,且每个宏块的行、列分别包含的像素个数均是4的倍数,例如宏块大小可以为32×32、16×16、4×4等。
在本文实施例中,获取到待编码图像之后,需要获取待编码图像中每个宏块的状态信息,状态信息包括运动检测信息、亮度信息及噪声方差信息,宏块的大小可以是16×16,同时记录待编码图像的当前曝光增益值。运动检测信息可以通过将待编码图像与参考帧图像进行对比来确定,如果待编码图像为I帧,则参考帧图像可以是前一个I帧;如果待编码图像为P帧,则参考帧图像可以是本帧的前一I帧或P帧;如果待编码图像为B帧,则参考图像可以是本帧的前一帧和后一帧。
步骤S102,依据每个宏块的状态信息,将待编码图像划分为多个状态区域。
在本实施例中,获取待编码图像中每个宏块的状态信息之后,按照每个宏块的状态信息,将待编码图像划分为多个状态区域,多个状态区域包括运动高频明区、运动低频明区、运动高频暗区、运动低频暗区、运动高频过暗区、运动低频过暗区、静止高频明区、静止低频明区、静止高频暗区、静止低频暗区、静止高频过暗区及静止低频过暗区。
将待编码图像划分为多个状态区域的方法可以包括:
依据运动检测信息,将待编码图像划分为运动区域与静止区域。由于噪声会对运动检测信息产生影响,因此划分运动区域与静止区域所用的区分阈值可以根据待编码图像的当前曝光增益值进行灵活调整,也就是说,待编码图像的当前曝光增益值在对应无噪声区间、低噪声区间和高噪声区间时,划分运动区 域与静止区域所用的阈值都不相同,需要灵活调整,以此来抵消噪声对运动检测信息的影响,提升了每个监控场景下运动区域检测的精度;
依据亮度信息,将运动区域划分为运动明区、运动暗区及运动过暗区,并将静止区域划分为静止明区、静止暗区及静止过暗区。由于画面亮度的区分阈值不依赖于增益快门,故依据亮度信息进行区域划分时,不需要调整区分阈值;
依据噪声方差信息,将运动明区、运动暗区、运动过暗区、静止明区、静止暗区及静止过暗区分别划分为运动高频明区、运动低频明区、运动高频暗区、运动低频暗区、运动高频过暗区、运动低频过暗区、静止高频明区、静止低频明区、静止高频暗区、静止低频暗区、静止高频过暗区及静止低频过暗区。由于噪声同样会对噪声方差信息产生影响,故依据噪声方差信息进行区域划分时,同样需要根据增益快门对区分阈值进行灵活调整,以此来抵消噪声对噪声方差信息的影响,提升了每个监控场景下画面高低频区域检测的精度。
具体地,可以依据噪声方差信息,将运动明区划分为运动高频明区和运动低频明区,将运动暗区划分为运动高频暗区和运动低频暗区,将运动过暗区划分为运动高频过暗区和运动低频过暗区,将静止明区划分为静止高频明区和静止低频明区,将静止暗区划分为静止高频暗区和静止低频暗区,并将静止过暗区划分为静止高频过暗区和静止低频过暗区。
步骤S103,按照预设QP值表,确定出待编码图像中每个状态区域的QP调整值。
在本实施例中,将待编码图像划分为多个状态区域之后,需要根据在实验室环境下对视频编码设备100进行不同曝光增益测试得到的预设QP值表,确定出待编码图像中每个状态区域的QP调整值,具体的确定过程可以包括:获取待 编码图像的当前曝光增益值;将当前曝光增益值与多个测试曝光增益值进行一一对比,从多个测试曝光增益值中确定出与当前曝光增益值一致的目标曝光增益值;依据目标曝光增益值对应的运动高频区域QP值、运动低频区域QP值、静止高频区域QP值和静止低频区域QP值,确定出待编码图像中每个状态区域的QP调整值。
在本实施例中,当待编码图像为关键帧即I帧时,需要对I帧的最小QP编码值进行限制,最小QP编码值取预设QP值表中目标曝光增益值对应的QP 较好,这样限制可以降低码率同时满足用户需求。
当待编码图像为预测帧即P帧或B帧时,依据预设QP值表中目标曝光增益值对应的运动高频区域QP值、运动低频区域QP值、静止高频区域QP值和静止低频区域QP值,确定每个状态区域QP调整值的方法可以是:由于预设QP值表中的每个测试曝光增益值均对应一个噪声区间,噪声区间可以是低噪声区间、中噪声区间或高噪声区间,中噪声区间可以是低噪声区间和高噪声区间的过渡区间,故先确定目标曝光增益值对应的噪声区间,再按照噪声区间确定每个状态区域QP调整值,具体包括:
当目标曝光增益值对应低噪声区间时,依据目标曝光增益值对应的运动高频区域QP值、运动低频区域QP值、静止高频区域QP值和静止低频区域QP值,按照第一预设公式确定出待编码图像中每个状态区域的QP调整值。第一预设公式可以是:
Figure PCTCN2019082431-appb-000001
Figure PCTCN2019082431-appb-000002
Figure PCTCN2019082431-appb-000003
Figure PCTCN2019082431-appb-000004
QP=QP1+QP2+QP3+QP4
当目标曝光增益值对应中噪声区间时,依据所述目标曝光增益值对应的运动高频区域QP值、运动低频区域QP值、静止高频区域QP值和静止低频区域QP值,按照第二预设公式确定出待编码图像中每个状态区域的QP调整值。第二预设公式可以是:
Figure PCTCN2019082431-appb-000005
Figure PCTCN2019082431-appb-000006
Figure PCTCN2019082431-appb-000007
Figure PCTCN2019082431-appb-000008
QP=QP1+QP2+QP3+QP4
当目标曝光增益值对应高噪声区间时,依据目标曝光增益值对应的运动高频区域QP值、运动低频区域QP值、静止高频区域QP值和静止低频区域QP值,按照第三预设公式确定出待编码图像中每个状态区域的QP调整值。第三预设公式可以是:
Figure PCTCN2019082431-appb-000009
Figure PCTCN2019082431-appb-000010
Figure PCTCN2019082431-appb-000011
Figure PCTCN2019082431-appb-000012
QP=QP1+QP2+QP3+QP4
其中,在第一预设公式、第二预设公式和第三预设公式中,QP1中的QP 较好、QP 一般和QP 较差可以是预设QP值表中目标曝光增益值对应的运动高频区域QP值、运动低频区域QP值、静止高频区域QP值和静止低频区域QP值中较好、一般和较差的QP取值;QP2中的静止中频区域为静止高频区域和静止低频区域之间的过渡区,a、b均可以为目标曝光增益值对应的静止高频区域QP值和静止低频区域QP值之间的差值,用户也可以根据实际需要灵活调整,在此不再赘述;QP3中的运动、特征及ROI中频区域为运动、特征及ROI高频区域与运动、特 征及ROI低频区域之间的过渡区,a为目标曝光增益值对应的运动高频区域QP值和运动低频区域QP值之间的差值;QP4中的
Figure PCTCN2019082431-appb-000013
每个状态区域QP调整值根据QP=QP1+QP2+QP3+QP4确定出来。
需要说明的是,a、b可以不取静止高频区域QP值和静止低频区域QP值之间的差值,而预设为其他的取值。所述特征区域可根据实际需要进行设置,举例而言,可以将具有被识别出有人脸等特征的区域作为所述特征区域。所述理论码率为所述待编码图像的码率的理论值,所述理论码率可以在所述步骤S102之后(即在将待编码图像划分为多个状态区域之后)按照预设的计算方法计算得到,所述实际码率可以为,由所述视频编码器105对所述待编码图像进行预先的实际编码而得到的码率。在第一预设公式中,静止过暗区的QP1的取值可以根据实际需要设置,静止过暗区的QP1的取值需要使不等式QP>QP 较差成立;在第二预设公式中,静止过暗区的QP1的取值可以根据实际需要设置,静止过暗区的QP1的取值需要使不等式QP>2*QP 较差-QP 一般成立。
在第一预设公式、第二预设公式和第三预设公式中,SKIP宏块编码,是指编码时不将该宏块的像素残差和运动矢量残差写入码流,只对该宏块进行SKIP宏块标识,解码时采用近似替代的恢复办法通过参考帧恢复本帧本宏块的像素点。对于P帧,SKIP宏块为P-SKIP宏块,对于B帧,SKIP宏块为B-SKIP宏块。在视频编码过程中,可以通过调整帧间SKIP策略来降低编码码率。
具体来说,一般情况下静止区域的P帧宏块一般会使用P_SKIP宏块编码,但是在不同的曝光增益值下,由于噪声的影响可能会使用P块或者I块编码,这样就会使码率增大。为了利于解决这一问题,可以对静止过暗区强制大比例使 用P_SKIP宏块编码来主动降低码率。
也就是说,在确定待编码图像中每个状态区域的QP调整值的过程中,将暗区的QP调整值提升为预设QP值表中目标曝光增益值对应的静止高频区域QP值和静止低频区域QP值中较差的QP取值;对过暗区的QP调整值继续提升,或者直接采用P_SKIP宏块编码进行提升,以此来降低码率,以得到的视频编码码率达到预期标准为宜。
另外,如果待编码图像的参考帧图像为P帧,该参考帧图像静止区域的单位宏块平均码率高于预设阈值,且待编码图像的对应区域也为静止区域,则增加待编码图像中静止区域每个宏块的QP值并增加P_SKIP宏块编码比例。具体来说,待编码图像静止区域中每个宏块的QP编码值,可以在参考帧图像中对应的宏块QP编码值的基础上增加c得到,c的计算公式为
Figure PCTCN2019082431-appb-000014
B帧的帧间SKIP策略与P帧类似,在此不再赘述。
步骤S104,获取待编码图像的参考帧图像内每个宏块的QP编码值。
在本实施例中,为了确定待编码图像内每个宏块的宏块信息QP编码值,还需要获取待编码图像的参考帧图像内每个宏块的宏块信息,每个宏块的大小均可以是16×16,宏块信息可以包括,但不限于码率、宏块类型、QP编码值等,并记录参考帧图像对应的曝光增益值。需要说明的是,步骤S104的执行不限于在步骤S103之后,也可以在步骤S101之前执行,在此不做限定。
步骤S105,依据参考帧图像内每个宏块的QP编码值、以及待编码图像中每个状态区域的QP调整值,确定出待编码图像内每个宏块的QP编码值。
在本实施例中,当待编码图像为关键帧,即I帧时,用户可以自行确定待编码图像中每个宏块的QP编码值,只需确保待编码图像中最小QP编码值取预设 QP值表中目标曝光增益值对应的QP 较好即可。
当待编码图像为预测帧,即P帧或B帧时,将参考帧图像内每个宏块的QP编码值与待编码图像中每个状态区域的QP调整值进行叠加,就能得到待编码图像内每个宏块的QP编码值。
在具体实现中,本文实施例提供的视频编码方法可以包括步骤:对以图像组为编码结构单位对视频帧序列进行顺次压缩,所述图像组包括起始位置的关键帧和所述关键帧后面的预测帧。其中,对单个视频帧的压缩,可以通过所述步骤S101至S105实现。
步骤S106,利用待编码图像内每个宏块的QP编码值,对待编码图像进行压缩编码。
在本文实施例中,确定出待编码图像内每个宏块的QP编码值之后,依据每个宏块的QP编码值,对待编码图像进行压缩编码。待编码图像压缩编码的过程可以是:基于待编码图像与参考帧图像的差值生成残差系数,通过待编码图像内每个宏块的QP编码值控制残差系数的大小,以此来降低编码码率。
本实施例以GOP为编码结构单位对视频帧序列进行顺次压缩,GOP包括起始位置的关键帧和关键帧后面的预测帧,GOP编码结构可以是视频编码技术领域中的任意一种GOP编码结构,本实施例中以IPPP编码结构为例对技术方案进行详细介绍。IPPP编码结构中,I帧为全帧压缩帧,视频帧序列中的I帧间隔越小,GOP长度越小,视频编码的码率越大。因此,为了从编码结构上有效降低视频编码码率,本文实施例还包括步骤S107~S108。
步骤S107,获取待编码图像的运动矢量,并依据运动矢量计算待编码图像的GOP长度。
在本实施例中,不同的曝光增益值下,根据待编码图像的运动矢量对GOP及待编码图像的GOP长度进行调整。通常,清晰的I帧占总码率的50%左右,这是比较大的损耗,同时,目前监控领域通常设置为2秒左右一个I帧,主要是为了提升抗网络丢包的能力,但是这种设置严重制约了视频编码压缩率的提升。因此,需要将GOP增大,具体来说,GOP需要依据待编码图像的运动矢量及对应的曝光增益值进行增大,这样可以利于有效地提升视频编码的压缩率。
在本实施例中,依据待编码图像的运动矢量,利用GOP长度公式
Figure PCTCN2019082431-appb-000015
计算出待编码图像的GOP长度,其中,GOPSIZE为待编码图像的GOP长度,GOPSIZE max为GOP长度的最大值,GOPSIZE min为GOP长度的最小值,MV cur为待编码图像的运动矢量,MV min为运动矢量最小值,MV max为运动矢量最大值。GOPSIZE max和GOPSIZE min由用户根据待编码图像的曝光增益值进行调整,待编码图像的GOP长度调整之后,GOP编码结构中I帧的间隔可能会是原本的多倍,所以还可以进一步优化抗网络丢包能力,具体请参照步骤S108。
步骤S108,依据待编码图像的GOP长度对GOP进行调整,调整后的GOP包括一帧关键帧及至少一个预测帧编码段,其中,预测帧编码段包括一帧参考预测帧及多帧普通预测帧,参考预测帧参考关键帧进行编码,普通预测帧在预测帧编码段内进行逐帧参考编码。
在具体实现中,在同一预测帧编码段内,每个普通预测帧均为参考该普通预测帧的前一帧进行编码,其中,该普通预测帧的前一帧可能为参考预测帧,也可能为其他普通预测帧。
请参照图3,调整后的GOP包括一帧关键帧(即I帧)及至少一个预测帧 编码段,预测帧编码段包括一帧参考预测帧(例如,P1帧等)及多帧普通预测帧(例如,P11帧、P12帧、P1n帧等),参考预测帧参考关键帧(即I帧)进行编码,普通预测帧在预测帧编码段内进行逐帧参考编码。参考预测帧每2秒出现一次,以保证在某个P帧丢失的情况下能在2秒之内恢复图像。
GOP编码时,参考预测帧参考关键帧(即I帧)编码,参考预测帧后的普通预测帧逐帧参考编码,关键帧(即I帧)用于保证参考预测帧丢失后的视频图像恢复,参考预测帧用于保证普通预测帧丢失后的视频图像恢复,从而利于在保证解码后的视频图像质量的情况下,将GOP增大多倍,有效降低视频编码的码率。
同时,如果出现I帧数据丢包,则可以通过强制I帧来解决,这样可以在一定程度上减少GOP增大带来的影响。
步骤S109,获取调整后的GOP的控制信息,并将控制信息填充于关键帧的补充增强信息(Supplemental Enhancement Information,SEI)中,以在解码回放时依据控制信息对调整后的GOP进行解码。
在本实施例中,由于图3所示的GOP编码结构进行了调整,因此需要对解码端也进行控制优化,当回放点击时间对应一个普通预测帧时,需要控制该普通预测帧之间的其它视频帧进行解码但不显示,例如,回放点击时间为P22帧,则需要控制P22帧前的I帧、P2帧及P21帧进行解码但不显示,其中,P2为P21前面且与P21相邻的一帧,P21为P22前面且与P22相邻的一帧。因此,视频编码过程中可以通过SEI(Supplemental Enhancement Information,补充增强信息)携带设置好的控制信息,这样利于确保回放的时候不会出现播放画面跳跃的问题。
步骤S110,获取调整后的GOP中关键帧的运动信息,并在运动信息大于预设运动阈值时,重新申请关键帧。在本文实施例中,由于高运动量的帧作为参考帧会使得后续所有参考I帧的P帧变大,当I帧的运动检测信息大于预设运动阈值(例如,50%)时,也就是I帧中50%以上的画面是运动区域时,需要重新申请I帧。
步骤S111,当待编码图像中无运动信息时,待编码图像的GOP包括一帧关键帧及至少一个预测帧,每个预测帧均参考所述关键帧进行编码。
在本实施例中,图3所示的GOP编码结构是满帧情况下的优化,在满帧情况下,视频编码设备100可以达到最大帧率,一般一秒钟25帧~30帧。但是,实际监控应用中很多情况下是没有运动物体的,此时可以根据运动检测信息对编码帧率进行调整。具体的调整方法可以是:有运动信息时采用图3所示的GOP编码结构进行满帧率编码,无运动信息时采用图4所述的编码结构进行编码,此时帧率可以低至16秒1帧,同时需要携带帧率信息以用于解码回放时间窗。
第二实施例
请参照图5,图5示出了本文实施例提供的视频编码装置200的方框示意图。视频编码装置200包括状态信息统计模块201、状态区域划分模块202、QP调整值确定模块203、QP编码值获取模块204、QP编码值确定模块205、压缩编码模块206、GOP长度计算模块207、GOP调整模块208、第一执行模块209、第二执行模块210及第三执行模块211。
状态信息统计模块201,配置为获取待编码图像,并获取待编码图像中每个宏块的状态信息。
状态区域划分模块202,配置为依据每个宏块的状态信息,将待编码图像划 分为多个状态区域。
在本文实施例中,状态区域划分模块202,具体配置为依据运动检测信息,将待编码图像划分为运动区域与静止区域;依据亮度信息,将运动区域划分为运动明区、运动暗区及运动过暗区,并将静止区域划分为静止明区、静止暗区及静止过暗区;依据噪声方差信息,将运动明区、运动暗区、运动过暗区、静止明区、静止暗区及静止过暗区分别划分为运动高频明区、运动低频明区、运动高频暗区、运动低频暗区、运动高频过暗区、运动低频过暗区、静止高频明区、静止低频明区、静止高频暗区、静止低频暗区、静止高频过暗区及静止低频过暗区。
具体地,状态区域划分模块202可以配置为依据噪声方差信息,将运动明区划分为运动高频明区和运动低频明区,将运动暗区划分为运动高频暗区和运动低频暗区,将运动过暗区划分为运动高频过暗区和运动低频过暗区,将静止明区划分为静止高频明区和静止低频明区,将静止暗区划分为静止高频暗区和静止低频暗区,并将静止过暗区划分为静止高频过暗区和静止低频过暗区。
QP调整值确定模块203,配置为按照预设QP值表,确定出待编码图像中每个状态区域的QP调整值。
在本文实施例中,QP调整值确定模块203,具体配置为获取待编码图像的当前曝光增益值;将当前曝光增益值与多个测试曝光增益值进行一一对比,从多个测试曝光增益值中确定出与当前曝光增益值一致的目标曝光增益值;依据目标曝光增益值对应的运动高频区域QP值、运动低频区域QP值、静止高频区域QP值和静止低频区域QP值,确定出待编码图像中每个状态区域的QP调整值。
QP编码值获取模块204,配置为获取待编码图像的参考帧图像内每个宏块的QP编码值。
QP编码值确定模块205,配置为依据参考帧图像内每个宏块的QP编码值、以及待编码图像中每个状态区域的QP调整值,确定出待编码图像内每个宏块的QP编码值。
压缩编码模块206,配置为利用待编码图像内每个宏块的QP编码值,对待编码图像进行压缩编码。
GOP长度计算模块207,配置为获取待编码图像的运动矢量,并依据运动矢量计算待编码图像的GOP长度。
在本文实施例中,GOP长度计算模块207,具体配置为依据待编码图像的运动矢量,利用GOP长度公式
Figure PCTCN2019082431-appb-000016
计算出待编码图像的GOP长度,其中,GOPSIZE为待编码图像的GOP长度,GOPSIZE max为GOP长度的最大值,GOPSIZE min为GOP长度的最小值,MV cur为待编码图像的运动矢量,MV min为运动矢量最小值,MV max为运动矢量最大值。
GOP调整模块208,配置为依据待编码图像的GOP长度对GOP进行调整,调整后的GOP包括一帧关键帧及至少一个预测帧编码段,其中,预测帧编码段包括一帧参考预测帧及多帧普通预测帧,参考预测帧参考关键帧进行编码,普通预测帧在预测帧编码段内进行逐帧参考编码。
在具体实现中,在同一预测帧编码段内,每个普通预测帧均为参考该普通预测帧的前一帧进行编码,其中,该普通预测帧的前一帧可能为参考预测帧,也可能为其他普通预测帧。
第一执行模块209,配置为获取调整后的GOP的控制信息,并将控制信息填充于关键帧的SEI中,以在解码回放时依据控制信息对调整后的GOP进行解码。
第二执行模块210,配置为获取调整后的GOP中关键帧的运动信息,并在运动信息大于预设运动阈值时,重新申请关键帧。
第三执行模块211,配置为当待编码图像中无运动信息时,待编码图像的GOP包括一帧关键帧及至少一个预测帧,每个预测帧均参考所述关键帧进行编码。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的视频编码装置200的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
综上所述,本文实施例提供的一种视频编码方法及装置,所述方法包括:获取待编码图像,并获取待编码图像中每个宏块的状态信息;依据每个宏块的状态信息,将待编码图像划分为多个状态区域;按照预设QP值表,确定出待编码图像中每个状态区域的QP调整值;获取待编码图像的参考帧图像内每个宏块的QP编码值;依据参考帧图像内每个宏块的QP编码值、以及待编码图像中每个状态区域的QP调整值,确定出待编码图像内每个宏块的QP编码值;利用待编码图像内每个宏块的QP编码值,对待编码图像进行压缩编码。本文实施例在压缩编码之前,根据每个宏块的状态设置每个宏块的QP编码值,这样在后续压缩编码的时候,能够对每个宏块进行与每个宏块的状态相适应的压缩编码处理,例如可以将变化不大的宏块的质量降低,这样可以最大程度降低数据量,在保证图像质量的同时有效降低了视频流编码码率。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本文的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本文每个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等每种可以存储程序代码的介质。

Claims (17)

  1. 一种视频编码方法,所述方法包括:
    获取待编码图像,并获取所述待编码图像中每个宏块的状态信息;
    依据每个宏块的状态信息,将所述待编码图像划分为多个状态区域;
    按照预设量化参数值表,确定出所述待编码图像中每个状态区域的量化参数调整值;
    获取所述待编码图像的参考帧图像内每个宏块的量化参数编码值;
    依据所述参考帧图像内每个宏块的量化参数编码值、以及所述待编码图像中每个状态区域的量化参数调整值,确定出所述待编码图像内每个宏块的量化参数编码值;
    利用所述待编码图像内每个宏块的量化参数编码值,对所述待编码图像进行压缩编码。
  2. 如权利要求1所述的方法,其中,所述状态信息包括运动检测信息、亮度信息及噪声方差信息,所述多个状态区域包括运动高频明区、运动低频明区、运动高频暗区、运动低频暗区、运动高频过暗区、运动低频过暗区、静止高频明区、静止低频明区、静止高频暗区、静止低频暗区、静止高频过暗区及静止低频过暗区;
    所述依据每个宏块的状态信息,将所述待编码图像划分为多个状态区域的步骤,包括:
    依据所述运动检测信息,将所述待编码图像划分为运动区域与静止区域;
    依据所述亮度信息,将所述运动区域划分为运动明区、运动暗区及运动过暗区,并将所述静止区域划分为静止明区、静止暗区及静止过暗区;
    依据所述噪声方差信息,将所述运动明区、运动暗区、运动过暗区、静止 明区、静止暗区及静止过暗区分别划分为运动高频明区、运动低频明区、运动高频暗区、运动低频暗区、运动高频过暗区、运动低频过暗区、静止高频明区、静止低频明区、静止高频暗区、静止低频暗区、静止高频过暗区及静止低频过暗区。
  3. 如权利要求2所述的方法,其中,所述预设量化参数值表包括多个测试曝光增益值、以及与每个测试曝光增益值对应的运动高频区域量化参数值、运动低频区域量化参数值、静止高频区域量化参数值和静止低频区域量化参数值;
    所述按照预设量化参数值表,确定出所述待编码图像中每个状态区域的量化参数调整值的步骤,包括:
    获取所述待编码图像的当前曝光增益值;将所述当前曝光增益值与所述多个测试曝光增益值进行一一对比,从所述多个测试曝光增益值中确定出与所述当前曝光增益值一致的目标曝光增益值;
    依据所述目标曝光增益值对应的运动高频区域量化参数值、运动低频区域量化参数值、静止高频区域量化参数值和静止低频区域量化参数值,确定出所述待编码图像中每个状态区域的量化参数调整值。
  4. 如权利要求3所述的方法,其中,每个所述测试曝光增益值均与一个噪声区间对应,噪声区间为低噪声区间、中噪声区间或高噪声区间;当所述待编码图像为预测帧时,所述依据所述目标曝光增益值对应的运动高频区域量化参数值、运动低频区域量化参数值、静止高频区域量化参数值和静止低频区域量化参数值,确定出所述待编码图像中每个状态区域的量化参数调整值的步骤,包括:
    确定所述目标曝光增益值对应的噪声区间;
    当所述目标曝光增益值对应低噪声区间时,依据所述目标曝光增益值对应的运动高频区域量化参数值、运动低频区域量化参数值、静止高频区域量化参数值和静止低频区域量化参数值,按照第一预设公式确定出所述待编码图像中每个状态区域的量化参数调整值;
    当所述目标曝光增益值对应中噪声区间时,依据所述目标曝光增益值对应的运动高频区域量化参数值、运动低频区域量化参数值、静止高频区域量化参数值和静止低频区域量化参数值,按照第二预设公式确定出所述待编码图像中每个状态区域的量化参数调整值;
    当所述目标曝光增益值对应高噪声区间时,依据所述目标曝光增益值对应的运动高频区域量化参数值、运动低频区域量化参数值、静止高频区域量化参数值和静止低频区域量化参数值,按照第三预设公式确定出所述待编码图像中每个状态区域的量化参数调整值。
  5. 如权利要求1所述的方法,所述方法包括:以图像组为编码结构单位对视频帧序列进行顺次压缩,所述图像组包括起始位置的关键帧和所述关键帧后面的预测帧,所述方法还包括:
    获取所述待编码图像的运动矢量,并依据所述运动矢量计算所述待编码图像的图像组长度;
    依据所述待编码图像的图像组长度对图像组进行调整,调整后的图像组包括一帧关键帧及至少一个预测帧编码段,其中,所述预测帧编码段包括一帧参考预测帧及多帧普通预测帧,所述参考预测帧参考所述关键帧进行编码,所述普通预测帧在所述预测帧编码段内进行逐帧参考编码。
  6. 如权利要求5所述的方法,其中,所述方法还包括:
    获取所述调整后的图像组的控制信息,并将所述控制信息填充于关键帧的补充增强信息中,以在解码回放时依据所述控制信息对调整后的图像组进行解码。
  7. 如权利要求5所述的方法,其中,所述依据所述运动矢量计算所述待编码图像的图像组长度的步骤,包括:
    依据所述待编码图像的运动矢量,利用图像组长度公式
    Figure PCTCN2019082431-appb-100001
    计算出所述待编码图像的图像组长度,其中,GOPSIZE为待编码图像的图像组长度,GOPSIZE max为图像组长度的最大值,GOPSIZE min为图像组长度的最小值,MV cur为待编码图像的运动矢量,MV min为运动矢量最小值,MV max为运动矢量最大值。
  8. 如权利要求5所述的方法,所述方法还包括:
    获取所述调整后的图像组中关键帧的运动信息,并在所述运动信息大于预设运动阈值时,重新申请关键帧。
  9. 如权利要求5所述的方法,所述方法还包括:
    当所述待编码图像中无运动信息时,所述待编码图像的图像组包括一帧关键帧及至少一个预测帧,每个预测帧均参考所述关键帧进行编码。
  10. 如权利要求4所述的方法,其中,所述依据所述目标曝光增益值对应的运动高频区域量化参数值、运动低频区域量化参数值、静止高频区域量化参数值和静止低频区域量化参数值,确定出所述待编码图像中每个状态区域的量化参数调整值的步骤,包括:
    依据所述目标曝光增益值对应的运动高频区域量化参数值、运动低频区域量化参数值、静止高频区域量化参数值和静止低频区域量化参数值,并对静止 静止过暗区采用SKIP宏块编码,确定出所述待编码图像中每个状态区域的量化参数调整值;
    所述第一预设公式为:
    Figure PCTCN2019082431-appb-100002
    Figure PCTCN2019082431-appb-100003
    Figure PCTCN2019082431-appb-100004
    Figure PCTCN2019082431-appb-100005
    QP=QP1+QP2+QP3+QP4;
    所述第二预设公式为:
    Figure PCTCN2019082431-appb-100006
    Figure PCTCN2019082431-appb-100007
    Figure PCTCN2019082431-appb-100008
    Figure PCTCN2019082431-appb-100009
    QP=QP1+QP2+QP3+QP4;
    所述第三预设公式为:
    Figure PCTCN2019082431-appb-100010
    Figure PCTCN2019082431-appb-100011
    Figure PCTCN2019082431-appb-100012
    Figure PCTCN2019082431-appb-100013
    QP=QP1+QP2+QP3+QP4;
    其中,在第一预设公式、第二预设公式和第三预设公式中,QP为量化参数值,QP1中的QP 较好、QP 一般和QP 较差是预设量化参数值表中目标曝光增益值对应的运动高频区域量化参数值、运动低频区域量化参数值、静止高频区域量化参数值和静止低频区域量化参数值中较好、一般和较差的量化参数取值;QP2中的静止中频区域为静止高频区域和静止低频区域之间的过渡区,a、b均为预设值;QP3中的运动、特征及感兴趣中频区域为运动、特征区域及感兴趣高频区域与运动、特征及感兴趣低频区域之间的过渡区;QP4中的
    Figure PCTCN2019082431-appb-100014
  11. 一种视频编码装置,所述装置包括:
    状态信息统计模块,配置为获取待编码图像,并获取所述待编码图像中每个宏块的状态信息;
    状态区域划分模块,配置为依据每个宏块的状态信息,将所述待编码图像划分为多个状态区域;
    量化参数调整值确定模块,配置为按照预设量化参数值表,确定出所述待编码图像中每个状态区域的量化参数调整值;
    量化参数编码值获取模块,配置为获取所述待编码图像的参考帧图像内每个宏块的量化参数编码值;
    量化参数编码值确定模块,配置为依据所述参考帧图像内每个宏块的量化参数编码值、以及所述待编码图像中每个状态区域的量化参数调整值,确定出所述待编码图像内每个宏块的量化参数编码值;
    压缩编码模块,配置为利用所述待编码图像内每个宏块的量化参数编码值,对所述待编码图像进行压缩编码。
  12. 如权利要求11所述的装置,其中,所述装置以图像组为编码结构单位对视频帧序列进行顺次压缩,所述图像组包括起始位置的关键帧和所述关键帧后面的预测帧,所述装置还包括:
    图像组长度计算模块,配置为获取所述待编码图像的运动矢量,并依据所述运动矢量计算所述待编码图像的图像组长度;
    图像组调整模块,配置为依据所述待编码图像的图像组长度对图像组进行调整,调整后的图像组包括一帧关键帧及至少一个预测帧编码段,其中,所述预测帧编码段包括一帧参考预测帧及多帧普通预测帧,所述参考预测帧参考所述关键帧进行编码,所述普通预测帧在所述预测帧编码段内进行逐帧参考编码。
  13. 如权利要求12所述的装置,其中,所述装置还包括:
    第一执行模块,配置为获取所述调整后的图像组的控制信息,并将所述控制信息填充于关键帧的补充增强信息中,以在解码回放时依据所述控制信息对调整后的图像组进行解码。
  14. 如权利要求12所述的装置,其中,所述装置还包括:
    第二执行模块,配置为获取所述调整后的图像组中关键帧的运动信息,并在所述运动信息大于预设运动阈值时,重新申请关键帧。
  15. 如权利要求12所述的装置,其中,所述装置还包括:
    第三执行模块,配置为当所述待编码图像中无运动信息时,所述待编码图像的图像组包括一帧关键帧及至少一个预测帧,每个预测帧均参考所述关键帧进行编码。
  16. 一种电子设备,包括:
    至少一个处理器;
    存储器,设置为存储至少一个程序,
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-10中任一所述的方法。
  17. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-10任一所述的方法。
PCT/CN2019/082431 2018-11-19 2019-04-12 视频编码方法、装置、电子设备及计算机可读存储介质 WO2020103384A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/294,461 US11838507B2 (en) 2018-11-19 2019-04-12 Video encoding method and apparatus, electronic device, and computer-readable storage medium
EP19887129.5A EP3886436A4 (en) 2018-11-19 2019-04-12 VIDEO ENCODING METHOD AND DEVICE, ELECTRONIC DEVICE AND COMPUTER READABLE STORAGE MEDIUM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811376866.7A CN111200734B (zh) 2018-11-19 2018-11-19 视频编码方法及装置
CN201811376866.7 2018-11-19

Publications (1)

Publication Number Publication Date
WO2020103384A1 true WO2020103384A1 (zh) 2020-05-28

Family

ID=70745703

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/082431 WO2020103384A1 (zh) 2018-11-19 2019-04-12 视频编码方法、装置、电子设备及计算机可读存储介质

Country Status (4)

Country Link
US (1) US11838507B2 (zh)
EP (1) EP3886436A4 (zh)
CN (1) CN111200734B (zh)
WO (1) WO2020103384A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113469922A (zh) * 2021-04-07 2021-10-01 海能达通信股份有限公司 图像处理方法、计算机设备及计算机可读存储介质
CN113747151A (zh) * 2021-07-30 2021-12-03 咪咕文化科技有限公司 视频编解码方法、装置、设备及计算机可读存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112165619A (zh) * 2020-09-24 2021-01-01 杭州当虹科技股份有限公司 一种面向监控视频压缩存储的方法
CN112165620A (zh) * 2020-09-24 2021-01-01 北京金山云网络技术有限公司 视频的编码方法及装置、存储介质、电子设备
CN116647685A (zh) * 2020-10-26 2023-08-25 杭州海康威视数字技术股份有限公司 视频编码方法、装置、电子设备及可读存储介质
CN112104869B (zh) * 2020-11-10 2021-02-02 光谷技术有限公司 一种视频大数据存储及转码优化系统
CN112073724B (zh) * 2020-11-16 2021-01-29 北京世纪好未来教育科技有限公司 视频信息处理方法、装置、电子设备及存储介质
CN112235576B (zh) * 2020-11-16 2024-04-30 北京世纪好未来教育科技有限公司 编码方法、装置、电子设备及存储介质
CN112272299A (zh) * 2020-11-27 2021-01-26 广州市网星信息技术有限公司 一种视频编码的方法、装置、设备和存储介质
CN116156196B (zh) * 2023-04-19 2023-06-30 探长信息技术(苏州)有限公司 一种用于视频数据的高效传输方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080304562A1 (en) * 2007-06-05 2008-12-11 Microsoft Corporation Adaptive selection of picture-level quantization parameters for predicted video pictures
CN101325711A (zh) * 2008-07-16 2008-12-17 上海大学 基于时空掩盖效应的自适应码率控制方法
WO2009149564A1 (en) * 2008-06-13 2009-12-17 Octasic Inc. Method and device for controlling bit-rate for video encoding, video encoding system using same and computer product therefor
CN102932641A (zh) * 2012-11-13 2013-02-13 北京大学 一种恒定质量码率控制方法
CN106170979A (zh) * 2014-04-30 2016-11-30 英特尔公司 恒定质量视频编码
CN106878727A (zh) * 2016-12-31 2017-06-20 深圳市共进电子股份有限公司 视频数据处理方法及装置

Family Cites Families (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5214507A (en) 1991-11-08 1993-05-25 At&T Bell Laboratories Video signal quantization for an mpeg like coding environment
KR20050119422A (ko) 2004-06-16 2005-12-21 삼성전자주식회사 움직임 보상에 기반한 입력 영상의 노이즈 예측 및 그장치와, 이를 사용한 노이즈 제거 및 동영상 부호화 방법,이를 수행하기 위한 프로그램이 기록된 기록 매체
JP2006032999A (ja) * 2004-07-12 2006-02-02 Sharp Corp 画像復号装置及び画像復号方法
CN101069432B (zh) * 2004-12-02 2015-10-21 汤姆逊许可公司 用于视频编码器速率控制的量化参数的确定方法和设备
JP4794987B2 (ja) 2005-11-09 2011-10-19 キヤノン株式会社 映像信号処理装置
US8982947B2 (en) * 2007-07-20 2015-03-17 The Hong Kong University Of Science And Technology Rate control and video denoising for noisy video data
US8635357B2 (en) * 2009-09-08 2014-01-21 Google Inc. Dynamic selection of parameter sets for transcoding media data
IT1402430B1 (it) * 2010-09-17 2013-09-04 St Microelectronics Srl "procedimento e dispositivo per l'elaborazione di segnali video, trasmettitore o prodotto informatico relativi"
US9462280B2 (en) * 2010-12-21 2016-10-04 Intel Corporation Content adaptive quality restoration filtering for high efficiency video coding
US10298939B2 (en) * 2011-06-22 2019-05-21 Qualcomm Incorporated Quantization in video coding
US20130142250A1 (en) 2011-12-06 2013-06-06 Broadcom Corporation Region based classification and adaptive rate control method and apparatus
WO2013111126A2 (en) * 2012-01-23 2013-08-01 I.C.V.T Ltd. Method and system for controlling video frame encoding
US9350989B2 (en) * 2012-12-11 2016-05-24 Megachips Corporation Moving image coding apparatus, code amount control method, and storage medium
KR20140110221A (ko) * 2013-03-06 2014-09-17 삼성전자주식회사 비디오 인코더, 장면 전환 검출 방법 및 비디오 인코더의 제어 방법
US20140269901A1 (en) * 2013-03-13 2014-09-18 Magnum Semiconductor, Inc. Method and apparatus for perceptual macroblock quantization parameter decision to improve subjective visual quality of a video signal
US9661328B2 (en) * 2013-03-15 2017-05-23 Arris Enterprises, Inc. Method of bit allocation for image and video compression using perceptual guidance
GB201312382D0 (en) 2013-07-10 2013-08-21 Microsoft Corp Region-of-interest aware video coding
KR20150102874A (ko) * 2013-11-28 2015-09-09 현대모비스 주식회사 적응적 부호화 방법을 이용한 영상의 부호화 방법 및 이를 이용한 인코딩 장치
US20150350686A1 (en) * 2014-05-29 2015-12-03 Apple Inc. Preencoder assisted video encoding
CN104539962B (zh) * 2015-01-20 2017-12-01 北京工业大学 一种融合视觉感知特征的可分层视频编码方法
US9883214B2 (en) * 2015-03-31 2018-01-30 Dialogic Corporation Efficient approach to dynamic frame size and frame rate adaptation
CN105516720B (zh) * 2015-12-23 2019-01-29 天地伟业技术有限公司 一种监控摄像机码流的自适应控制方法
JP6700798B2 (ja) 2016-01-13 2020-05-27 キヤノン株式会社 撮像装置及びその制御方法
US10574989B2 (en) 2016-10-17 2020-02-25 Arris Enterprises Llc Temporal local activity for quantization parameter (QP) offset for video coding
JP6961443B2 (ja) * 2017-09-29 2021-11-05 キヤノン株式会社 画像処理装置、画像処理方法、及びプログラム
CN108012149B (zh) * 2017-12-19 2021-05-18 四川九洲电器集团有限责任公司 一种视频编码中码率控制的方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080304562A1 (en) * 2007-06-05 2008-12-11 Microsoft Corporation Adaptive selection of picture-level quantization parameters for predicted video pictures
WO2009149564A1 (en) * 2008-06-13 2009-12-17 Octasic Inc. Method and device for controlling bit-rate for video encoding, video encoding system using same and computer product therefor
CN101325711A (zh) * 2008-07-16 2008-12-17 上海大学 基于时空掩盖效应的自适应码率控制方法
CN102932641A (zh) * 2012-11-13 2013-02-13 北京大学 一种恒定质量码率控制方法
CN106170979A (zh) * 2014-04-30 2016-11-30 英特尔公司 恒定质量视频编码
CN106878727A (zh) * 2016-12-31 2017-06-20 深圳市共进电子股份有限公司 视频数据处理方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3886436A4

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113469922A (zh) * 2021-04-07 2021-10-01 海能达通信股份有限公司 图像处理方法、计算机设备及计算机可读存储介质
CN113747151A (zh) * 2021-07-30 2021-12-03 咪咕文化科技有限公司 视频编解码方法、装置、设备及计算机可读存储介质
CN113747151B (zh) * 2021-07-30 2024-04-12 咪咕文化科技有限公司 视频编解码方法、装置、设备及计算机可读存储介质

Also Published As

Publication number Publication date
US11838507B2 (en) 2023-12-05
US20210409713A1 (en) 2021-12-30
CN111200734A (zh) 2020-05-26
EP3886436A4 (en) 2023-01-18
EP3886436A1 (en) 2021-09-29
CN111200734B (zh) 2022-03-11

Similar Documents

Publication Publication Date Title
WO2020103384A1 (zh) 视频编码方法、装置、电子设备及计算机可读存储介质
US20220312021A1 (en) Analytics-modulated coding of surveillance video
US9942557B2 (en) Method and system of video encoding optimization
US20220058775A1 (en) Video denoising method and apparatus, and storage medium
US9071842B2 (en) Detection of video feature based on variance metric
US8218082B2 (en) Content adaptive noise reduction filtering for image signals
CN105472205B (zh) 编码过程中的实时视频降噪方法和装置
US11095899B2 (en) Image processing apparatus, image processing method, and storage medium
EP2041984A1 (en) Method and apparatus for adapting a default encoding of a digital video signal during a scene change period
US6990146B2 (en) Method and system for detecting intra-coded pictures and for extracting intra DCT precision and macroblock-level coding parameters from uncompressed digital video
WO2017177675A1 (zh) 视频编码方法和装置
EP2810432A1 (en) Video coding using eye tracking maps
US10979711B2 (en) Method and encoder system for encoding video
US20150249829A1 (en) Method, Apparatus and Computer Program Product for Video Compression
CN114913250A (zh) 基于语义分割和匈牙利算法的视频编解码系统和方法
KR20160109617A (ko) 디지털 비디오의 디코딩 장치
CN111182310A (zh) 视频处理方法、装置、计算机可读介质及电子设备
KR100584422B1 (ko) 영상데이터의 압축 장치 및 방법
EP3547684B1 (en) Method, device and system for encoding a sequence of frames in a video stream
WO2017104011A1 (ja) 画像符号化装置
Richardson Compressed Video Quality
KR20170050120A (ko) 영상 신호의 노이즈 제거 방법
KR101409852B1 (ko) 영상의 움직임 객체 분석에 따른 계위적 부호화 방법 및 장치
KR20070018590A (ko) 비디오 전송 시스템 및 디블로킹 제어 방법
KR20140109808A (ko) 동영상을 부호화/복호화하기 위한 장치 및 그 방법

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: 19887129

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019887129

Country of ref document: EP

Effective date: 20210621