CN102651816B - Method and device for scanning transformation coefficient block - Google Patents

Method and device for scanning transformation coefficient block Download PDF

Info

Publication number
CN102651816B
CN102651816B CN201110076616.3A CN201110076616A CN102651816B CN 102651816 B CN102651816 B CN 102651816B CN 201110076616 A CN201110076616 A CN 201110076616A CN 102651816 B CN102651816 B CN 102651816B
Authority
CN
China
Prior art keywords
scanning sequency
block
scanning
texture
transformation coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110076616.3A
Other languages
Chinese (zh)
Other versions
CN102651816A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201110076616.3A priority Critical patent/CN102651816B/en
Priority to PCT/CN2012/071432 priority patent/WO2012113328A1/en
Publication of CN102651816A publication Critical patent/CN102651816A/en
Application granted granted Critical
Publication of CN102651816B publication Critical patent/CN102651816B/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/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/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • 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/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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/46Embedding additional information in the video signal during the compression process

Abstract

The embodiment of the invention discloses a method and a device for scanning a transformation coefficient block. In realization, the method comprises the following steps of: detecting the texture of a block which is already coded, which is used as the reference of a block to be coded; selecting a scanning sequence corresponding to the texture from preset alternate scanning sequences; carrying out rate distortion optimizing treatment on a Z-shaped scanning sequence and the selected scanning sequence so as to obtain an optimized scanning sequence; scanning a transformation coefficient block of the block to be coded according to the optimized scanning sequence if the optimized scanning sequence is the Z-shaped scanning sequence; resetting the transformation coefficient block of the block to be coded into a transformation coefficient block scanned according to a scanning sequence with a preset rule if the optimized scanning sequence is other scanning sequences except for the Z-shaped scanning sequence; scanning the transformation coefficient block of the block to be coded after resetting according to the scanning sequence with the preset rule; and editing information for indicating whether the scanning sequence used for scanning is the Z-shaped scanning sequence or not into a code stream. According to the scheme, resources can be saved, and the efficiency is also higher.

Description

A kind of scan method of transformation coefficient block and device
Technical field
The present invention relates to communication technical field, particularly scan method and the device of transformation coefficient block in a kind of coding and decoding video.
Background technology
The scanning of transformation coefficient block is a part of video coding and decoding technology.The scanning of transformation coefficient block has following application: Video coding end, to scanning at the two-dimentional transformation coefficient block of transform domain after conversion, makes two-dimentional conversion coefficient in transformation coefficient block be transformed into the conversion coefficient sequence of one dimension by Video coding end.In this course, need to select scanning sequency according to the mapping mode of Current Transform coefficient block, make the one-dimensional transform coefficient sequence that scans gained more trend towards descending arrangement, thereby improve code efficiency; At video decode end, by video decode end, according to mapping mode, select counter-scanning order to convert one-dimensional transform coefficient sequence to two-dimentional transformation coefficient block.
At Video coding end, in carrying out video coding process, first prediction residual is carried out to map function and obtain conversion coefficient at present, before carrying out conversion coefficient scanning, can also obtain reference block information, and the conversion coefficient information after quantizing; When high frequency conversion coefficient non-zero, from following three kinds of scan patterns: zigzag scan pattern, in horizontal sweep pattern and vertical sweep pattern, percent of pass aberration optimizing criterion is selected the scan pattern of one group of optimum; Then use the scan pattern of selecting to scan conversion coefficient, the selection information of scan pattern is enrolled to code stream, pass to decoding end.
Due to the coding side at video, need in three kinds of scan patterns, carry out the selection of pattern, make coding side complexity high; In addition, the selection information of scan pattern need to be enrolled to code stream, affect compression coding efficiency.
Summary of the invention
The embodiment of the present invention provides a kind of scan method and device of transformation coefficient block, improves compression coding efficiency.
The embodiment of the present invention provides a kind of scan method of transformation coefficient block, comprising:
Detection is as the texture of the coded block of the reference of block to be encoded, and described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
From preset candidate's scanning sequency, select the scanning sequency corresponding with described texture; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The scanning sequency of zig-zag scan and selection is carried out to rate distortion preferred process and obtain preferred scanning sequency;
If preferred scanning sequency is that zig-zag scan scans the transformation coefficient block of described block to be encoded according to preferred scanning sequency;
If described preferred scanning sequency is other scanning sequency beyond zig-zag scan, the transformation coefficient block of block to be encoded is reset to by the transformation coefficient block of the scanning sequency scanning of pre-defined rule; Transformation coefficient block according to the described block to be encoded of the scanning sequency counterweight postpone of described pre-defined rule scans;
By scanning the scanning sequency used, be whether that the indication information of zig-zag scan enrolls code stream.
The embodiment of the present invention provides a kind of scan method of transformation coefficient block, comprising:
Resolve code stream and obtain indication information, if the indication information beacon scanning of the code stream receiving order is not zig-zag scan, detect the texture as the decoding block of the reference of described to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient; From preset candidate's scanning sequency, select the scanning sequency corresponding with described texture; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The transformation coefficient block for the treatment of decoding block according to the scanning sequency of pre-defined rule scans;
If the scanning sequency of selecting is different from the scanning sequency of described pre-defined rule, after the end of scan, according to the scanning sequency of the scanning sequency of described selection and pre-defined rule, the transformation coefficient block of to be decoded being reset to can be according to the transformation coefficient block of the scanning sequency scanning of selecting.
The embodiment of the present invention provides a kind of scan method of transformation coefficient block, comprising:
Detection is as the texture of the coded block of the reference of block to be encoded, and described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
From preset candidate's scanning sequency, select the scanning sequency corresponding with described texture; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan and zig-zag scan;
If the scanning sequency of selecting is zig-zag scan, according to zig-zag scan, the transformation coefficient block of described block to be encoded is scanned; If the scanning sequency of selecting is other scanning sequency beyond zig-zag scan, the transformation coefficient block of block to be encoded is reset to the transformation coefficient block that meets zig-zag scan; Transformation coefficient block according to the described block to be encoded of zig-zag scan counterweight postpone scans.
The embodiment of the present invention provides a kind of scan method of transformation coefficient block, comprising:
Detection is as the texture of the decoding block of the reference of described to be decoded, and described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
From preset candidate's scanning sequency, select the scanning sequency corresponding with described texture; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan and zig-zag scan;
If the scanning sequency of selecting is zig-zag scan, according to zig-zag scan, the transformation coefficient block to described to be decoded scans;
If the scanning sequency of selecting is other scan mode beyond zig-zag scan, the transformation coefficient block of to be decoded is reset to the transformation coefficient block of the scanning sequency that meets described selection from meeting the transformation coefficient block of zig-zag scan; The transformation coefficient block of described to be decoded according to the scan mode counterweight postpone of described selection scans.
The embodiment of the present invention provides a kind of scanning means of transformation coefficient block, comprising:
The first detecting unit, for detection of the texture of the coded block of the reference as block to be encoded, described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
The first selected cell, selects the scanning sequency corresponding with described texture for the candidate's scanning sequency from preset; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The first processing unit, carries out rate distortion preferred process for the scanning sequency of the zig-zag scan to preset and selection and obtains preferred scanning sequency;
The first reset cell, if be zig-zag scan other scanning sequency in addition for described preferred scanning sequency, resets to the transformation coefficient block of block to be encoded by the transformation coefficient block of the scanning sequency scanning of pre-defined rule;
The first scanning element, if be that zig-zag scan scans the transformation coefficient block of block to be encoded according to preferred scanning sequency for preferred scanning sequency; If described preferred scanning sequency is other scanning sequency beyond zig-zag scan, according to the transformation coefficient block of the described block to be encoded of the scanning sequency counterweight postpone of described pre-defined rule, scan;
Whether the first coding unit, for being that the indication information of zig-zag scan enrolls code stream by scanning the scanning sequency used.
The embodiment of the present invention provides a kind of scanning means of transformation coefficient block, comprising:
The second resolution unit, obtains indication information for resolving code stream;
The second detecting unit, the indication information beacon scanning order of the code stream receiving if be used for is not zig-zag scan, detect as the encoding or the texture of decoding block of the reference of to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
The second selected cell, selects the scanning sequency corresponding with described texture for the candidate's scanning sequency from preset; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The second scanning element, scans for treat the transformation coefficient block of decoding block according to the scanning sequency of pre-defined rule;
The second reset cell, if different from the scanning sequency of described pre-defined rule for the scanning sequency of selecting, after the end of scan, according to the scanning sequency of the scanning sequency of described selection and pre-defined rule, the transformation coefficient block of to be decoded being reset to can be according to the transformation coefficient block of the scanning sequency scanning of selecting.
The embodiment of the present invention provides a kind of scanning means of transformation coefficient block, comprising:
The 3rd detecting unit, for detection of the texture of the coded block of the reference as block to be encoded, described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
The 3rd selected cell, selects the scanning sequency corresponding with described texture for the candidate's scanning sequency from preset; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan and zig-zag scan;
The 3rd reset cell, if be zig-zag scan other scanning sequency in addition for the scanning sequency of selecting, resets to by the transformation coefficient block of block to be encoded the transformation coefficient block that meets zig-zag scan;
The 3rd scanning element, if be zig-zag scan for the scanning sequency of selecting, scans the transformation coefficient block of described block to be encoded according to zig-zag scan; Or, according to the transformation coefficient block of the described block to be encoded of zig-zag scan counterweight postpone, scan.
The embodiment of the present invention provides a kind of scanning means of transformation coefficient block, comprising:
The 4th detecting unit, for detection of the texture of the decoding block of the reference as described to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
The 4th selected cell, selects the scanning sequency corresponding with described texture for the candidate's scanning sequency from preset; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan and zig-zag scan;
The 4th reset cell, if be zig-zag scan other scan mode in addition for the scanning sequency of selecting, the transformation coefficient block of to be decoded is reset to the transformation coefficient block of the scanning sequency that meets described selection from meeting the transformation coefficient block of zig-zag scan;
The 4th scanning element, if be zig-zag scan for the scanning sequency of selecting, according to zig-zag scan, the transformation coefficient block to described to be decoded scans; Or, according to the transformation coefficient block of the described block to be encoded of the scan mode counterweight postpone of described selection, scan.
The embodiment of the present invention provides a kind of scan method of transformation coefficient block, comprising:
Detection is as the texture of the coded block of the reference of block to be encoded, and described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
If the scanning sequency of the corresponding scanning sequency of described texture and pre-defined rule is inconsistent, the residual error data piece of block to be encoded is reset, making the transformation coefficient block that described residual error data piece is corresponding is by the transformation coefficient block of pre-defined rule scanning;
According to preferred scanning sequency, the transformation coefficient block of described block to be encoded is scanned, described preferred scanning sequency is for to carry out to the scanning sequency of zig-zag scan and pre-defined rule the scanning sequency that rate distortion preferred process obtains;
By scanning the scanning sequency used, be whether that the indication information of zig-zag scan enrolls code stream.
The embodiment of the present invention provides a kind of scan method of transformation coefficient block, comprising:
Resolve code stream and obtain indication information, the indication information beacon scanning order of code stream;
The transformation coefficient block for the treatment of decoding block according to the scanning sequency of resolving scans;
If the indication information beacon scanning of code stream order is not zigzag scan, detect the texture as the decoding block of the reference of described to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient; If the corresponding scanning sequency of described texture is different from the scanning sequency of described pre-defined rule, after inverse transformation finishes, according to the scanning sequency of scanning sequency corresponding to described texture and pre-defined rule, the residual error data piece of to be decoded is reset, making the transformation coefficient block that described residual error data piece is corresponding is can be according to the transformation coefficient block of the scanning sequency scanning of pre-defined rule.
The embodiment of the present invention provides a kind of scan method of transformation coefficient block, comprising:
Detection is as the texture of the coded block of the reference of block to be encoded, and described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
If the scanning sequency of the corresponding scanning sequency of described texture and pre-defined rule is inconsistent, the residual error data piece of block to be encoded is reset, making the transformation coefficient block that described residual error data piece is corresponding is by the transformation coefficient block of pre-defined rule scanning;
According to the scanning sequency of pre-defined rule, the transformation coefficient block of described block to be encoded is scanned;
The embodiment of the present invention provides a kind of scan method of transformation coefficient block, comprising:
The transformation coefficient block for the treatment of decoding block according to the scanning sequency of pre-defined rule scans;
Detection is as the texture of the decoding block of the reference of described to be decoded, and described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
If the corresponding scanning sequency of described texture is different from the scanning sequency of described pre-defined rule, after inverse transformation finishes, according to the scanning sequency of scanning sequency corresponding to described texture and pre-defined rule, the residual error data piece of to be decoded is reset, making the transformation coefficient block that described residual error data piece is corresponding is can be according to the transformation coefficient block of the scanning sequency scanning of pre-defined rule.
The embodiment of the present invention provides a kind of scanning means of transformation coefficient block, comprising:
The 5th detecting unit, for detection of the texture of the coded block of the reference as block to be encoded, described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
The 5th reset cell, if the scanning sequency for the corresponding scanning sequency of described texture and pre-defined rule is inconsistent, the residual error data piece of block to be encoded is reset, making the transformation coefficient block that described residual error data piece is corresponding is by the transformation coefficient block of pre-defined rule scanning;
The 5th processing unit, carries out rate distortion preferred process for the scanning sequency of the zig-zag scan to preset and pre-defined rule and obtains preferred scanning sequency;
The 5th scanning element, for scanning the transformation coefficient block of block to be encoded according to preferred scanning sequency;
Whether the 5th coding unit, for being that the indication information of zig-zag scan enrolls code stream by scanning the scanning sequency used.
The embodiment of the present invention provides a kind of scanning means of transformation coefficient block, comprising:
The 6th resolution unit, obtains indication information for resolving code stream;
The 6th scanning element, scans for treat the transformation coefficient block of decoding block according to the scanning sequency of resolving;
The 6th detecting unit, if the indication information beacon scanning order for code stream is not zigzag scan, detect the texture as the decoding block of the reference of described to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
The 6th reset cell, if different from the scanning sequency of described pre-defined rule for the corresponding scanning sequency of described texture, after inverse transformation finishes, according to the scanning sequency of scanning sequency corresponding to described texture and pre-defined rule, the residual error data piece of to be decoded is reset, making the transformation coefficient block that described residual error data piece is corresponding is can be according to the transformation coefficient block of the scanning sequency scanning of pre-defined rule.
The embodiment of the present invention provides a kind of scanning means of transformation coefficient block, comprising:
The 7th detecting unit, for detection of the texture of the coded block of the reference as block to be encoded, described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
The 7th reset cell, if the scanning sequency for the corresponding scanning sequency of described texture and pre-defined rule is inconsistent, the residual error data piece of block to be encoded is reset, making the transformation coefficient block that described residual error data piece is corresponding is by the transformation coefficient block of pre-defined rule scanning;
The 7th scanning element, for scanning the transformation coefficient block of block to be encoded according to the scanning sequency of pre-defined rule;
The embodiment of the present invention provides a kind of scanning means of transformation coefficient block, comprising:
The 8th scanning element, scans for treat the transformation coefficient block of decoding block according to the scanning sequency of pre-defined rule;
The 8th detecting unit, for detection of the texture of the decoding block of the reference as described to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
The 8th reset cell, if different from the scanning sequency of described pre-defined rule for the corresponding scanning sequency of described texture, after inverse transformation finishes, according to the scanning sequency of scanning sequency corresponding to described texture and pre-defined rule, the residual error data piece of to be decoded is reset, making the transformation coefficient block that described residual error data piece is corresponding is can be according to the transformation coefficient block of the scanning sequency scanning of pre-defined rule.
Technique scheme only need to be selected between predetermined scanning sequency and zig-zag scan, it is the selection of alternative, than the selection in one-out-three, can, less by an information of carrying selection, therefore, when being enrolled coding header, understand saving resource; In addition, when selecting, efficiency is also higher.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is embodiment of the present invention method flow schematic diagram;
Fig. 2 A is the scanning sequency schematic diagram of the vertical texture of the embodiment of the present invention;
Fig. 2 B is the scanning sequency schematic diagram of embodiment of the present invention horizontal texture;
Fig. 2 C is the scanning sequency schematic diagram of embodiment of the present invention cross grain;
Fig. 3 is embodiment of the present invention method flow schematic diagram;
Fig. 4 is embodiment of the present invention method flow schematic diagram;
Fig. 5 is embodiment of the present invention method flow schematic diagram;
Fig. 6 is embodiment of the present invention apparatus structure schematic diagram;
Fig. 7 is embodiment of the present invention apparatus structure schematic diagram;
Fig. 8 is embodiment of the present invention apparatus structure schematic diagram;
Fig. 9 is embodiment of the present invention apparatus structure schematic diagram.
Figure 10 is embodiment of the present invention method flow schematic diagram;
Figure 11 is embodiment of the present invention method flow schematic diagram;
Figure 12 is embodiment of the present invention method flow schematic diagram;
Figure 13 is embodiment of the present invention method flow schematic diagram;
Figure 14 is embodiment of the present invention apparatus structure schematic diagram;
Figure 15 is embodiment of the present invention apparatus structure schematic diagram;
Figure 16 is embodiment of the present invention apparatus structure schematic diagram;
Figure 17 is embodiment of the present invention apparatus structure schematic diagram.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The coding side of the embodiment of the present invention is in interframe encode process, for each block to be encoded, from various interframe encode types, according to rate distortion criterion, select optimum interframe encode type, obtain movable information simultaneously, by movable information and the reconstructed frame information of having encoded, obtain the predicted value of block to be encoded, it is poor that the pixel value of predicted value and block to be encoded is done, obtain residual values, to residual values convert successively, quantize, scanning, entropy encoding operation, enroll code stream, movable information is enrolled to code stream simultaneously, complete cataloged procedure.Below the scanning in Code And Decode process is specifically described.The conversion that the embodiment of the present invention is mentioned can be discrete cosine transform (Discrete Cosine Transform, DCT); Also can be different transform technology, for example KL conversion (Karhunen Loeve Transform, KLT) will not limit this embodiment of the present invention.
A scan method for transformation coefficient block, the present embodiment scheme can be carried out at coding side, as shown in Figure 1, comprising:
101: detection is as the texture of the coded block of the reference of block to be encoded, and above-mentioned texture has embodied the transformation coefficient block of above-mentioned block to be encoded at the Changing Pattern of all directions up conversion coefficient;
Above-mentioned 101 belong to a kind of physics derives, and the texture of having encoded is as a reference similar to the texture of current block to be encoded, and texture to be encoded is similar to residual error texture to be encoded, and the regularity of distribution of conversion coefficient and residual error texture are closely related.More specifically, above-mentioned texture comprises horizontal texture, vertical texture and cross grain; Wherein cross grain also can be regarded as without texture.
More specifically, above-mentioned detection the texture of decoding block comprise:
When carrying out interframe decoding, the horizontal gradient value in the horizontal direction of calculation of transform coefficients piece and the vertical gradient value on vertical direction; Horizontal gradient value be the difference of each neighbor pixel in horizontal direction absolute value and, vertical gradient value be the difference of each neighbor pixel on vertical direction absolute value and; Above-mentioned transformation coefficient block is as a reference the variation coefficient piece of above-mentioned decoding block;
If horizontal gradient value is greater than N vertical gradient value doubly, determine that texture is vertical texture, vertical gradient value is greater than N horizontal gradient value doubly and determines that texture is horizontal texture, otherwise determines that texture is cross grain; Above-mentioned N is the first preset value, and N can determine by resolution width, and for example resolution width is greater than 1000 o'clock N=2, and resolution width is less than 1000 o'clock N=1.5; The value of above N can rule of thumb come to determine, the concrete value embodiment of the present invention will not limit this.
When carrying out intraframe decoder, if the side-play amount of the vertical direction of intra prediction mode direction be take and interiorly determined that texture is vertical texture at M, the side-play amount of the horizontal direction of intra prediction mode direction be take and interiorly determined that texture is horizontal texture at M, otherwise determines that texture is cross grain; Above-mentioned M is the second preset value, and M also can be determined by resolution width, for example, be arranged to 5, can also be arranged to other values such as 3,4 etc., to this embodiment of the present invention, will not limit.
Further, the embodiment of the present invention also provides the implementation of revising preset value: if in the piece of having decoded, horizontal texture and the value that vertically ratio of texture dwindles N over the 3rd preset value, if horizontal texture is less than N with the ratio of vertical texture, increase the value of N.The 3rd preset value can be obtained by following mode, by the sequence of the conversion coefficient of different characteristics is carried out to intraframe coding, and the proportionate relationship of statistics level, vertical prediction direction, this proportionate relationship can be used as the 3rd preset value.
Alternatively, if there is coded block or decoding block, so the texture of encoding block or decoding block is known, now can utilize these information reduction operands; The texture of above-mentioned detection transformation coefficient block comprises: detect the to be decoded texture of setting time domain or the spatial domain interior encoding block of distance or decoding block, the texture detecting is defined as to the texture of transformation coefficient block.
102: from preset candidate's scanning sequency, select the scanning sequency corresponding with above-mentioned texture; Preset candidate's scanning sequency comprises zig-zag scan other scanning sequency in addition in the present embodiment;
The scanning sequency that above-mentioned texture is corresponding comprises as shown in Fig. 2 A~Fig. 2 C: the zig-zag scan of the horizontal sweep order that vertically texture correspondence is lined by line scan, the vertical sweep order that horizontal texture correspondence scans by column, the corresponding Z-shaped sequential scanning of cross grain.In Fig. 2 A~Fig. 2 C, take 4X4 matrix as example, circular representation transformation coefficient wherein, the coordinate (being position) at its place of numeric representation conversion coefficient under circular, the direction of arrow represents scanning direction, i.e. scanning sequency.The matrix that it should be noted that Fig. 2 C left side and matrix and the right represents respectively a kind of zig-zag scan, and zig-zag scan is can be self-defining, so possible kind is more, Fig. 2 C's for example neither be exhaustive; Therefore the embodiment of the present invention will not limit zig-zag scan.
103: the scanning sequency of preset zig-zag scan and selection is carried out to rate distortion preferred process and obtain preferred scanning sequency;
104: if preferred scanning sequency is that zig-zag scan scans the transformation coefficient block of block to be encoded according to preferred scanning sequency; If above-mentioned preferred scanning sequency is other scanning sequency beyond zig-zag scan, the transformation coefficient block of block to be encoded is reset to by the transformation coefficient block of the scanning sequency scanning of pre-defined rule; Transformation coefficient block according to the above-mentioned block to be encoded of the scanning sequency counterweight postpone of above-mentioned pre-defined rule scans;
More specifically, in above-mentioned 104, if above-mentioned preferred scanning sequency is other scanning sequency beyond zig-zag scan, the transformation coefficient block of block to be encoded is reset to by the transformation coefficient block of the scanning sequency scanning of pre-defined rule; According to the transformation coefficient block of the above-mentioned block to be encoded of the scanning sequency counterweight postpone of above-mentioned pre-defined rule, scan and comprise:
If preferred scanning sequency is the first scanning sequency, by the conversion coefficient transposition of block to be encoded, the transformation coefficient block of the above-mentioned block to be encoded according to the second scanning sequency after to transposition scans; The scanning sequency of above-mentioned the first scanning sequency and the second scanning sequency is symmetrical;
If preferred scanning sequency is the second scanning sequency, according to the second scanning sequency, the transformation coefficient block of above-mentioned block to be encoded is scanned.
It should be noted that, " first " and " second " is for distinguishing two scanning sequencies with symmetric relation above, do not do other restriction, for example: between horizontal sweep order and vertical sweep order, be exactly two scanning sequencies with symmetric relation, if the first scanning sequency be horizontal sweep order the second scanning sequency be vertical sweep order, if the first scanning sequency be vertical sweep order the second scanning sequency be horizontal sweep order.
More specifically, in above-mentioned 104, the transformation coefficient block of block to be encoded is reset to by the transformation coefficient block of the scanning sequency scanning of pre-defined rule; According to the transformation coefficient block of the above-mentioned block to be encoded of the scanning sequency counterweight postpone of above-mentioned pre-defined rule, scan and comprise: the transformation coefficient block of block to be encoded is reset to the transformation coefficient block that meets zig-zag scan; Transformation coefficient block according to the above-mentioned block to be encoded of zig-zag scan counterweight postpone scans.If adopt this method can transmit the indication information in 105, subsequent embodiment will describe in detail.
105: by scanning the scanning sequency used, be whether that the indication information of zig-zag scan enrolls code stream.
Above execution mode, only need between predetermined scanning sequency and zig-zag scan, select, be the selection of alternative, can be less by an information of carrying selection than the selection in one-out-three, so when being enrolled coding header, meeting saving resource; In addition, when selecting, efficiency is also higher.By the mode to transform coefficient matrix transposition, multiplexing identical entropy encoding model can improve code efficiency in addition.
More specifically, the present embodiment also provide preset candidate's scanning sequency implementation for example, above-mentioned preset candidate's scanning sequency comprises:
Predefined scanning rule, scanning rule has been determined the order of scanning; Or, the number of times that the conversion coefficient of adding up in advance each position of two or more transformation coefficient blocks is non-zero, by order from big to small, arrange the position of the conversion coefficient that each non-zero number of times is corresponding, the order of the position of the above-mentioned conversion coefficient that arrangement is obtained is defined as preset candidate's scanning sequency.
In rear a kind of implementation embodiment of the present invention of giving an example of above preset candidate's scan mode, having provided one illustrates: in encoder, according to the texture of residual block, quantizing residual error can be divided three classes: quantification residual error, vertical quantification residual error corresponding to quantification residual error, cross grain corresponding to texture that horizontal texture is corresponding; The mode of determining scanning sequency is: set up the counter group identical with conversion coefficient number (for example 4x4 conversion is 16 counters), then with counter, count, be specially: judge on each conversion coefficient whether be zero, if non-zero, the counter of correspondence position adds one; After the quantity of the transformation coefficient block detecting reaches the quantity of setting, individual count device all has the numerical value of its counting; Now can arrange from big to small the value of individual count device, the order of the position of the above-mentioned conversion coefficient that arrangement is obtained is defined as preset candidate's scanning sequency.Use the method, while scanning according to the order obtaining, before its corresponding conversion coefficient position of counter that numerical value is large can come in scanning sequency.
For example scheme one, below the scanning link in cataloged procedure is specifically described:
A: according to coding process encoding, until before carrying out transform coefficients encoding;
B: if that execution is interframe encode (Inter), reference block texture is detected, obtain its texture (horizontal Hor texture, vertical ver texture, cross grain); If be the situation of intraframe coding (Intra) what carry out, if the direction of intra prediction mode (intra prediction mode, ipmode) is ver+/-5, its texture is vertical texture, direction is Hor+/-5, and its texture is horizontal texture, and all the other situations are cross grain.The side-play amount arranging in the present embodiment is 5, certainly can also be arranged to other values, to this embodiment of the present invention, will not limit.According to the texture obtaining, from preset candidate's scanning sequency, select the scanning sequency corresponding with above-mentioned texture.
Detection method in above-mentioned B can be:
B1: determine and detect step-length.This step is that different converter units (Transform Unit, TU) arrange different detection step-lengths, and for example during TU=4, step-length is 1, during TU=8, when step-length is 1, TU=16, step-length is 2, during TU=32, step-length is 4, and the corresponding step-length of TU that also can all sizes is 1; If the TU of all sizes all use identical step-length so this step of B1 be omissible.
B2: in reference block (transformation coefficient block) as a reference, every two pixels of the adjacent detection step-length of horizontal direction are asked difference; Cumulative difference thoroughly deserve horizontal gradient value;
B3: in reference block, every two pixels of the adjacent detection step-length of vertical direction are asked difference; Cumulative difference thoroughly deserve vertical gradient value;
B4: if horizontal gradient value is greater than N vertical gradient value doubly, determine that its texture is vertical texture; If vertical gradient value is greater than N horizontal gradient value doubly, determine that its texture is horizontal texture; Other situation is cross grain; After B4, can also be further according to the level in coded block, vertical, cross grain ratio distribution, whether judgment threshold N needs to upgrade, judgment mode is whether the ratio of determined level Grad and vertical gradient value surpasses preset value, if so, increases preset value, no, dwindle preset value.(wherein preset value is obtained by following mode, by the sequence of the conversion coefficient of different characteristics is carried out to intraframe coding, and the proportionate relationship of statistics level, vertical prediction direction, this proportionate relationship can be used as preset value.Step C is the process that of preset value is revised automatically, and this process is not the step that must carry out.
In addition, the method detecting for step B in above cataloged procedure can have alternative scheme: detect in the to be decoded distance of setting time domain or spatial domain the texture of encoding block or decoding block, the texture detecting is defined as to the texture as the transformation coefficient block of to be decoded.The texture of decoding block that more specifically, for example will detect to be decoded periphery (upper, left, upper left, upper right, lower-left) is as the texture of current block conversion coefficient piece to be decoded.
C: the scanning sequency of preset zig-zag scan and selection is carried out to rate distortion preferred process and obtain preferred scanning sequency;
D: judge whether preferred scanning sequency is zig-zag scan, if so, carries out G, if not, carries out E;
E: if scanning sequency is vertically, by conversion coefficient transposition; If scanning sequency is level, continue;
F: according to horizontal sweep order and joint entropy encoding model, transformation coefficient block to be scanned is scanned, then continue follow-up cataloged procedure.
G: according to zig-zag scan and joint entropy encoding model, transformation coefficient block to be scanned is encoded, scanned, then continue follow-up cataloged procedure.
H: be whether that the indication information of zig-zag scan enrolls code stream by the above-mentioned scanning sequency used of scanning.This step can be carried out in step G or F implementation.Be understandable that, after having encoded, the result (code stream) of coding can be sent to decoding end, to the not explanation one by one of other positions of this embodiment of the present invention.
Corresponding, the embodiment of the present invention also provides the scan method of a kind of transformation coefficient block of carrying out in decoding end, as shown in Figure 3, comprising:
301: resolve code stream and obtain indication information;
302: if the indication information beacon scanning of the code stream receiving is sequentially zig-zag scan, the transformation coefficient block for the treatment of decoding block according to zig-zag scan scans; The flow process of scanning finishes.
303: if the indication information beacon scanning of the code stream receiving order is not zig-zag scan, detect the texture as the decoding block of the reference of above-mentioned to be decoded, above-mentioned texture has embodied the transformation coefficient block of above-mentioned to be decoded at the Changing Pattern of all directions up conversion coefficient; From preset candidate's scanning sequency, select the scanning sequency corresponding with above-mentioned texture; In the present embodiment, above-mentioned preset candidate's scanning sequency comprises zig-zag scan other scanning sequency in addition;
304: the transformation coefficient block for the treatment of decoding block according to the scanning sequency of pre-defined rule scans; If the scanning sequency of selecting is identical with the scanning sequency of above-mentioned pre-defined rule, the flow process of scanning finishes.
305: if the scanning sequency of selecting is different from the scanning sequency of above-mentioned pre-defined rule, after the end of scan, according to the scanning sequency of the scanning sequency of above-mentioned selection and pre-defined rule, the transformation coefficient block of to be decoded being reset to can be according to the transformation coefficient block of the scanning sequency scanning of selecting.Be understandable that, the present embodiment is corresponding with coding side, and the transformation coefficient block of so above-mentioned to be decoded was once reset according to above-mentioned pre-defined rule through coding side.
More specifically, the transformation coefficient block that the above-mentioned scanning sequency according to pre-defined rule is treated decoding block scans; If the scanning sequency of selecting is different from the scanning sequency of above-mentioned pre-defined rule, after the end of scan, according to the scanning sequency of the scanning sequency of above-mentioned selection and pre-defined rule, the transformation coefficient block of to be decoded is reset to and can be comprised according to the transformation coefficient block of the scanning sequency scanning of selecting:
If the scanning sequency of selecting is the first scanning sequency, according to the transformation coefficient block of above-mentioned to be decoded of the second scanning sequency, scan; After having scanned by the conversion coefficient transposition of to be decoded; The scanning sequency of above-mentioned the first scanning sequency and the second scanning sequency is symmetrical, the scanning sequency that the second scanning sequency is above-mentioned pre-defined rule.
The method of scheme two, decode procedure and cataloged procedure scanning is similar for example:
A: according to decoding process decoding, until before carrying out conversion coefficient parsing;
B: resolve code stream, obtain indication information, this indication information is the indication information in the step H of cataloged procedure; Judge whether beacon scanning is sequentially zig-zag scan to indication information; If so, carry out E; Otherwise carry out C;
C: this step can be selected the scanning sequency corresponding with above-mentioned texture with reference to the step B of the scheme one of giving an example from preset candidate's scanning sequency according to the texture obtaining, then carry out D;
D: if the corresponding vertical sweep order of grain direction is resolved, scanned transformation coefficient block to be scanned according to horizontal sweep order and joint entropy encoding model, then to conversion coefficient transposition, continue follow-up decode procedure; If the corresponding horizontal sweep order of grain direction, resolves, scans transformation coefficient block to be scanned according to horizontal sweep order and joint entropy encoding model, continue follow-up decode procedure;
E: according to zig-zag scan and joint entropy encoding model, transformation coefficient block to be scanned is resolved, scanned, then continue follow-up decode procedure.
Above scheme one and two for example, only need between level and vertical scanning sequency and zig-zag scan, select, it is the selection of alternative, than can be less by an information of carrying selection in the selection of level, one-out-three vertically and between zig-zag scan (zig-zag), so when being enrolled coding header, meeting saving resource; In addition, when selecting, efficiency is also higher.
The embodiment of the present invention gives the scan method of another kind of transformation coefficient block, and this scheme is carried out in encoding device, on the basis of above two schemes, further need not transmit indication information, can improve further code efficiency; As shown in Figure 4, comprising:
401: detection is as the texture of the coded block of the reference of block to be encoded, and above-mentioned texture has embodied the transformation coefficient block of above-mentioned block to be encoded at the Changing Pattern of all directions up conversion coefficient;
402: from preset candidate's scanning sequency, select the scanning sequency corresponding with above-mentioned texture; In the present embodiment, preset candidate's scanning sequency comprises zig-zag scan and zig-zag scan other scanning sequency in addition;
403: if the scanning sequency of selecting is zig-zag scan, according to zig-zag scan, the transformation coefficient block of above-mentioned block to be encoded is scanned; If the scanning sequency of selecting is other scanning sequency beyond zig-zag scan, the transformation coefficient block of block to be encoded is reset to the transformation coefficient block that meets zig-zag scan; Transformation coefficient block according to the above-mentioned block to be encoded of zig-zag scan counterweight postpone scans.
Corresponding, the embodiment of the present invention also provides the scan method of another kind of transformation coefficient block, and this programme is carried out in decoding device, need not transmit indication information, can improve further code efficiency; As shown in Figure 5, comprising:
For example scheme one, below the scanning link in cataloged procedure is specifically described:
Below the scanning link in cataloged procedure is specifically described:
A: according to coding process encoding, until before carrying out transform coefficients encoding;
B: this step can, with reference to the step B of the scheme one of giving an example, be selected the scanning sequency corresponding with above-mentioned texture from preset candidate's scanning sequency according to the texture obtaining;
C: be the position relationship that meets zig-zag scan by the position reset of conversion coefficient according to selected scanning sequency;
D: according to zig-zag scan and joint entropy encoding model, transformation coefficient block to be scanned is encoded, scanned, then continue follow-up cataloged procedure.
501: detect the texture as the decoding block of the reference of above-mentioned to be decoded, above-mentioned texture has embodied the transformation coefficient block of above-mentioned to be decoded at the Changing Pattern of all directions up conversion coefficient;
502: from preset candidate's scanning sequency, select the scanning sequency corresponding with above-mentioned texture; In the present embodiment, preset candidate's scanning sequency comprises zig-zag scan and zig-zag scan other scanning sequency in addition;
503: if the scanning sequency of selecting is zig-zag scan, according to zig-zag scan, the transformation coefficient block to above-mentioned to be decoded scans;
504: if the scanning sequency of selecting is other scan mode beyond zig-zag scan, the transformation coefficient block of to be decoded is reset to the transformation coefficient block of the scanning sequency that meets above-mentioned selection from meeting the transformation coefficient block of zig-zag scan; The transformation coefficient block of above-mentioned to be decoded according to the scan mode counterweight postpone of above-mentioned selection scans.
The method of corresponding decode procedure and cataloged procedure scanning is similar:
A: according to decoding process decoding, until before carrying out conversion coefficient parsing;
B: transformation coefficient block to be scanned is resolved, scanned according to zig-zag scan and joint entropy encoding model;
C: this step can, with reference to the step B of the scheme one of giving an example, be selected the scanning sequency corresponding with above-mentioned texture from preset candidate's scanning sequency according to the texture obtaining;
D: if the corresponding vertical sweep order of grain direction is the position relationship that meets vertical sweep order by the position reset of conversion coefficient; If the corresponding horizontal sweep order of grain direction is the position relationship that meets horizontal sweep order by the position reset of conversion coefficient; If the corresponding zig-zag scan of grain direction, does not carry out this step operation;
E: continue follow-up decode procedure;
The scanning sequency of conversion coefficient for single sweep scheme (is first scanning, second scanning, the 3rd scanning ...) corresponding unique frequency domain position relation (i.e. (0,0), (0,1), (1,0) ...), so giving a possible values for it, the numerical value of the point that can resolve according to its frequency domain periphery during the point scanning afterwards in parsing (sets up entropy encoding model, can be regarded as a kind of prediction, thereby make the code efficiency higher).For many sweeping schemes, owing to having determined scanning sequency before analytic trnasformation coefficient, determined the relation of scanning sequency and frequency domain position, so still can carry out according to the mode of single sweep scheme for each scanning sequency.The embodiment of the present invention is before analytic trnasformation coefficient, can determine whether it is zig-zag and cannot differentiation level and vertically, if so do not do any operation, when non-zig-zag, cannot determine the relation of scanning sequency and frequency domain position, also just have no idea to carry out the foundation of entropy encoding model, also just cannot decode.Such scheme has solved this problem by the mode of resetting.
It is below the result of scheme that the embodiment of the present invention the is provided emulation experiment of carrying out.
Test condition: JCTVC high efficiency low delay test condition;
Test result: wherein the 3rd row are the results that are integrated in TMuC (Video coding test software platform of new generation) technical scheme, the 4th row are results of embodiment of the present invention scheme, can find out that embodiment of the present invention scheme efficiency is higher.
A scanning means for transformation coefficient block, as above-mentioned in Fig. 6, comprising:
The first detecting unit 601, for detection of the texture of the coded block of the reference as block to be encoded, above-mentioned texture has embodied the transformation coefficient block of above-mentioned block to be encoded at the Changing Pattern of all directions up conversion coefficient;
The first selected cell 602, selects the scanning sequency corresponding with above-mentioned texture for the candidate's scanning sequency from preset; Above-mentioned preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The first processing unit 603, carries out rate distortion preferred process for the scanning sequency of the zig-zag scan to preset and selection and obtains preferred scanning sequency;
The first reset cell 604, if be zig-zag scan other scanning sequency in addition for above-mentioned preferred scanning sequency, resets to the transformation coefficient block of block to be encoded by the transformation coefficient block of the scanning sequency scanning of pre-defined rule;
The first scanning element 605, if be that zig-zag scan scans the transformation coefficient block of block to be encoded according to preferred scanning sequency for preferred scanning sequency; If above-mentioned preferred scanning sequency is other scanning sequency beyond zig-zag scan, according to the transformation coefficient block of the above-mentioned block to be encoded of the scanning sequency counterweight postpone of above-mentioned pre-defined rule, scan;
Whether the first coding unit 606, for being that the indication information of zig-zag scan enrolls code stream by scanning the scanning sequency used.
A scanning means for transformation coefficient block, as shown in Figure 7, comprising:
The second resolution unit 701, obtains indication information for resolving code stream;
The second detecting unit 702, the indication information beacon scanning order of the code stream receiving if be used for is not zig-zag scan, detect as the encoding or the texture of decoding block of the reference of to be decoded, above-mentioned texture has embodied the transformation coefficient block of above-mentioned to be decoded at the Changing Pattern of all directions up conversion coefficient;
The second selected cell 703, selects the scanning sequency corresponding with above-mentioned texture for the candidate's scanning sequency from preset; Above-mentioned preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The second scanning element 704, scans for treat the transformation coefficient block of decoding block according to the scanning sequency of pre-defined rule;
The second reset cell 705, if different from the scanning sequency of above-mentioned pre-defined rule for the scanning sequency of selecting, after the end of scan, according to the scanning sequency of the scanning sequency of above-mentioned selection and pre-defined rule, the transformation coefficient block of to be decoded being reset to can be according to the transformation coefficient block of the scanning sequency scanning of selecting.
A scanning means for transformation coefficient block, as shown in Figure 8, comprising:
The 3rd detecting unit 801, for detection of the texture of the coded block of the reference as block to be encoded, above-mentioned texture has embodied the transformation coefficient block of above-mentioned block to be encoded at the Changing Pattern of all directions up conversion coefficient;
The 3rd selected cell 802, selects the scanning sequency corresponding with above-mentioned texture for the candidate's scanning sequency from preset; Above-mentioned preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan and zig-zag scan;
The 3rd reset cell 803, if be zig-zag scan other scanning sequency in addition for the scanning sequency of selecting, resets to by the transformation coefficient block of block to be encoded the transformation coefficient block that meets zig-zag scan;
The 3rd scanning element 804, if be zig-zag scan for the scanning sequency of selecting, scans the transformation coefficient block of above-mentioned block to be encoded according to zig-zag scan; Or, according to the transformation coefficient block of the above-mentioned block to be encoded of zig-zag scan counterweight postpone, scan.
A scanning means for transformation coefficient block, as shown in Figure 9, comprising:
The 4th detecting unit 901, for detection of the texture of the decoding block of the reference as above-mentioned to be decoded, above-mentioned texture has embodied the transformation coefficient block of above-mentioned to be decoded at the Changing Pattern of all directions up conversion coefficient;
The 4th selected cell 902, selects the scanning sequency corresponding with above-mentioned texture for the candidate's scanning sequency from preset; Above-mentioned preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan and zig-zag scan;
The 4th reset cell 903, if be zig-zag scan other scan mode in addition for the scanning sequency of selecting, the transformation coefficient block of to be decoded is reset to the transformation coefficient block of the scanning sequency that meets above-mentioned selection from meeting the transformation coefficient block of zig-zag scan;
The 4th scanning element 904, if be zig-zag scan for the scanning sequency of selecting, according to zig-zag scan, the transformation coefficient block to above-mentioned to be decoded scans; Or, according to the transformation coefficient block of the above-mentioned block to be encoded of the scan mode counterweight postpone of above-mentioned selection, scan.
The scheme of said apparatus only need to be selected between level and vertical scanning sequency and zig-zag scan, it is the selection of alternative, than can be less by an information of carrying selection in the selection of level, one-out-three vertically and between zig-zag scan (zig-zag), so when being enrolled coding header, meeting saving resource; In addition, when selecting, efficiency is also higher.
A scan method for transformation coefficient block, the present embodiment scheme can be carried out at coding side, as shown in figure 10, comprising:
1001: detection is as the texture of the coded block of the reference of block to be encoded, and above-mentioned texture has embodied the transformation coefficient block of above-mentioned block to be encoded at the Changing Pattern of all directions up conversion coefficient;
Above-mentioned 1001 belong to a kind of physics derives, and the texture of having encoded is as a reference similar to the texture of current block to be encoded, and texture to be encoded is similar to residual error texture to be encoded, and the regularity of distribution of conversion coefficient and residual error texture are closely related.More specifically, above-mentioned texture comprises horizontal texture, vertical texture and cross grain; Wherein cross grain also can be regarded as without texture.
More specifically, above-mentioned detection the texture of decoding block comprise:
When carrying out interframe decoding, the horizontal gradient value in the horizontal direction of calculation of transform coefficients piece and the vertical gradient value on vertical direction; Horizontal gradient value be the difference of each neighbor pixel in horizontal direction absolute value and, vertical gradient value be the difference of each neighbor pixel on vertical direction absolute value and; Above-mentioned transformation coefficient block is as a reference the variation coefficient piece of above-mentioned decoding block;
If horizontal gradient value is greater than N vertical gradient value doubly, determine that texture is vertical texture, vertical gradient value is greater than N horizontal gradient value doubly and determines that texture is horizontal texture, otherwise determines that texture is cross grain; Above-mentioned N is the first preset value, and N can determine by resolution width, and for example resolution width is greater than 1000 o'clock N=2, and resolution width is less than 1000 o'clock N=1.5; The value of above N can rule of thumb come to determine, the concrete value embodiment of the present invention will not limit this.
When carrying out intraframe decoder, if the side-play amount of the vertical direction of intra prediction mode direction be take and interiorly determined that texture is vertical texture at M, the side-play amount of the horizontal direction of intra prediction mode direction be take and interiorly determined that texture is horizontal texture at M, otherwise determines that texture is cross grain; Above-mentioned M is the second preset value, and M also can be determined by resolution width, for example, be arranged to 5, can also be arranged to other values such as 3,4 etc., to this embodiment of the present invention, will not limit.
Further, the embodiment of the present invention also provides the implementation of revising preset value: if in the piece of having decoded, horizontal texture and the value that vertically ratio of texture dwindles N over the 3rd preset value, if horizontal texture is less than N with the ratio of vertical texture, increase the value of N.The 3rd preset value can be obtained by following mode, by the sequence of the conversion coefficient of different characteristics is carried out to intraframe coding, and the proportionate relationship of statistics level, vertical prediction direction, this proportionate relationship can be used as the 3rd preset value.
Alternatively, if there is coded block or decoding block, so the texture of encoding block or decoding block is known, now can utilize these information reduction operands; The texture of above-mentioned detection transformation coefficient block comprises: detect the to be decoded texture of setting time domain or the spatial domain interior encoding block of distance or decoding block, the texture detecting is defined as to the texture of transformation coefficient block.
1002: if the scanning sequency of the corresponding scanning sequency of described texture and pre-defined rule is inconsistent, the residual error data piece of block to be encoded is reset, make the transformation coefficient block of its corresponding transformation coefficient block for scanning by pre-defined rule;
The scanning sequency that above-mentioned texture is corresponding comprises as shown in Fig. 2 A~Fig. 2 C: the zig-zag scan of the horizontal sweep order that vertically texture correspondence is lined by line scan, the vertical sweep order that horizontal texture correspondence scans by column, the corresponding Z-shaped sequential scanning of cross grain.In Fig. 2 A~Fig. 2 C, take 4X4 matrix as example, circular representation transformation coefficient wherein, the coordinate (being position) at its place of numeric representation conversion coefficient under circular, the direction of arrow represents scanning direction, i.e. scanning sequency.The matrix that it should be noted that Fig. 2 C left side and matrix and the right represents respectively a kind of zig-zag scan, and zig-zag scan is can be self-defining, so possible kind is more, Fig. 2 C's for example neither be exhaustive; Therefore the embodiment of the present invention will not limit zig-zag scan.
1003: the scanning sequency of preset zig-zag scan and pre-defined rule is carried out to rate distortion preferred process and obtain preferred scanning sequency;
More specifically, in above-mentioned 1003, if the scanning sequency of the corresponding scanning sequency of described texture and pre-defined rule is inconsistent, the residual error data piece of block to be encoded is reset, make its corresponding transformation coefficient block for by the transformation coefficient block of pre-defined rule scanning; According to the scanning sequency of pre-defined rule, the transformation coefficient block of described block to be encoded is scanned and is comprised:
If preferred scanning sequency is the first scanning sequency, by the residual error data piece transposition of block to be encoded, the transformation coefficient block of the above-mentioned block to be encoded according to the second scanning sequency after to transposition scans; The scanning sequency of above-mentioned the first scanning sequency and the second scanning sequency is symmetrical;
If preferred scanning sequency is the second scanning sequency, according to the second scanning sequency, the transformation coefficient block of above-mentioned block to be encoded is scanned.
It should be noted that, " first " and " second " is for distinguishing two scanning sequencies with symmetric relation above, do not do other restriction, for example: between horizontal sweep order and vertical sweep order, be exactly two scanning sequencies with symmetric relation, if the first scanning sequency be horizontal sweep order the second scanning sequency be vertical sweep order, if the first scanning sequency be vertical sweep order the second scanning sequency be horizontal sweep order.
More specifically, in above-mentioned 1003, by the residual error data piece of block to be encoded, make its corresponding transformation coefficient block for the transformation coefficient block of the scanning sequency scanning by pre-defined rule; According to the scanning sequency of above-mentioned pre-defined rule, the transformation coefficient block of above-mentioned block to be encoded is scanned and comprised: by the residual error data piece of block to be encoded, make its corresponding transformation coefficient block for the transformation coefficient block of the scanning sequency scanning by pre-defined rule; According to the scanning sequency of pre-defined rule, the transformation coefficient block of above-mentioned block to be encoded is scanned.If adopt this method can transmit the indication information in 1005, subsequent embodiment will describe in detail.
1004: according to preferred scanning sequency, the transformation coefficient block of described block to be encoded is scanned;
1005: by scanning the scanning sequency used, be whether that the indication information of zig-zag scan enrolls code stream.
Above execution mode, only need between predetermined scanning sequency and zig-zag scan, select, be the selection of alternative, can be less by an information of carrying selection than the selection in one-out-three, so when being enrolled coding header, meeting saving resource; In addition, when selecting, efficiency is also higher.By the mode to transform coefficient matrix transposition, multiplexing identical entropy encoding model can improve code efficiency in addition.
More specifically, the present embodiment also provide preset candidate's scanning sequency implementation for example, above-mentioned preset candidate's scanning sequency comprises:
Predefined scanning rule, scanning rule has been determined the order of scanning; Or, the number of times that the conversion coefficient of adding up in advance each position of two or more transformation coefficient blocks is non-zero, by order from big to small, arrange the position of the conversion coefficient that each non-zero number of times is corresponding, the order of the position of the above-mentioned conversion coefficient that arrangement is obtained is defined as preset candidate's scanning sequency.
In rear a kind of implementation embodiment of the present invention of giving an example of above preset candidate's scan mode, having provided one illustrates: in encoder, according to the texture of residual block, quantizing residual error can be divided three classes: quantification residual error, vertical quantification residual error corresponding to quantification residual error, cross grain corresponding to texture that horizontal texture is corresponding; The mode of determining scanning sequency is: set up the counter group identical with conversion coefficient number (for example 4x4 conversion is 16 counters), then with counter, count, be specially: judge on each conversion coefficient whether be zero, if non-zero, the counter of correspondence position adds one; After the quantity of the transformation coefficient block detecting reaches the quantity of setting, individual count device all has the numerical value of its counting; Now can arrange from big to small the value of individual count device, the order of the position of the above-mentioned conversion coefficient that arrangement is obtained is defined as preset candidate's scanning sequency.Use the method, while scanning according to the order obtaining, before its corresponding conversion coefficient position of counter that numerical value is large can come in scanning sequency.
For example scheme one, below the scanning link in cataloged procedure is specifically described:
A: according to coding process encoding, until before carrying out transform coefficients encoding;
B: if that execution is interframe encode (Inter), reference block texture is detected, obtain its texture (horizontal Hor texture, vertical ver texture, cross grain); If be the situation of intraframe coding (Intra) what carry out, if the direction of intra prediction mode (intra prediction mode, ipmode) is ver+/-5, its texture is vertical texture, direction is Hor+/-5, and its texture is horizontal texture, and all the other situations are cross grain.The side-play amount arranging in the present embodiment is 5, certainly can also be arranged to other values, to this embodiment of the present invention, will not limit.According to the texture obtaining, from preset candidate's scanning sequency, select the scanning sequency corresponding with above-mentioned texture.
Detection method in above-mentioned B can be:
B1: determine and detect step-length.This step is that different converter units (Transform Unit, TU) arrange different detection step-lengths, and for example during TU=4, step-length is 1, during TU=8, when step-length is 1, TU=16, step-length is 2, during TU=32, step-length is 4, and the corresponding step-length of TU that also can all sizes is 1; If the TU of all sizes all use identical step-length so this step of B1 be omissible.
B2: in reference block (transformation coefficient block) as a reference, every two pixels of the adjacent detection step-length of horizontal direction are asked difference; Cumulative difference thoroughly deserve horizontal gradient value;
B3: in reference block, every two pixels of the adjacent detection step-length of vertical direction are asked difference; Cumulative difference thoroughly deserve vertical gradient value;
B4: if horizontal gradient value is greater than N vertical gradient value doubly, determine that its texture is vertical texture; If vertical gradient value is greater than N horizontal gradient value doubly, determine that its texture is horizontal texture; Other situation is cross grain; After B4, can also be further according to the level in coded block, vertical, cross grain ratio distribution, whether judgment threshold N needs to upgrade, judgment mode is whether the ratio of determined level Grad and vertical gradient value surpasses preset value, if so, increases preset value, no, dwindle preset value.(wherein preset value is obtained by following mode, by the sequence of the conversion coefficient of different characteristics is carried out to intraframe coding, and the proportionate relationship of statistics level, vertical prediction direction, this proportionate relationship can be used as preset value.Step C is the process that of preset value is revised automatically, and this process is not the step that must carry out.
In addition, the method detecting for step B in above cataloged procedure can have alternative scheme: detect in the to be decoded distance of setting time domain or spatial domain the texture of encoding block or decoding block, the texture detecting is defined as to the texture as the transformation coefficient block of to be decoded.The texture of decoding block that more specifically, for example will detect to be decoded periphery (upper, left, upper left, upper right, lower-left) is as the texture of current block conversion coefficient piece to be decoded.
C: if scanning sequency corresponding to described texture is vertically, by conversion coefficient transposition; If the scanning sequency that described texture is corresponding is level, continue;
D: the scanning sequency of preset zig-zag scan and pre-defined rule is carried out to rate distortion preferred process and obtain preferred scanning sequency;
E: according to preferred scanning sequency and joint entropy encoding model, transformation coefficient block to be scanned is encoded, scanned, then continue follow-up cataloged procedure;
F: be whether that the indication information of zig-zag scan enrolls code stream by the above-mentioned scanning sequency used of scanning.This step can be carried out in step e implementation.Be understandable that, after having encoded, the result (code stream) of coding can be sent to decoding end, to the not explanation one by one of other positions of this embodiment of the present invention.
Corresponding, the embodiment of the present invention also provides the scan method of a kind of transformation coefficient block of carrying out in decoding end, as shown in figure 11, comprising:
1301: resolve code stream and obtain indication information;
1302: the transformation coefficient block for the treatment of decoding block according to the scanning sequency of resolving scans, inverse transformation;
1303: if the indication information beacon scanning of code stream order is not zigzag scan, detect the texture as the decoding block of the reference of described to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient; The scanning sequency that in the present embodiment, above-mentioned texture is corresponding comprises other scanning sequency beyond zig-zag scan;
1304: if the corresponding scanning sequency of described texture is different from the scanning sequency of described pre-defined rule, after inverse transformation finishes, according to the scanning sequency of scanning sequency corresponding to described texture and pre-defined rule, the residual error data piece of to be decoded is reset, make the transformation coefficient block of its corresponding transformation coefficient block for scanning according to the scanning sequency of pre-defined rule.Be understandable that, the present embodiment is corresponding with coding side, and the residual error data piece of so above-mentioned to be decoded was once reset according to above-mentioned pre-defined rule through coding side.
More specifically, the transformation coefficient block that the above-mentioned scanning sequency according to pre-defined rule is treated decoding block scans; If the corresponding scanning sequency of described texture is different from the scanning sequency of described pre-defined rule, after inverse transformation finishes, according to the scanning sequency of scanning sequency corresponding to described texture and pre-defined rule, the residual error data piece of to be decoded is reset, makes its corresponding transformation coefficient block for comprising according to the transformation coefficient block of the scanning sequency scanning of pre-defined rule:
If the scanning sequency of selecting is the first scanning sequency, according to the transformation coefficient block of above-mentioned to be decoded of the second scanning sequency, scan; After having scanned by the residual error data piece transposition of to be decoded; The scanning sequency of above-mentioned the first scanning sequency and the second scanning sequency is symmetrical, the scanning sequency that the second scanning sequency is above-mentioned pre-defined rule.
The method of scheme two, decode procedure and cataloged procedure scanning is similar for example:
A: according to decoding process decoding, until before carrying out conversion coefficient parsing;
B: resolve code stream, obtain indication information, this indication information is the indication information in the step H of cataloged procedure;
C: transformation coefficient block to be scanned is resolved, scanned, inverse transformation according to scanning sequency and the joint entropy encoding model of resolving;
D: judge whether beacon scanning is sequentially zig-zag scan to indication information, if not zigzag scan, can be with reference to the step B of the scheme one of giving an example, according to the grain direction obtaining.If the corresponding scanning sequency of described texture is different from the scanning sequency of described pre-defined rule, by the residual error data piece transposition of to be decoded;
E: continue follow-up decode procedure.
Above scheme one and two for example, only need between level and vertical scanning sequency and zig-zag scan, select, it is the selection of alternative, than can be less by an information of carrying selection in the selection of level, one-out-three vertically and between zig-zag scan (zig-zag), so when being enrolled coding header, meeting saving resource; In addition, when selecting, efficiency is also higher.
The embodiment of the present invention gives the scan method of another kind of transformation coefficient block, and this scheme is carried out in encoding device, on the basis of above two schemes, further need not transmit indication information, can improve further code efficiency; As shown in figure 12, comprising:
1401: detection is as the texture of the coded block of the reference of block to be encoded, and above-mentioned texture has embodied the transformation coefficient block of above-mentioned block to be encoded at the Changing Pattern of all directions up conversion coefficient;
1402: if the scanning sequency of the corresponding scanning sequency of described texture and pre-defined rule is inconsistent, the residual error data piece of block to be encoded is reset, make the transformation coefficient block of its corresponding transformation coefficient block for scanning by pre-defined rule;
1403: according to the scanning sequency of pre-defined rule, the transformation coefficient block of described block to be encoded is scanned.
For example scheme one, below the scanning link in cataloged procedure is specifically described:
Below the scanning link in cataloged procedure is specifically described:
A: according to coding process encoding, until before carrying out transform coefficients encoding;
B: this step can, with reference to the step B of the scheme one of giving an example, obtain grain direction;
C: be the position relationship that meets zig-zag scan by the position reset of conversion coefficient according to selected scanning sequency;
D: according to zig-zag scan and joint entropy encoding model, transformation coefficient block to be scanned is encoded, scanned, then continue follow-up cataloged procedure.
Corresponding, the embodiment of the present invention also provides the scan method of another kind of transformation coefficient block, and this programme is carried out in decoding device, need not transmit indication information, can improve further code efficiency; As shown in figure 13, comprising:
1501: the transformation coefficient block for the treatment of decoding block according to the scanning sequency of pre-defined rule scans;
1502: detect the texture as the decoding block of the reference of described to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
1503: if the corresponding scanning sequency of described texture is different from the scanning sequency of described pre-defined rule, after inverse transformation finishes, according to the scanning sequency of scanning sequency corresponding to described texture and pre-defined rule, the residual error data piece of to be decoded is reset, make the transformation coefficient block of its corresponding transformation coefficient block for scanning according to the scanning sequency of pre-defined rule.
The method of corresponding decode procedure and cataloged procedure scanning is similar:
A: according to decoding process decoding, until before carrying out conversion coefficient parsing;
B: transformation coefficient block to be scanned is resolved, scanned, inverse transformation according to zig-zag scan and joint entropy encoding model;
C: this step can, with reference to the step B of the scheme one of giving an example, obtain grain direction; If the corresponding scanning sequency of described texture is different from the scanning sequency of described pre-defined rule, by the residual error data piece transposition of to be decoded
D: continue follow-up decode procedure;
Texture is detected and matrix transpose operation is carried out after being placed on inverse transformation operation, can not impact the concurrency of decoding, reduced processing delay, improved decoding efficiency.
A scanning means for transformation coefficient block, as shown in figure 14, comprising:
The 5th detecting unit 1601, for detection of the texture of the coded block of the reference as block to be encoded, described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
The 5th reset cell 1602, if inconsistent for the scanning sequency of the corresponding scanning sequency of described texture and pre-defined rule, resets to the residual error data piece of block to be encoded, makes the transformation coefficient block of its corresponding transformation coefficient block for scanning by pre-defined rule;
The 5th processing unit 1603, carries out rate distortion preferred process for the scanning sequency of the zig-zag scan to preset and pre-defined rule and obtains preferred scanning sequency;
The 5th scanning element 1604, for scanning the transformation coefficient block of block to be encoded according to preferred scanning sequency;
Whether the 5th coding unit 1605, for being that the indication information of zig-zag scan enrolls code stream by scanning the scanning sequency used.
A scanning means for transformation coefficient block, as shown in figure 15, comprising:
The 6th resolution unit 1701, obtains indication information for resolving code stream;
The 6th scanning element 1702, scans for treat the transformation coefficient block of decoding block according to the scanning sequency of resolving;
The 6th detecting unit 1703, if the indication information beacon scanning order for code stream is not zigzag scan, detect the texture as the decoding block of the reference of described to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
The 6th reset cell 1704, if different from the scanning sequency of described pre-defined rule for the corresponding scanning sequency of described texture, after inverse transformation finishes, according to the scanning sequency of scanning sequency corresponding to described texture and pre-defined rule, the residual error data piece of to be decoded is reset, make the transformation coefficient block of its corresponding transformation coefficient block for scanning according to the scanning sequency of pre-defined rule.
A scanning means for transformation coefficient block, as shown in figure 16, comprising:
The 7th detecting unit 1801, for detection of the texture of the coded block of the reference as block to be encoded, described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
The 7th reset cell 1802, if inconsistent for the scanning sequency of the corresponding scanning sequency of described texture and pre-defined rule, resets to the residual error data piece of block to be encoded, makes the transformation coefficient block of its corresponding transformation coefficient block for scanning by pre-defined rule;
The 7th scanning element 1803, for scanning the transformation coefficient block of block to be encoded according to the scanning sequency of pre-defined rule;
A scanning means for transformation coefficient block, as shown in figure 17, comprising:
The 8th scanning element 1901, scans for treat the transformation coefficient block of decoding block according to the scanning sequency of pre-defined rule;
The 8th detecting unit 1902, for detection of the texture of the decoding block of the reference as described to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
The 8th reset cell 1903, if different from the scanning sequency of described pre-defined rule for the corresponding scanning sequency of described texture, after inverse transformation finishes, according to the scanning sequency of scanning sequency corresponding to described texture and pre-defined rule, the residual error data piece of to be decoded is reset, make the transformation coefficient block of its corresponding transformation coefficient block for scanning according to the scanning sequency of pre-defined rule.
The method that the embodiment of the present invention provides can be applied in digital processing field, and by video encoder, decoder is realized.Video encoder, decoder is for example widely used in, in various communication apparatus or electronic equipment: media gateway, mobile phone, wireless device, personal digital assistant (PDA), hand-hold type or portable computer, GPS receiver/omniselector, camera, video player, video camera, video tape recorder, watch-dog etc.This kind equipment comprises processor, memory, and the interface of transmission data.Video Codec can be directly by digital circuit or chip for example DSP (digital signal processor) realize, or drive the flow process in a processor software code and realize by software code.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, above-mentioned program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The scan method of a kind of the transformation coefficient block above embodiment of the present invention being provided, device and system are described in detail, applied specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, to sum up, this description should not be construed as limitation of the present invention meanwhile.

Claims (8)

1. a scan method for transformation coefficient block, is characterized in that, comprising:
Detection is as the texture of the coded block of the reference of block to be encoded, and described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
From preset candidate's scanning sequency, select the scanning sequency corresponding with described texture; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The scanning sequency of zig-zag scan and selection is carried out to rate distortion preferred process and obtain preferred scanning sequency;
If preferred scanning sequency is that zig-zag scan scans the transformation coefficient block of described block to be encoded according to preferred scanning sequency;
If described preferred scanning sequency is other scanning sequency beyond zig-zag scan, the transformation coefficient block of block to be encoded is reset to by the transformation coefficient block of the scanning sequency scanning of pre-defined rule; Transformation coefficient block according to the described block to be encoded of the scanning sequency counterweight postpone of described pre-defined rule scans;
By scanning the scanning sequency used, be whether that the indication information of zig-zag scan enrolls code stream.
2. method according to claim 1, is characterized in that, if described preferred scanning sequency is other scanning sequency beyond zig-zag scan, the transformation coefficient block of block to be encoded is reset to by the transformation coefficient block of the scanning sequency scanning of pre-defined rule; According to the transformation coefficient block of the described block to be encoded of the scanning sequency counterweight postpone of described pre-defined rule, scan and comprise:
If preferred scanning sequency is the first scanning sequency, by the conversion coefficient transposition of block to be encoded, the transformation coefficient block of the described block to be encoded according to the second scanning sequency after to transposition scans; The scanning sequency of described the first scanning sequency and the second scanning sequency is symmetrical;
If preferred scanning sequency is the second scanning sequency, according to the second scanning sequency, the transformation coefficient block of described block to be encoded is scanned.
3. according to method described in claim 1 or 2, it is characterized in that, the texture that detects coded block comprises:
When carrying out interframe encode, the horizontal gradient value in the horizontal direction of calculating coded block and the vertical gradient value on vertical direction; Horizontal gradient value be the difference of each neighbor pixel in horizontal direction absolute value and, vertical gradient value be the difference of each neighbor pixel on vertical direction absolute value and;
If horizontal gradient value is greater than N vertical gradient value doubly, determine that texture is vertical texture, vertical gradient value is greater than N horizontal gradient value doubly and determines that texture is horizontal texture, otherwise determines that texture is cross grain; Described N is the first preset value;
When carrying out intraframe coding, if the side-play amount of the vertical direction of intra prediction mode direction be take and interiorly determined that texture is vertical texture at M, the side-play amount of the horizontal direction of intra prediction mode direction be take and interiorly determined that texture is horizontal texture at M, otherwise determines that texture is cross grain; Described M is the second preset value.
4. a scan method for transformation coefficient block, is characterized in that, comprising:
Resolve code stream and obtain indication information, if the indication information beacon scanning of the code stream receiving order is not zig-zag scan, detect the texture as the decoding block of the reference of to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
From preset candidate's scanning sequency, select the scanning sequency corresponding with described texture; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The transformation coefficient block for the treatment of decoding block according to the scanning sequency of pre-defined rule scans;
If the scanning sequency of selecting is different from the scanning sequency of described pre-defined rule, after the end of scan, according to the scanning sequency of the scanning sequency of described selection and pre-defined rule, the transformation coefficient block of to be decoded being reset to can be according to the transformation coefficient block of the scanning sequency scanning of selecting.
5. method according to claim 4, is characterized in that, the transformation coefficient block that the described scanning sequency according to pre-defined rule is treated decoding block scans; If the scanning sequency of selecting is different from the scanning sequency of described pre-defined rule, after the end of scan, according to the scanning sequency of the scanning sequency of described selection and pre-defined rule, the transformation coefficient block of to be decoded is reset to and can be comprised according to the transformation coefficient block of the scanning sequency scanning of selecting:
If the scanning sequency of selecting is the first scanning sequency, the transformation coefficient block according to the second scanning sequency to described to be decoded scans; After having scanned by the conversion coefficient transposition of to be decoded; The scanning sequency of described the first scanning sequency and the second scanning sequency is symmetrical, the scanning sequency that the second scanning sequency is described pre-defined rule.
6. according to method described in claim 4 or 5, it is characterized in that, detect the texture of decoding block and comprise:
When carrying out interframe decoding, calculate horizontal gradient value in the horizontal direction of decoding block and the vertical gradient value on vertical direction; Horizontal gradient value be the difference of each neighbor pixel in horizontal direction absolute value and, vertical gradient value be the difference of each neighbor pixel on vertical direction absolute value and;
If horizontal gradient value is greater than N vertical gradient value doubly, determine that texture is vertical texture, vertical gradient value is greater than N horizontal gradient value doubly and determines that texture is horizontal texture, otherwise determines that texture is cross grain; Described N is the first preset value;
When carrying out intraframe decoder, if the side-play amount of the vertical direction of intra prediction mode direction be take and interiorly determined that texture is vertical texture at M, the side-play amount of the horizontal direction of intra prediction mode direction be take and interiorly determined that texture is horizontal texture at M, otherwise determines that texture is cross grain; Described M is the second preset value.
7. a scanning means for transformation coefficient block, is characterized in that, comprising:
The first detecting unit, for detection of the texture of the coded block of the reference as block to be encoded, described texture has embodied the transformation coefficient block of described block to be encoded at the Changing Pattern of all directions up conversion coefficient;
The first selected cell, selects the scanning sequency corresponding with described texture for the candidate's scanning sequency from preset; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The first processing unit, obtains preferred scanning sequency for the scanning sequency of zig-zag scan and selection is carried out to rate distortion preferred process;
The first reset cell, if be zig-zag scan other scanning sequency in addition for described preferred scanning sequency, resets to the transformation coefficient block of block to be encoded by the transformation coefficient block of the scanning sequency scanning of pre-defined rule;
The first scanning element, if be that zig-zag scan scans the transformation coefficient block of block to be encoded according to preferred scanning sequency for preferred scanning sequency; If described preferred scanning sequency is other scanning sequency beyond zig-zag scan, according to the transformation coefficient block of the described block to be encoded of the scanning sequency counterweight postpone of described pre-defined rule, scan;
Whether the first coding unit, for being that the indication information of zig-zag scan enrolls code stream by scanning the scanning sequency used.
8. a scanning means for transformation coefficient block, is characterized in that, comprising:
The second resolution unit, obtains indication information for resolving code stream;
The second detecting unit, the indication information beacon scanning order of the code stream receiving if be used for is not zig-zag scan, detect the texture as the decoding block of the reference of to be decoded, described texture has embodied the transformation coefficient block of described to be decoded at the Changing Pattern of all directions up conversion coefficient;
The second selected cell, selects the scanning sequency corresponding with described texture for the candidate's scanning sequency from preset; Described preset candidate's scanning sequency comprises other scanning sequency beyond zig-zag scan;
The second scanning element, scans for treat the transformation coefficient block of decoding block according to the scanning sequency of pre-defined rule;
The second reset cell, if different from the scanning sequency of described pre-defined rule for the scanning sequency of selecting, after the end of scan, according to the scanning sequency of the scanning sequency of described selection and pre-defined rule, the transformation coefficient block of to be decoded being reset to can be according to the transformation coefficient block of the scanning sequency scanning of selecting.
CN201110076616.3A 2011-02-23 2011-03-29 Method and device for scanning transformation coefficient block Active CN102651816B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110076616.3A CN102651816B (en) 2011-02-23 2011-03-29 Method and device for scanning transformation coefficient block
PCT/CN2012/071432 WO2012113328A1 (en) 2011-02-23 2012-02-22 Method and device for scanning transform coefficient block

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201110043594.0 2011-02-23
CN201110043594 2011-02-23
CN201110076616.3A CN102651816B (en) 2011-02-23 2011-03-29 Method and device for scanning transformation coefficient block

Publications (2)

Publication Number Publication Date
CN102651816A CN102651816A (en) 2012-08-29
CN102651816B true CN102651816B (en) 2014-09-17

Family

ID=46693700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110076616.3A Active CN102651816B (en) 2011-02-23 2011-03-29 Method and device for scanning transformation coefficient block

Country Status (2)

Country Link
CN (1) CN102651816B (en)
WO (1) WO2012113328A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102125601B1 (en) * 2013-07-24 2020-06-22 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 Scanning orders for non-transform coding
CN103561274B (en) * 2013-11-19 2017-02-15 福建师范大学 Video time domain tamper detection method for removing moving object shot by static camera lens
CN104853196B (en) * 2014-02-18 2018-10-19 华为技术有限公司 Decoding method and device
CN108605129A (en) * 2016-01-28 2018-09-28 日本放送协会 Code device, decoding apparatus and program
SG11201806810YA (en) * 2016-02-12 2018-09-27 Huawei Tech Co Ltd Method and apparatus for scan order selection
SG11201806811TA (en) 2016-02-12 2018-09-27 Huawei Tech Co Ltd Method and apparatus for scan order selection
US10382758B2 (en) * 2017-12-15 2019-08-13 Google Llc Transform block-level scan order selection for video coding
CN113453008B (en) * 2020-03-26 2022-08-02 腾讯科技(深圳)有限公司 Video decoding method, video encoding method, related apparatus and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5926574A (en) * 1995-03-17 1999-07-20 Mitsubishi Denki Kabushiki Kaisha Image encoding system
CN1585483A (en) * 2004-06-16 2005-02-23 浙江大学 Method and apparatus for scanning converting coefficient in visual or image compression
CN101325707A (en) * 2007-06-12 2008-12-17 浙江大学 System for encoding and decoding texture self-adaption video

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4460521B2 (en) * 2005-11-07 2010-05-12 日本電信電話株式会社 Orthogonal transform coefficient scanning method, inverse scanning method, scanning device, inverse scanning device, program thereof, and computer-readable recording medium recording the program
US8179974B2 (en) * 2008-05-02 2012-05-15 Microsoft Corporation Multi-level representation of reordered transform coefficients

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5926574A (en) * 1995-03-17 1999-07-20 Mitsubishi Denki Kabushiki Kaisha Image encoding system
CN1585483A (en) * 2004-06-16 2005-02-23 浙江大学 Method and apparatus for scanning converting coefficient in visual or image compression
CN101325707A (en) * 2007-06-12 2008-12-17 浙江大学 System for encoding and decoding texture self-adaption video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2007-129612A 2007.05.24

Also Published As

Publication number Publication date
WO2012113328A1 (en) 2012-08-30
CN102651816A (en) 2012-08-29

Similar Documents

Publication Publication Date Title
CN102651816B (en) Method and device for scanning transformation coefficient block
CN101965734B (en) Method And Apparatus For Image Intra Prediction
CN104539966B (en) Image prediction method and relevant apparatus
CN103348651B (en) Method and device with the converter unit segmentation for reducing complexity
US10003792B2 (en) Video encoder for images
CN103096055B (en) The method and apparatus of a kind of image signal intra-frame prediction and decoding
CN102970526B (en) A kind of method obtaining transform block size and module
CN104935930B (en) Image decoding apparatus
CN102611884B (en) Image encoding and decoding method and encoding and decoding device
CN107046645B9 (en) Image coding and decoding method and device
CN103096053B (en) A kind of decoding method of pattern conversion and device
CN102752596B (en) Rate distortion optimization method
CN105338348A (en) Method and apparatus for image decoding
CN102598663A (en) Method and apparatus for encoding and decoding image by using rotational transform
CN101969561B (en) A kind of intra-frame mode selection method, device and a kind of encoder
KR20110114524A (en) Device, method and program for image prediction encoding, device, method and program for image prediction decoding, and encoding/decoding system and method
CN102845063A (en) An apparatus, a method and a computer program for video coding
CN106412586A (en) Coefficient Tuning in HEVC
CN102595113B (en) Method, device and system for scanning conversion coefficient block
CN102124738B (en) Method for modifying a reference block of a reference image, method for encoding or decoding a block of an image by help of a reference block and device therefore and storage medium or signal carrying a block encoded by help of a modified reference b
CN111654696B (en) Intra-frame multi-reference-line prediction method and device, storage medium and terminal
CN110352599A (en) Method for video processing and equipment
CN104519368A (en) Image encoding and decoding reconstruction methods and devices
CN104702954A (en) Video coding method and device
CN114938449A (en) Intra-frame prediction method, image encoding method, image decoding method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant