CN110049326A - Method for video coding and device, storage medium - Google Patents

Method for video coding and device, storage medium Download PDF

Info

Publication number
CN110049326A
CN110049326A CN201910452802.9A CN201910452802A CN110049326A CN 110049326 A CN110049326 A CN 110049326A CN 201910452802 A CN201910452802 A CN 201910452802A CN 110049326 A CN110049326 A CN 110049326A
Authority
CN
China
Prior art keywords
macro block
video image
area
video
specified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910452802.9A
Other languages
Chinese (zh)
Other versions
CN110049326B (en
Inventor
黄书敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology Co Ltd
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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201910452802.9A priority Critical patent/CN110049326B/en
Publication of CN110049326A publication Critical patent/CN110049326A/en
Application granted granted Critical
Publication of CN110049326B publication Critical patent/CN110049326B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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/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/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip

Landscapes

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

Abstract

The invention discloses a kind of method for video coding and devices, storage medium, belong to field of computer technology.The described method includes: obtaining the coded data of the first video image, the coded data of the first video image includes the intra prediction mode of each macro block in the first area of the first video image;Based on the coded data of the first video image, the second video image is encoded;Wherein, first video image is the key frame in the first video flowing, second video image is the key frame in the second video flowing, video image in first video flowing has Chong Die region with the video image in the second video flowing, and first area is region Chong Die with the second video image in the first video image.The present invention passes through the coded data for being multiplexed overlapping region in video flowing of not going the same way, can reduce the computing cost of coding, reduces encoder complexity.

Description

Method for video coding and device, storage medium
Technical field
The present invention relates to field of computer technology, in particular to a kind of method for video coding and device, storage medium.
Background technique
With the development of computer technology, the application scenarios of video are more and more abundant.In video coding process, it may appear that Same equipment needs the case where encoding simultaneously to multi-path video stream.In the related technology, when same equipment needs simultaneously to more When road video flowing is encoded, need to encode every road video flowing respectively, computing cost is larger, and encoder complexity is higher.
Summary of the invention
The embodiment of the invention provides a kind of method for video coding and devices, storage medium, can solve in the related technology The computing cost of Video coding is larger, the higher problem of encoder complexity.The technical solution is as follows:
In a first aspect, providing a kind of method for video coding, which comprises
The coded data of the first video image is obtained, the coded data of first video image includes first video The intra prediction mode of each macro block in the first area of image;
Based on the coded data of first video image, the second video image is encoded;
Wherein, first video image is the key frame in the first video flowing, and second video image is the second view Key frame in frequency stream, the video image in first video flowing is with the video image in second video flowing with Chong Die Region, the first area is the region Chong Die with second video image in first video image.
Optionally, the coded data for obtaining the first video image, comprising:
When the first area meets specified requirements, the coded data of first video image is obtained, wherein described Specified requirements include it is following at least one:
Left column macro block and firstth area of the left column macro block of the first area for first video image The most uplink macro block in domain is the most uplink macro block of first video image.
Optionally, before the coded data for obtaining the first video image, the method also includes:
After obtaining first video image, detect whether the first area meets the specified requirements;
When the first area meets the specified requirements, according to the first area in first video image Position, determine in the first area specify macro block intra prediction mode.
Optionally, the position according to the first area in first video image, determines firstth area The intra prediction mode of macro block is specified in domain, comprising:
When the left column macro block of the first area is not the left column macro block of first video image, and described first When the most uplink macro block in region is the most uplink macro block of first video image, the reconstruction on the upside of the specified macro block will be located at Reference macroblock of the macro block as the specified macro block, the specified macro block are in the left column macro block of the first area except most upper Any macro block other than square macro block.
Optionally, the position according to the first area in first video image, determines firstth area The intra prediction mode of macro block is specified in domain, comprising:
When the left column macro block that the left column macro block of the first area is first video image, and firstth area When the most uplink macro block in domain is not the most uplink macro block of first video image, the reconstruction on the left of the specified macro block will be located at Reference macroblock of the macro block as the specified macro block, the specified macro block are in the most uplink macro block of the first area except most left Any macro block other than the macro block of side.
Optionally, the coded data further includes the sub-macroblock division mode of each macro block, each macro block At least one of residual error after the quantization of mapping mode, the quantization parameter of each macro block or each macro block.
Optionally, the coded data based on first video image, encodes the second video image, packet It includes:
Intra prediction mould based on the sub-macroblock division mode of each macro block in the first area, each macro block Formula, the mapping mode of each macro block, the quantization parameter of each macro block and each macro block quantization after residual error into Row entropy coding, obtains the corresponding code stream of second area of second video image, and the second area is second video The region Chong Die with the first video image in image.
Optionally, the coded data based on first video image, encodes the second video image, packet It includes:
When the left column macro block of the first area is not the left column macro block of first video image, and/or, it is described When the most uplink macro block of first area is not the most uplink macro block of first video image, based on first video image Coded data encodes the macro block being located at other than specified region in the second area of second video image, the finger Determine the left column macro block and most uplink macro block in region including the second area, the second area is the second video figure The region Chong Die with the first video image as in.
Optionally, the coded data further includes the sub-macroblock division mode of each macro block, described based on described the The coded data of one video image carries out the macro block being located at other than specified region in the second area of second video image Coding, comprising:
The target macroblock in the second area is obtained, the target macroblock is the macro block outside the specified region, And the pixel value of the reference macroblock of the target macroblock is less than with the difference of the pixel value of corresponding macro block in the first area Specified threshold;
Sub-macroblock division mode based on corresponding macro block in the first area and in the frame of the corresponding macro block Prediction mode carries out conversion process, quantification treatment and entropy coding to the target macroblock.
Optionally, first video image and second video image meet a kind of following relationship:
Second video image is intercepted from first video image and is obtained;
First video image is spliced to obtain by second video image and third video image.
Second aspect, provides a kind of video coding apparatus, and described device includes:
Module is obtained, for obtaining the coded data of the first video image, the coded data packet of first video image Include the intra prediction mode of each macro block in the first area of first video image;
Coding module encodes the second video image for the coded data based on first video image;
Wherein, first video image is the key frame in the first video flowing, and second video image is the second view Key frame in frequency stream, the video image in first video flowing is with the video image in second video flowing with Chong Die Region, the first area is the region Chong Die with second video image in first video image.
Optionally, the acquisition module, is used for:
When the first area meets specified requirements, the coded data of first video image is obtained, wherein described Specified requirements include it is following at least one:
Left column macro block and firstth area of the left column macro block of the first area for first video image The most uplink macro block in domain is the most uplink macro block of first video image.
Optionally, described device further include:
Detection module, for after obtaining first video image, detect the first area whether meet it is described Specified requirements;
Determining module, for when the first area meets the specified requirements, according to the first area described Position in first video image determines the intra prediction mode that macro block is specified in the first area.
Optionally, the determining module, is used for:
When the left column macro block of the first area is not the left column macro block of first video image, and described first When the most uplink macro block in region is the most uplink macro block of first video image, the reconstruction on the upside of the specified macro block will be located at Reference macroblock of the macro block as the specified macro block, the specified macro block are in the left column macro block of the first area except most upper Any macro block other than square macro block.
Optionally, the determining module, is used for:
When firstth area
The left column macro block in domain is the left column macro block of first video image, and the most uplink of the first area is macro When block is not the most uplink macro block of first video image, the reconstruction macro block on the left of the specified macro block will be located at as described in The reference macroblock of specified macro block, the specified macro block be in the most uplink macro block of the first area in addition to the macro block of the leftmost side Any macro block.
Optionally, the coded data further includes the sub-macroblock division mode of each macro block, each macro block At least one of residual error after the quantization of mapping mode, the quantization parameter of each macro block or each macro block.
Optionally, the coding module, is used for:
Intra prediction mould based on the sub-macroblock division mode of each macro block in the first area, each macro block Formula, the mapping mode of each macro block, the quantization parameter of each macro block and each macro block quantization after residual error into Row entropy coding, obtains the corresponding code stream of second area of second video image, and the second area is second video The region Chong Die with the first video image in image.
Optionally, the coding module, is used for:
When the left column macro block of the first area is not the left column macro block of first video image, and/or, it is described When the most uplink macro block of first area is not the most uplink macro block of first video image, based on first video image Coded data encodes the macro block being located at other than specified region in the second area of second video image, the finger Determine the left column macro block and most uplink macro block in region including the second area, the second area is the second video figure The region Chong Die with the first video image as in.
Optionally, the coded data further includes the sub-macroblock division mode of each macro block, and the coding module is gone back For:
The target macroblock in the second area is obtained, the target macroblock is the macro block outside the specified region, And the pixel value of the reference macroblock of the target macroblock is less than with the difference of the pixel value of corresponding macro block in the first area Specified threshold;
Sub-macroblock division mode based on corresponding macro block in the first area and in the frame of the corresponding macro block Prediction mode carries out conversion process, quantification treatment and entropy coding to the target macroblock.
Optionally, first video image and second video image meet a kind of following relationship:
Second video image is intercepted from first video image and is obtained;
First video image is spliced to obtain by second video image and third video image.
The third aspect provides a kind of video coding apparatus, comprising: processor and memory,
The memory, for storing computer program;
The processor is realized for executing the computer program stored on the memory as first aspect is any The method for video coding.
Fourth aspect provides a kind of storage medium, comprising: when the program in the storage medium is executed by processor When, it can be realized the method for video coding as described in first aspect is any.
Technical solution bring beneficial effect provided in an embodiment of the present invention includes:
When there is the region Chong Die with the second video image in the first video image, coding side can be based on the first video The coded data of image encodes the second video image.Since coded data includes the first area of the first video image The intra prediction mode of interior each macro block, the first area are region Chong Die with the second video image in the first video image, Therefore when encoding region Chong Die with the first area in the second video image, without re-starting intra prediction mode choosing It selects, the coded data that need to be only multiplexed in the first area of the first video image is reduced to the key frame in video flowing Encoder complexity thereby reduces the encoder complexity to video flowing, reduces the computing cost in video coding process.
Detailed description of the invention
Fig. 1 is a kind of schematic diagram of intra prediction provided in an embodiment of the present invention;
Fig. 2 is a kind of block schematic illustration of intra prediction provided in an embodiment of the present invention;
Fig. 3 is the schematic diagram of double screen live streaming provided in an embodiment of the present invention;
Fig. 4 is the interface schematic diagram of even wheat mixed flow provided in an embodiment of the present invention;
Fig. 5 is a kind of flow chart of method for video coding provided in an embodiment of the present invention;
Fig. 6 is the flow chart of another method for video coding provided in an embodiment of the present invention;
Fig. 7 is a kind of schematic diagram of first video image provided in an embodiment of the present invention;
Fig. 8 is the schematic diagram of another first video image provided in an embodiment of the present invention;
Fig. 9 is the flow chart of another method for video coding provided in an embodiment of the present invention;
Figure 10 is a kind of structural schematic diagram of video coding apparatus provided in an embodiment of the present invention;
Figure 11 is the structural schematic diagram of another video coding apparatus provided in an embodiment of the present invention;
Figure 12 is a kind of block diagram of video coding apparatus provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Video coding refers to through specific compress technique, and file is converted to another video lattice from a video format The mode of formula.Video coding generally includes intraframe coding and interframe encode both coding modes.Wherein, intraframe coding can also claim For frame data compression.Intraframe coding generally includes this Four processes of intra prediction, transformation, quantization and entropy coding, reality below the present invention Example is applied to be illustrated this Four processes respectively.
Intra prediction refers to according to reconstruction macro block encoded in the video image currently encoded, obtains current macro Predicted macroblock process.The intra prediction mode of macro block can be roughly divided into three classes at present: using on the upside of current macro Reference macroblock of the macro block as the macro block is rebuild, it is macro as the reference of the macro block using the reconstruction macro block being located on the left of current macro Block, and the reference macroblock using the reconstruction macro block positioned at current macro left side and upside as the macro block.Illustratively, Fig. 1 is A kind of schematic diagram of intra prediction provided in an embodiment of the present invention.As shown in Figure 1, z indicates the current macro just encoded, x and y table Show coded reconstruction macro block, by the way that x and y is synthesized under a variety of intra prediction modes, available multiple synthesis macro blocks. The most similar synthesis macro block of the pixel value of pixel value and z is the predicted macroblock of z in multiple synthesis macro block, and predicted macroblock institute is right The intra prediction mode answered is the optimal intra prediction mode of z.
Further, after determining the optimal intra prediction mode of current macro, macro block will can be rebuild by optimal frames Prediction mode synthesizes to obtain predicted macroblock, and predicted macroblock and current macro are subtracted each other acquisition residual error.Therefore, intra prediction is defeated Enter the coding that is positive current macro and encoded reconstruction macro block, export as optimum prediction module and residual error.Illustratively, Fig. 2 It is a kind of block schematic illustration of intra prediction provided in an embodiment of the present invention.
Transformation refers to a form of process for being converted to residual error and more conducively encoding.Specifically, residual error is believed from time domain It number is converted into frequency-region signal, removing the correlation in picture signal simultaneously reduces code rate.Optionally, mapping mode can be K-L change Change, Fourier transformation, cosine transform or wavelet transformation, the embodiment of the present invention to mapping mode without limitation.
Quantization, which refers to the process of, carries out quantification treatment to the residual error after conversion process.In video coding process, amount Change parameter usually to be determined by rate control module, then quantization step is different for code rate difference.Quantization step is smaller, and quantified precision is got over It is high.The embodiment of the present invention to code rate and quantization step without limitation.
Entropy coding refers to the coding for not losing any information in cataloged procedure by Entropy principle.Comentropy is the average letter of information source Breath amount (probabilistic measurement).Optionally, entropy coding can be Shannon (Shannon) coding, Huffman (Huffman) coding With arithmetic coding (arithmetic coding).The input of entropy coding is each syntactic element, and the output of entropy coding is binary system Code stream.For intraframe coding, the input of entropy coding includes the intra prediction mode of each macro block in video image, each macro block Residual error after the quantization of mapping mode, the quantization parameter of each macro block and each macro block, the output of entropy coding are video image pair The code stream answered.
In the h .264 standard, macro block refers to that size is the block of pixels of 16*16.In video coding process, macro block can be drawn It is divided into sub-macroblock, and sub-macroblock is encoded to improve the precision of Video coding.Wherein, it is 8*8 that sub-macroblock, which can be size, Block of pixels, be also possible to size be 4*4 block of pixels, can also be the block of pixels of other sizes, can be according to video image The parameters such as true resolution determine sub-macroblock division mode, the embodiment of the present invention to the size of sub-macroblock without limitation.
Method for video coding provided in an embodiment of the present invention can be applied to processing system for video, the processing system for video packet Include coding side and at least one decoding end.Wherein, the coding side and decoding end can be located in terminal, and terminal can be intelligence Mobile phone, computer, multimedia player, electronic reader or wearable device etc..Coding side and decoding end can pass through terminal Operating system realize its function, or its function is realized by client.
Illustratively, when main broadcaster is in net cast, coding side is located at main broadcaster's terminal that net cast is carried out for main broadcaster, should Main broadcaster's terminal passes through the corresponding code stream of video that Video coding generates certain clarity.Main broadcaster's terminal is broadcast live for watching Vlewer terminals on decoder (decoder is located in operating system or client) function of decoding end may be implemented, should Decoding end by that can play the video of certain clarity to code stream decoding on the terminal.
With the abundantization of Video Applications scene, it may appear that same terminal needed simultaneously to encode multi-path video stream Situation.For example, when needing double screen to be broadcast live or main broadcaster's terminal connects wheat mixed flow, main broadcaster's terminal is needed while being compiled in net cast Code two-path video stream.Wherein, double screen live streaming refers to that terminal plays video flowing (can be described as transverse screen stream) all the way under transverse screen, under vertical screen It plays another way video flowing (can be described as vertical screen stream), the picture of usual vertical screen stream is one intercepted from the picture of transverse screen stream Point.Main broadcaster's terminal connects wheat mixed flow and refers in main broadcaster's terminal while the video flowing of two main broadcaster's terminals of the company of broadcasting wheat.
Illustratively, Fig. 3 is the schematic diagram of double screen live streaming provided in an embodiment of the present invention.As shown in figure 3, for same video Image, the video image include picture A and the picture B positioned at the two sides picture A.When terminal is in transverse screen, display circle of terminal Picture A and picture B are shown on face;When terminal is in vertical screen, picture A is shown on the display interface of terminal.Therefore it is shown under vertical screen The picture visual shown is the picture intercepted from the picture shown under transverse screen.In order to realize that double screen is broadcast live, main broadcaster's terminal is needed The video flowing under transverse screen and the video flowing under vertical screen are encoded simultaneously.
Illustratively, Fig. 4 is the interface schematic diagram of even wheat mixed flow provided in an embodiment of the present invention.As shown in figure 4, main broadcaster's terminal Upper display mixed flow picture, the mixed flow picture include picture C and screen D.Picture C is that picture is broadcast live in the corresponding main broadcaster of main broadcaster's terminal Face, screen D are that picture is broadcast live in the corresponding main broadcaster of other side main broadcaster's terminal.The mixed flow picture shown in main broadcaster's terminal is by itself main broadcaster Live streaming picture and other side main broadcaster are broadcast live picture splicing and obtain.Therefore main broadcaster's terminal needs to splice for picture C and screen D Video flowing (i.e. mixed flow video flowing), the road video flowing are used to play in main broadcaster's terminal picture coding all the way;Meanwhile main broadcaster's terminal It also needs for picture C code another way video flowing, the road video flowing is for being sent to other side main broadcaster's terminal, so that other side main broadcaster Terminal can show mixed flow picture.
Using method for video coding in the related technology, when needing double screen to be broadcast live or main broadcaster's terminal connects wheat mixed flow, main broadcaster Terminal needs to encode two-path video stream respectively, that is, is both needed to execute intraframe or interframe prediction, change when encoding every road video flowing It changes, quantify and entropy coding process, computing cost is larger, and encoder complexity is higher.
The embodiment of the invention provides a kind of method for video coding, when there are overlay regions for the video image in two-path video stream When domain, coding side can be multiplexed the coded data of overlapping region, to reduce the computing cost of coding, reduce encoder complexity.
Fig. 5 is a kind of flow chart of method for video coding provided in an embodiment of the present invention.This method can be applied to video Coding side in processing system, as shown in figure 5, this method comprises:
Step 101, the coded data for obtaining the first video image, the coded data of the first video image include the first video The intra prediction mode of each macro block in the first area of image.
Step 102, the coded data based on the first video image, encode the second video image.
Wherein, the first video image is the key frame in the first video flowing, and the second video image is in the second video flowing Key frame, the video image in the first video flowing have Chong Die region, first area with the video image in the second video flowing For region Chong Die with the second video image in the first video image.
In conclusion method for video coding provided in an embodiment of the present invention, when existing in the first video image and the second view When the region of frequency image overlapping, coding side can be compiled the second video image based on the coded data of the first video image Code.Since coded data includes the intra prediction mode of each macro block in the first area of the first video image, the first area For region Chong Die with the second video image in the first video image, thus in encoding the second video image with the first area When the region of overlapping, without re-starting Intra prediction mode selection, it need to only be multiplexed in the first area of the first video image Coded data reduces the encoder complexity to the key frame in video flowing, thereby reduces multiple to the coding of video flowing Miscellaneous degree reduces the computing cost in video coding process.
Fig. 6 is the flow chart of another method for video coding provided in an embodiment of the present invention.This method can be applied to regard Coding side in frequency processing system, as shown in fig. 6, this method comprises:
Step 201 obtains the first video image and the second video image.
Wherein, the first video image is the key frame in the first video flowing, and the second video image is in the second video flowing Key frame, the video image in the first video flowing have Chong Die region with the video image in the second video flowing.First video There are overlapping regions for image and the second video image.For ease of description, in the embodiment of the present invention by the first video image with The region of second video image overlapping is known as first area, and region Chong Die with the first video image in the second video image is claimed For second area.
Optionally, the first video image and the second video image meet a kind of following relationship: the second video image is from first Interception obtains in video image;First video image is spliced to obtain by the second video image and third video image.It that is to say, the Two video images can be a part of content in the first video image.
Illustratively, the first video image can be the image in transverse screen stream, and the second video image can be in vertical screen stream Image, referring to Fig. 3, the first video image may include picture A and picture B, and the second video image may include picture B, and second Video image can be intercepted from the first video image and be obtained.Again illustratively, the first video image can be in mixed flow video flowing Image, the second video image can be the image in main broadcaster's live video stream, and third video image can be another Image in main broadcaster's live video stream, referring to fig. 4, the second video image may include picture C, and third video image may include Screen D, the first video image can be spliced to obtain by picture C and screen D.
It should be noted that key frame is alternatively referred to as basic frame or intracoded frame (I frame).In dynamic image expert group In the coding standard that (Moving Picture Experts Grou, MPEG) is proposed, video frame is divided into I frame, B frame (two-way difference Other frame) and P frame (forward-predictive-coded frames) these three.I frame can be used as reference frame when generating other frames, and I frame itself is no Only use the data of I frame that can rebuild complete image when needing to refer to other frames to generate, and decoding.
Whether step 202, the first area for detecting the first video image meet specified requirements.
Wherein, specified requirements include it is following at least one: the left column macro block of first area be the first video image most Left column macro block and the most uplink macro block of first area are the most uplink macro block of the first video image.It that is to say, specified requirements packet Include: the left column macro block of first area is the left column macro block of the first video image;Alternatively, the most uplink macro block of first area is The most uplink macro block of first video image;Alternatively, the left column macro block of first area is the left column macro block of the first video image, And the most uplink macro block of first area is the most uplink macro block of the first video image.
Step 203, when the first area of the first video image meets specified requirements, according to first area in the first video Position in image determines the intra prediction mode that macro block is specified in first area.
In an alternate embodiment of the present invention where, when the left column macro block of first area be not the first video image most Left column macro block, and when the most uplink macro block of first area is the most uplink macro block of the first video image, it will be located on specified macro block Side rebuilds reference macroblock of the macro block as specified macro block, which is that the top is removed in the left column macro block of first area Any macro block other than macro block.
Macro block is rebuild as the reference macroblock for specifying macro block it should be noted that will be located on the upside of specified macro block, it can be with When avoiding encoding the macro block in first area, the macro block being located on the left of first area is relied on, is realized to first area Absolute coding.
Illustratively, Fig. 7 is a kind of schematic diagram of first video image provided in an embodiment of the present invention.As shown in fig. 7, first The left column macro block L1 of region M is not the left column macro block of the first video image, and the most uplink macro block H1 of first area M is the The most uplink macro block of one video image, then macro block in the left column macro block L1 of first area M in addition to the macro block q0 of the top Reference macroblock is the macro block on the upside of the macro block.For example, the reference macroblock of macro block q1 is macro block q0, there is no references by macro block q0 Macro block.
In another alternative embodiment of the invention, when first area left column macro block be the first video image most Left column macro block, and when the most uplink macro block of first area is not the most uplink macro block of the first video image, specified macro block will be located at Left side rebuilds reference macroblock of the macro block as specified macro block, which is in the most uplink macro block of first area except most left Any macro block other than the macro block of side.
Macro block is rebuild as the reference macroblock for specifying macro block it should be noted that will be located on the left of specified macro block, it can be with When avoiding encoding the macro block in first area, the macro block being located on the upside of first area is relied on, is realized to first area Absolute coding.
Illustratively, Fig. 8 is the schematic diagram of another first video image provided in an embodiment of the present invention.As shown in figure 8, the The left column macro block L1 of one region M is the left column macro block of the first video image, and the most uplink macro block H1 of first area M is not The most uplink macro block of first video image, the then macro block in the most uplink macro block H1 of first area M in addition to the macro block p0 of the leftmost side Reference macroblock be macro block on the left of the macro block.For example, the reference macroblock of macro block p1 is macro block p0, there is no ginsengs by macro block p0 Examine macro block.
In another alternative embodiment of the invention, when first area left column macro block be the first video image most Left column macro block, and when the most uplink macro block of first area is the most uplink macro block of the first video image, it is each in the first video image The intra prediction mode of a macro block can determine according to the intra prediction mode that provides in the related technology, and the embodiment of the present invention is herein not It repeats.
Step 204 encodes the first video image.
Optionally, the first video image is encoded, comprising: each macro block in the first video image is executed respectively Sub-macroblock division, intra prediction, transformation, quantization and entropy coding process.
It should be noted that being determined when the first area of the first video image meets specified requirements according in step 203 Specified macro block intra prediction mode, specified macro block is encoded.
Coding side can store the coded data of the first video image after encoding to the first video image.The volume Code data include the intra prediction mode of each macro block in first area.Optionally, which can also include the firstth area The sub-macroblock division mode of each macro block in domain, the mapping mode of each macro block in first area, each macro block in first area Quantization parameter or first area in each macro block quantization after at least one of residual error.
Step 205, when the first area of the first video image meets specified requirements, the coding based on the first video image Data encode the second video image.
Optionally, coding side is after completing to the coding of the first video image, when the firstth area for determining the first video image When domain meets specified requirements, the coded data of available first video image.Step 205 the realization process includes: based on the The mapping mode, every of the sub-macroblock division mode of each macro block in one region, the intra prediction mode of each macro block, each macro block Residual error carries out entropy coding after the quantization of the quantization parameter of a macro block and each macro block, obtains the second area pair of the second video image The code stream answered.Illustratively, when the second video image is a part of image in the first video image, above-mentioned second area is corresponding Code stream be the corresponding code stream of the second video image.
Based on step 203 it is found that when the first area of the first video image meets specified requirements, first area is independent Coding, therefore the second area of the second video image is encoded using the coded data of first area, it is ensured that it is right The coding accuracy of second area.
It should be noted that when being encoded using second area of the above-mentioned method for video coding to the second video image, Coding side is not necessarily to execute sub-macroblock division, intra prediction, transform and quantization process to each macro block in second area, it is only necessary to base Coded data in first area executes entropy coding, and the coding to macro block in second area can be completed, and greatly reduces to the The encoder complexity of two video images thereby reduces the encoder complexity to the second video flowing.
In conclusion method for video coding provided in an embodiment of the present invention, when existing in the first video image and the second view When the region of frequency image overlapping, coding side can be compiled the second video image based on the coded data of the first video image Code, that is to say, when encoding region Chong Die with the first area in the second video image, can be multiplexed the first video image Coded data in first area reduces the encoder complexity to the key frame in video flowing, thereby reduces to video flowing Encoder complexity, reduce the computing cost in video coding process.
Fig. 9 is the flow chart of another method for video coding provided in an embodiment of the present invention.This method can be applied to regard Coding side in frequency processing system, as shown in figure 9, this method comprises:
Step 301 obtains the first video image and the second video image.
The above-mentioned explanation to step 201 can refer to the explanation of step 301, this will not be repeated here for the embodiment of the present invention.
Step 302 encodes the first video image.
Optionally, the first video image is encoded, comprising: each macro block in the first video image is executed respectively Sub-macroblock division, intra prediction, transformation, quantization and entropy coding process.
Coding side can store the coded data of the first video image after encoding to the first video image.The volume Code data include the intra prediction mode of each macro block in first area.Optionally, which can also include the firstth area The sub-macroblock division mode of each macro block in domain.
Step 303, the coded data based on the first video image, encode the second video image.
Optionally, when the left column macro block that the left column macro block of first area is not the first video image, and/or, first It is right based on the coded data of the first video image when the most uplink macro block in region is not the most uplink macro block of the first video image It is located at the macro block other than specified region in the second area of second video image to be encoded, includes the secondth area in the specified region The left column macro block in domain and most uplink macro block, the second area are area Chong Die with the first video image in the second video image Domain.It that is to say, when first area is not the upper left corner area of the first video image, except left column macro block and most in second area Macro block other than uplink macro block can be encoded using the coded data of first area.Left column macro block in second area and Most uplink macro block is performed both by complete coding process, i.e. sub-macroblock division, intra prediction, transformation, quantization and entropy coding.
When the left column macro block that the left column macro block of first area is the first video image, and the most uplink of first area is macro When block is the most uplink macro block of the first video image, coding side can be using the coded data of first area in second area All macro blocks are encoded.
Optionally, when the coded data of the first video includes the intra prediction mode of each macro block and in first area In one region when the sub-macroblock division mode of each macro block, based on the coded data of first video image, to described second It is located at the process that the macro block other than specified region is encoded in the second area of video image, may include:
S3031, target macroblock in second area is obtained, which is macro block outside specified region, and mesh The pixel value for marking the reference macroblock of macro block is less than specified threshold with the difference of the pixel value of macro block corresponding in first area.
Optionally, for being located at each macro block other than specified region in second area, coding side can detecte the macro block Pixel value whether be less than specified threshold with the difference of the pixel value of macro block corresponding in first area;When the pixel value of the macro block When the difference of the pixel value of macro block corresponding with first area is less than specified threshold, which can be determined as target macro Block that is to say that the pixel in target macroblock and the pixel difference in macro block corresponding in first area are smaller;When the picture of the macro block When element value is not less than specified threshold with the difference of the pixel value of macro block corresponding in first area, then son is re-executed to the macro block Macro block division, intra prediction, transformation, quantization and entropy coding process.
It is pre- in the frame of S3032, the sub-macroblock division mode based on macro block corresponding in first area and corresponding macro block Survey mode carries out conversion process, quantification treatment and entropy coding to target macroblock.
It should be noted that when being encoded using second area of the above-mentioned method for video coding to the second video image, Coding side is not necessarily to execute the target macroblock in second area sub-macroblock division and intra-prediction process, it is only necessary to be based on first area Coded data carry out conversion process, quantification treatment and entropy coding, the coding to target macroblock in second area can be completed, The encoder complexity to the second video image is reduced, the encoder complexity to the second video flowing is thereby reduced.
In conclusion method for video coding provided in an embodiment of the present invention, when existing in the first video image and the second view When the region of frequency image overlapping, coding side can be compiled the second video image based on the coded data of the first video image Code, that is to say, when encoding region Chong Die with the first area in the second video image, can be multiplexed the first video image Coded data in first area reduces the encoder complexity to the key frame in video flowing, thereby reduces to video flowing Encoder complexity, reduce the computing cost in video coding process.
First video flowing and the second video flowing are encoded using method for video coding provided in an embodiment of the present invention During, coding side can switch to the coding to the second video image, and will after the coding for completing the first video image The coded data of first video image is copied in the coded data of the second video image, to realize the first video image and second The multiplexing of the coded data of video image.
It should be noted that method for video coding as shown in FIG. 6 is compared to method for video coding as shown in Figure 9, The coded data of multiplexing is more, and encoder complexity is lower;Method for video coding as shown in Figure 9 is compared to view as shown in FIG. 6 The coded data of frequency coding method, multiplexing is less, and encoding flexibility is higher.Optionally, method for video coding as shown in FIG. 6 It can be used in combination with method for video coding as shown in Figure 9.For example, in step 202, when determining the of the first video image When one region is unsatisfactory for specified requirements, step 302 and step 303 can be executed.
Method for video coding provided in an embodiment of the present invention can be adapted for including the multichannel with the image of overlapping region Video flowing, the embodiment of the present invention to the application scenarios of method for video coding without limitation.
It should be noted that the sequencing of method for video coding step provided in an embodiment of the present invention can carry out suitably Adjustment, step according to circumstances can also accordingly be increased and decreased, anyone skilled in the art the invention discloses Technical scope in, the method that can readily occur in variation should be covered by the protection scope of the present invention, therefore no longer superfluous It states.
Figure 10 is a kind of structural schematic diagram of video coding apparatus provided in an embodiment of the present invention.As shown in Figure 10, device 40 include:
Module 401 is obtained, for obtaining the coded data of the first video image, the coded data of the first video image includes The intra prediction mode of each macro block in the first area of first video image.
Coding module 402 encodes the second video image for the coded data based on the first video image.
Wherein, the first video image is the key frame in the first video flowing, and the second video image is in the second video flowing Key frame, the video image in the first video flowing have Chong Die region, first area with the video image in the second video flowing For region Chong Die with the second video image in the first video image.
In conclusion video coding apparatus provided in an embodiment of the present invention, when existing in the first video image and the second view When the region of frequency image overlapping, coding side can coded data by coding module based on the first video image, regarded to second Frequency image is encoded.Since coded data includes the intra prediction mould of each macro block in the first area of the first video image Formula, the first area are region Chong Die with the second video image in the first video image, therefore are encoding the second video image In Chong Die with the first area region when, without re-starting Intra prediction mode selection, need to only be multiplexed the first video image First area in coded data, reduce the encoder complexity to the key frame in video flowing, thereby reduce pair The encoder complexity of video flowing reduces the computing cost in video coding process.
Optionally, module is obtained, is used for:
When first area meets specified requirements, the coded data of the first video image is obtained, wherein specified requirements includes Below at least one: the left column macro block of first area be the first video image left column macro block and first area most Uplink macro block is the most uplink macro block of the first video image.
Optionally, as shown in figure 11, device 40 further include:
Detection module 403, for after obtaining the first video image, whether detection first area to meet specified requirements.
Determining module 404, for when first area meets specified requirements, according to first area in the first video image Position, determine in first area specify macro block intra prediction mode.
Optionally it is determined that module, is used for:
When the left column macro block of first area is not the left column macro block of the first video image, and the most uplink of first area When macro block is the most uplink macro block of the first video image, it will be located on the upside of specified macro block and rebuild macro block as the ginseng of specified macro block Macro block is examined, any macro block in the left column macro block that macro block is first area in addition to the macro block of the top is specified.
Optionally it is determined that being used for, it is used for:
When the left column macro block that the left column macro block of first area is the first video image, and the most uplink of first area is macro When block is not the most uplink macro block of the first video image, it will be located on the left of specified macro block and rebuild macro block as the ginseng of specified macro block Macro block is examined, any macro block in the most uplink macro block that macro block is first area in addition to the macro block of the leftmost side is specified.
Optionally, coded data further include the sub-macroblock division mode of each macro block, it is the mapping mode of each macro block, each At least one of residual error after the quantization of the quantization parameter of macro block or each macro block.
Correspondingly, coding module is used for:
Intra prediction mode, the Mei Gehong of sub-macroblock division mode, each macro block based on macro block each in first area Residual error carries out entropy coding after the quantization of the mapping mode of block, the quantization parameter of each macro block and each macro block, obtains the second video The corresponding code stream of the second area of image, second area are region Chong Die with the first video image in the second video image.
Optionally, coding module is used for:
When the left column macro block of first area is not the left column macro block of the first video image, and/or, first area is most When uplink macro block is not the most uplink macro block of the first video image, based on the coded data of the first video image, to the second video It is located at the macro block other than specified region in the second area of image to be encoded, specifies the left column in region including second area Macro block and most uplink macro block, second area are region Chong Die with the first video image in the second video image.
Optionally, coded data further includes the sub-macroblock division mode of each macro block, and coding module is also used to:
Obtaining the target macroblock in second area, target macroblock is macro block outside specified region, and target macroblock The pixel value of reference macroblock is less than specified threshold with the difference of the pixel value of macro block corresponding in first area;
The intra prediction mode of sub-macroblock division mode and corresponding macro block based on macro block corresponding in first area, Conversion process, quantification treatment and entropy coding are carried out to target macroblock.
Optionally, the first video image and the second video image meet a kind of following relationship:
Second video image is intercepted from the first video image and is obtained;
First video image is spliced to obtain by the second video image and third video image.
In conclusion video coding apparatus provided in an embodiment of the present invention, when existing in the first video image and the second view When the region of frequency image overlapping, coding side can coded data by coding module based on the first video image, regarded to second Frequency image is encoded, and that is to say, in encoding the second video image when Chong Die with first area region, can be multiplexed the Coded data in the first area of one video image reduces the encoder complexity to the key frame in video flowing, and then drops The low encoder complexity to video flowing, reduces the computing cost in video coding process.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
The embodiment of the invention provides a kind of video coding apparatus, for the coding side in processing system for video, comprising: place Device and memory are managed,
The memory, for storing computer program;
The processor is realized for executing the computer program stored on the memory as shown in Figure 6 or as schemed Method for video coding shown in 9.
Figure 12 is a kind of block diagram of video coding apparatus provided in an embodiment of the present invention, which can be end End.Terminal 500 can be portable mobile termianl, such as: smart phone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) is broadcast Put device, laptop or desktop computer.Terminal 500 be also possible to referred to as user equipment, portable terminal, laptop terminal, Other titles such as terminal console.
In general, terminal 500 includes: processor 501 and memory 502.
Processor 501 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place Reason device 501 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 501 also may include primary processor and coprocessor, master Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.? In some embodiments, processor 501 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 501 can also be wrapped AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning Calculating operation.
Memory 502 may include one or more computer readable storage mediums, which can To be non-transient.Memory 502 may also include high-speed random access memory and nonvolatile memory, such as one Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 502 can Storage medium is read for storing at least one instruction, at least one instruction performed by processor 501 for realizing this Shen Please in embodiment of the method provide data query method.
In some embodiments, terminal 500 is also optional includes: peripheral device interface 503 and at least one peripheral equipment. It can be connected by bus or signal wire between processor 501, memory 502 and peripheral device interface 503.Each peripheral equipment It can be connected by bus, signal wire or circuit board with peripheral device interface 503.Specifically, peripheral equipment includes: radio circuit 504, at least one of display screen 505, camera 506, voicefrequency circuit 507, positioning component 508 and power supply 509.
Peripheral device interface 503 can be used for I/O (Input/Output, input/output) is relevant outside at least one Peripheral equipment is connected to processor 501 and memory 502.In some embodiments, processor 501, memory 502 and peripheral equipment Interface 503 is integrated on same chip or circuit board;In some other embodiments, processor 501, memory 502 and outer Any one or two in peripheral equipment interface 503 can realize on individual chip or circuit board, the present embodiment to this not It is limited.
Radio circuit 504 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates Frequency circuit 504 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 504 turns electric signal It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 504 wraps It includes: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip Group, user identity module card etc..Radio circuit 504 can be carried out by least one wireless communication protocol with other terminals Communication.The wireless communication protocol includes but is not limited to: WWW, Metropolitan Area Network (MAN), Intranet, each third generation mobile communication network (2G, 3G, 4G and 5G), WLAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, it penetrates Frequency circuit 504 can also include NFC (Near Field Communication, wireless near field communication) related circuit, this Application is not limited this.
Display screen 505 is for showing UI (User Interface, user interface).The UI may include figure, text, figure Mark, video and its their any combination.When display screen 505 is touch display screen, display screen 505 also there is acquisition to show The ability of the touch signal on the surface or surface of screen 505.The touch signal can be used as control signal and be input to processor 501 are handled.At this point, display screen 505 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or Soft keyboard.In some embodiments, display screen 505 can be one, and the front panel of terminal 500 is arranged;In other embodiments In, display screen 505 can be at least two, be separately positioned on the different surfaces of terminal 500 or in foldover design;In still other reality It applies in example, display screen 505 can be flexible display screen, be arranged on the curved surface of terminal 500 or on fold plane.Even, it shows Display screen 505 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 505 can be OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) display screen.
CCD camera assembly 506 is for acquiring image or video.Optionally, CCD camera assembly 506 include front camera and Rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.One In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are clapped Camera shooting function.In some embodiments, CCD camera assembly 506 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp, It is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not With the light compensation under colour temperature.
Voicefrequency circuit 507 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and will Sound wave, which is converted to electric signal and is input to processor 501, to be handled, or is input to radio circuit 504 to realize voice communication. For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of terminal 500 to be multiple.Mike Wind can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 501 or radio circuit will to be come from 504 electric signal is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramic loudspeaker.When When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 507 can also include Earphone jack.
Positioning component 508 is used for the current geographic position of positioning terminal 500, to realize navigation or LBS (Location Based Service, location based service).Positioning component 508 can be the GPS (Global based on the U.S. Positioning System, global positioning system), China dipper system or Russia Galileo system positioning group Part.
Power supply 509 is used to be powered for the various components in terminal 500.Power supply 509 can be alternating current, direct current, Disposable battery or rechargeable battery.When power supply 509 includes rechargeable battery, which can be wired charging electricity Pond or wireless charging battery.Wired charging battery is the battery to be charged by Wireline, and wireless charging battery is by wireless The battery of coil charges.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 500 further includes having one or more sensors 510.The one or more sensors 510 include but is not limited to: acceleration transducer 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514, Optical sensor 515 and proximity sensor 516.
The acceleration that acceleration transducer 511 can detecte in three reference axis of the coordinate system established with terminal 500 is big It is small.For example, acceleration transducer 511 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 501 can With the acceleration of gravity signal acquired according to acceleration transducer 511, touch display screen 505 is controlled with transverse views or longitudinal view Figure carries out the display of user interface.Acceleration transducer 511 can be also used for the acquisition of game or the exercise data of user.
Gyro sensor 512 can detecte body direction and the rotational angle of terminal 500, and gyro sensor 512 can To cooperate with acquisition user to act the 3D of terminal 500 with acceleration transducer 511.Processor 501 is according to gyro sensor 512 Following function may be implemented in the data of acquisition: when action induction (for example changing UI according to the tilt operation of user), shooting Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 505 in terminal 500 can be set in pressure sensor 513.Work as pressure When the side frame of terminal 500 is arranged in sensor 513, user can detecte to the gripping signal of terminal 500, by processor 501 Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 513 acquires.When the setting of pressure sensor 513 exists When the lower layer of touch display screen 505, the pressure operation of touch display screen 505 is realized to UI circle according to user by processor 501 Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu At least one of control.
Fingerprint sensor 514 is used to acquire the fingerprint of user, collected according to fingerprint sensor 514 by processor 501 The identity of fingerprint recognition user, alternatively, by fingerprint sensor 514 according to the identity of collected fingerprint recognition user.It is identifying When the identity of user is trusted identity out, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 501 Include solution lock screen, check encryption information, downloading software, payment and change setting etc..Terminal can be set in fingerprint sensor 514 500 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 500, fingerprint sensor 514 can be with It is integrated with physical button or manufacturer Logo.
Optical sensor 515 is for acquiring ambient light intensity.In one embodiment, processor 501 can be according to optics The ambient light intensity that sensor 515 acquires controls the display brightness of touch display screen 505.Specifically, when ambient light intensity is higher When, the display brightness of touch display screen 505 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 505 is bright Degree.In another embodiment, the ambient light intensity that processor 501 can also be acquired according to optical sensor 515, dynamic adjust The acquisition parameters of CCD camera assembly 506.
Proximity sensor 516, also referred to as range sensor are generally arranged at the front panel of terminal 500.Proximity sensor 516 For acquiring the distance between the front of user Yu terminal 500.In one embodiment, when proximity sensor 516 detects use When family and the distance between the front of terminal 500 gradually become smaller, touch display screen 505 is controlled from bright screen state by processor 501 It is switched to breath screen state;When proximity sensor 516 detects user and the distance between the front of terminal 500 becomes larger, Touch display screen 505 is controlled by processor 501 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 500 of structure shown in Figure 12, can wrap It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
The embodiment of the invention provides a kind of storage mediums, comprising: when the program in the storage medium is held by processor When row, it can be realized such as Fig. 6 or method for video coding shown in Fig. 9.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
In embodiments of the present invention, term " first " and " second " are used for description purposes only, and should not be understood as instruction or Imply relative importance.Term " multiple " refers to two or more, unless otherwise restricted clearly.
Term "and/or" in the embodiment of the present invention, a kind of only incidence relation for describing affiliated partner, expression can be with There are three kinds of relationships, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three feelings of individualism B Condition.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
The foregoing is merely alternative embodiments of the invention, are not intended to limit the invention, it is all in design of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (22)

1. a kind of method for video coding, which is characterized in that the described method includes:
The coded data of the first video image is obtained, the coded data of first video image includes first video image First area in each macro block intra prediction mode;
Based on the coded data of first video image, the second video image is encoded;
Wherein, first video image is the key frame in the first video flowing, and second video image is the second video flowing In key frame, the video image in first video flowing has Chong Die area with the video image in second video flowing Domain, the first area are region Chong Die with second video image in first video image.
2. the method according to claim 1, wherein the coded data for obtaining the first video image, comprising:
When the first area meets specified requirements, the coded data of first video image is obtained, wherein described specified Condition include it is following at least one:
The left column macro block of the first area be first video image left column macro block and the first area Most uplink macro block is the most uplink macro block of first video image.
3. according to the method described in claim 2, it is characterized in that, it is described obtain the first video image coded data it Before, the method also includes:
After obtaining first video image, detect whether the first area meets the specified requirements;
When the first area meets the specified requirements, according to position of the first area in first video image It sets, determines the intra prediction mode for specifying macro block in the first area.
4. according to the method described in claim 3, it is characterized in that, it is described according to the first area in the first video figure Position as in determines the intra prediction mode that macro block is specified in the first area, comprising:
When the left column macro block of the first area is not the left column macro block of first video image, and the first area Most uplink macro block be first video image most uplink macro block when, by be located at the specified macro block on the upside of reconstruction macro block As the reference macroblock of the specified macro block, the specified macro block is in the left column macro block of the first area except the top is macro Any macro block other than block.
5. according to the method described in claim 3, it is characterized in that, it is described according to the first area in the first video figure Position as in determines the intra prediction mode that macro block is specified in the first area, comprising:
When the left column macro block that the left column macro block of the first area is first video image, and the first area When most uplink macro block is not the most uplink macro block of first video image, the reconstruction macro block on the left of the specified macro block will be located at As the reference macroblock of the specified macro block, the specified macro block is in the most uplink macro block of the first area except the leftmost side is macro Any macro block other than block.
6. according to any method of claim 2 to 5, which is characterized in that the coded data further includes described each macro The sub-macroblock division mode of block, the mapping mode of each macro block, each macro block quantization parameter or described each macro At least one of residual error after the quantization of block.
7. according to the method described in claim 6, it is characterized in that, the coded data based on first video image, Second video image is encoded, comprising:
Based on the sub-macroblock division mode of each macro block, the intra prediction mode of each macro block, institute in the first area Residual error carries out entropy volume after stating the quantization of the mapping mode of each macro block, the quantization parameter of each macro block and each macro block Code, obtains the corresponding code stream of second area of second video image, and the second area is in second video image The region Chong Die with the first video image.
8. the method according to claim 1, wherein the coded data based on first video image, Second video image is encoded, comprising:
When the left column macro block of the first area is not the left column macro block of first video image, and/or, described first When the most uplink macro block in region is not the most uplink macro block of first video image, the coding based on first video image Data encode the macro block being located at other than specified region in the second area of second video image, the specified area It include the left column macro block and most uplink macro block of the second area in domain, the second area is in second video image The region Chong Die with the first video image.
9. according to the method described in claim 8, it is characterized in that, the coded data further includes the sub macro of each macro block Block division mode, the coded data based on first video image, in the second area of second video image Macro block other than specified region is encoded, comprising:
Obtain the target macroblock in the second area, the target macroblock is the macro block outside the specified region, and institute The pixel value and the difference of the pixel value of corresponding macro block in the first area for stating the reference macroblock of target macroblock, which are less than, specifies Threshold value;
The intra prediction of sub-macroblock division mode and the corresponding macro block based on corresponding macro block in the first area Mode carries out conversion process, quantification treatment and entropy coding to the target macroblock.
10. the method according to claim 1, wherein first video image and second video image Meet a kind of following relationship:
Second video image is intercepted from first video image and is obtained;
First video image is spliced to obtain by second video image and third video image.
11. a kind of video coding apparatus, which is characterized in that described device includes:
Module is obtained, for obtaining the coded data of the first video image, the coded data of first video image includes institute State the intra prediction mode of each macro block in the first area of the first video image;
Coding module encodes the second video image for the coded data based on first video image;
Wherein, first video image is the key frame in the first video flowing, and second video image is the second video flowing In key frame, the video image in first video flowing has Chong Die area with the video image in second video flowing Domain, the first area are region Chong Die with second video image in first video image.
12. device according to claim 11, which is characterized in that the acquisition module is used for:
When the first area meets specified requirements, the coded data of first video image is obtained, wherein described specified Condition include it is following at least one:
The left column macro block of the first area be first video image left column macro block and the first area Most uplink macro block is the most uplink macro block of first video image.
13. device according to claim 12, which is characterized in that described device further include:
Detection module, for after obtaining first video image, detecting whether the first area meets described specify Condition;
Determining module, for when the first area meets the specified requirements, according to the first area described first Position in video image determines the intra prediction mode that macro block is specified in the first area.
14. device according to claim 13, which is characterized in that the determining module is used for:
When the left column macro block of the first area is not the left column macro block of first video image, and the first area Most uplink macro block be first video image most uplink macro block when, by be located at the specified macro block on the upside of reconstruction macro block As the reference macroblock of the specified macro block, the specified macro block is in the left column macro block of the first area except the top is macro Any macro block other than block.
15. device according to claim 13, which is characterized in that the determining module is used for:
When the left column macro block that the left column macro block of the first area is first video image, and the first area When most uplink macro block is not the most uplink macro block of first video image, the reconstruction macro block on the left of the specified macro block will be located at As the reference macroblock of the specified macro block, the specified macro block is in the most uplink macro block of the first area except the leftmost side is macro Any macro block other than block.
16. 2 to 15 any device according to claim 1, which is characterized in that the coded data further includes described each The sub-macroblock division mode of macro block, the mapping mode of each macro block, each macro block quantization parameter or described each At least one of residual error after the quantization of macro block.
17. device according to claim 16, which is characterized in that the coding module is used for:
Based on the sub-macroblock division mode of each macro block, the intra prediction mode of each macro block, institute in the first area Residual error carries out entropy volume after stating the quantization of the mapping mode of each macro block, the quantization parameter of each macro block and each macro block Code, obtains the corresponding code stream of second area of second video image, and the second area is in second video image The region Chong Die with the first video image.
18. device according to claim 11, which is characterized in that the coding module is used for:
When the left column macro block of the first area is not the left column macro block of first video image, and/or, described first When the most uplink macro block in region is not the most uplink macro block of first video image, the coding based on first video image Data encode the macro block being located at other than specified region in the second area of second video image, the specified area It include the left column macro block and most uplink macro block of the second area in domain, the second area is in second video image The region Chong Die with the first video image.
19. device according to claim 18, which is characterized in that the coded data further includes the son of each macro block Macro block division mode, the coding module, is also used to:
Obtain the target macroblock in the second area, the target macroblock is the macro block outside the specified region, and institute The pixel value and the difference of the pixel value of corresponding macro block in the first area for stating the reference macroblock of target macroblock, which are less than, specifies Threshold value;
The intra prediction of sub-macroblock division mode and the corresponding macro block based on corresponding macro block in the first area Mode carries out conversion process, quantification treatment and entropy coding to the target macroblock.
20. device according to claim 11, which is characterized in that first video image and second video image Meet a kind of following relationship:
Second video image is intercepted from first video image and is obtained;
First video image is spliced to obtain by second video image and third video image.
21. a kind of video coding apparatus characterized by comprising processor and memory,
The memory, for storing computer program;
The processor is realized for executing the computer program stored on the memory as claims 1 to 10 is any The method for video coding.
22. a kind of storage medium characterized by comprising, can when the program in the storage medium is executed by processor Realize the method for video coding as described in claims 1 to 10 is any.
CN201910452802.9A 2019-05-28 2019-05-28 Video coding method and device and storage medium Active CN110049326B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910452802.9A CN110049326B (en) 2019-05-28 2019-05-28 Video coding method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910452802.9A CN110049326B (en) 2019-05-28 2019-05-28 Video coding method and device and storage medium

Publications (2)

Publication Number Publication Date
CN110049326A true CN110049326A (en) 2019-07-23
CN110049326B CN110049326B (en) 2022-06-28

Family

ID=67283960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910452802.9A Active CN110049326B (en) 2019-05-28 2019-05-28 Video coding method and device and storage medium

Country Status (1)

Country Link
CN (1) CN110049326B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111479162A (en) * 2020-04-07 2020-07-31 广州酷狗计算机科技有限公司 Live data transmission method and device and computer readable storage medium
CN113099222A (en) * 2021-04-16 2021-07-09 浙江天则通信技术有限公司 Video compression method and system
CN114286136A (en) * 2021-12-28 2022-04-05 咪咕文化科技有限公司 Video playing and encoding method, device, equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102238390A (en) * 2011-08-05 2011-11-09 中国科学院深圳先进技术研究院 Image-library-based video and image coding and decoding method and system
AU2013248237A1 (en) * 2013-10-25 2015-05-14 Canon Kabushiki Kaisha Image scaling process and apparatus
CN107872671A (en) * 2016-09-26 2018-04-03 华为技术有限公司 A kind of picture coding method and terminal
CN109660806A (en) * 2018-12-27 2019-04-19 上海众源网络有限公司 A kind of coding method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102238390A (en) * 2011-08-05 2011-11-09 中国科学院深圳先进技术研究院 Image-library-based video and image coding and decoding method and system
AU2013248237A1 (en) * 2013-10-25 2015-05-14 Canon Kabushiki Kaisha Image scaling process and apparatus
CN107872671A (en) * 2016-09-26 2018-04-03 华为技术有限公司 A kind of picture coding method and terminal
CN109660806A (en) * 2018-12-27 2019-04-19 上海众源网络有限公司 A kind of coding method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KAIJIN WEI等: "An Optimized Hardware Video Encoder for AVS with Level C+ Data Reuse Scheme for Motion Estimation", 《2012 IEEE INTERNATIONAL CONFERENCE ON MULTIMEDIA AND EXPO》 *
程栋彬等: "基于信息复用的多路x265视频编码系统设计", 《电视技术》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111479162A (en) * 2020-04-07 2020-07-31 广州酷狗计算机科技有限公司 Live data transmission method and device and computer readable storage medium
CN111479162B (en) * 2020-04-07 2022-05-13 成都酷狗创业孵化器管理有限公司 Live data transmission method and device and computer readable storage medium
CN113099222A (en) * 2021-04-16 2021-07-09 浙江天则通信技术有限公司 Video compression method and system
CN113099222B (en) * 2021-04-16 2024-02-02 浙江天则通信技术有限公司 Video compression method and system
CN114286136A (en) * 2021-12-28 2022-04-05 咪咕文化科技有限公司 Video playing and encoding method, device, equipment and computer readable storage medium
CN114286136B (en) * 2021-12-28 2024-05-31 咪咕文化科技有限公司 Video playing encoding method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN110049326B (en) 2022-06-28

Similar Documents

Publication Publication Date Title
CN110234008B (en) Encoding method, decoding method and device
US11202072B2 (en) Video encoding method, apparatus, and device, and storage medium
JP7318014B2 (en) Prediction mode decoding method, encoding method, decoding device, encoding device and storage medium
US11388403B2 (en) Video encoding method and apparatus, storage medium, and device
CN110049326A (en) Method for video coding and device, storage medium
CN110062246B (en) Method and device for processing video frame data
CN109168032B (en) Video data processing method, terminal, server and storage medium
CN109120933A (en) Dynamic adjusts method, apparatus, equipment and the storage medium of code rate
EP4395310A1 (en) Method and apparatus for selecting reference frame, device, and medium
CN108616776A (en) Live streaming analysis data capture method and device
CN110177275A (en) Method for video coding and device, storage medium
CN107888975B (en) Video playing method, device and storage medium
CN110572679A (en) method, device and equipment for coding intra-frame prediction and readable storage medium
CN109714628A (en) Method, apparatus, equipment, storage medium and the system of playing audio-video
CN113709479B (en) Decoding and encoding method based on adaptive intra-frame refreshing mechanism and related equipment
CN109040753B (en) Prediction mode selection method, device and storage medium
CN111770339B (en) Video encoding method, device, equipment and storage medium
CN110062226B (en) Video coding method, video decoding method, device, system and medium
CN113079372B (en) Method, device and equipment for coding inter-frame prediction and readable storage medium
CN114422782B (en) Video encoding method, video encoding device, storage medium and electronic equipment
CN113658283B (en) Image processing method, device, electronic equipment and storage medium
CN117676170A (en) Method, apparatus, device and storage medium for detecting blocking effect
CN116546203A (en) Video frame processing method and device, electronic equipment and readable storage medium
CN108965925A (en) Multimedia resource coding, media stream coding/decoding method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant