![]() Method and apparatus for processing video signal
专利摘要:
A method for decoding an image, according to the present invention, comprises: a step of determining an intra-prediction mode of a current block; determining a first reference sample of a prediction object sample included in the current block, based on the intra-prediction mode; generating a first prediction sample for the prediction object sample by using the first reference sample; and generating a second prediction sample for the prediction object sample by using the first prediction sample and a second reference sample in a position different from the first reference sample. 公开号:ES2711473A2 申请号:ES201990023 申请日:2017-09-20 公开日:2019-05-03 发明作者:Bae Keun Lee 申请人:KT Corp; IPC主号:
专利说明:
[0001] [0002] Method and apparatus to process a video signal. [0003] [0004] Technical field [0005] [0006] The present invention relates to a method and an apparatus for processing a video signal. [0007] [0008] Background of the technique [0009] [0010] Recently, the demand for high-resolution, high-quality images such as high-definition (HD) images and ultra-high definition (UHD) images has increased in several fields of application. However, image data of higher resolution and quality have increasing amounts of data compared to conventional image data. Therefore, when transmitting image data using a medium such as conventional and wireless broadband networks, or when image data is stored using a conventional storage medium, transmission and storage costs increase. To solve these problems that occur with an increase in the resolution and quality of the image data, high efficiency image coding / decoding techniques can be used. [0011] [0012] The image compression technology includes several techniques, among them: a prediction interprediction technique of a pixel value included in a current image from a previous or subsequent image of the current image; an intra-prediction technique of predicting a pixel value included in a current image using pixel information in the current image; an entropy coding technique of assigning a short code to a value with a high occurrence frequency and assigning a long code to a value with a low occurrence frequency; etc. The image data can be effectively compressed by the use of said image compression technology, and can be transmitted or stored. [0013] [0014] Meanwhile, with the demand for high-resolution images, the demand for stereographic image content, which is a new service of images, has also increased. A video compression technique is being discussed to effectively provide stereographic image content with high resolution and ultra high resolution. [0015] [0016] Divulgation [0017] [0018] Technical problem [0019] [0020] An object of the present invention is to provide a method and an apparatus for efficiently performing the intra-prediction for an objective coding / decoding block in the encoding / decoding of a video signal. [0021] [0022] An object of the present invention is to provide a method and an apparatus for performing an intra-prediction through a weighted prediction using a plurality of reference samples in the encoding / decoding of a video signal. [0023] [0024] The technical objectives to be achieved by the present invention are not limited to the technical problems mentioned above. And other technical problems that are not mentioned will be understood in an evident manner for experts in the field from the following description. [0025] [0026] Technical solution [0027] [0028] A method and apparatus for decoding a video signal according to the present invention can determine a mode of intra-prediction of a current block, determine, based on the intra-prediction mode, a first reference sample of a prediction target sample included in the current block, generate a first prediction sample for the objective sample of prediction using the first reference sample, and generate a second sample of prediction for the objective sample of prediction using the first sample of prediction and a second sample of reference located in a different position of the first reference sample. [0029] [0030] A method and apparatus for encoding a video signal in accordance with the present invention they can determine a mode of intra-prediction of a current block, determine, based on the intra-prediction mode, a first reference sample of a prediction target sample included in the current block, generate a first sample of prediction for the sample prediction objective using the first reference sample, and generating a second prediction sample for the prediction objective sample using the first prediction sample and a second reference sample located in a different position from the first reference sample. [0031] [0032] In the method and apparatus for encoding / decoding a video signal according to the present invention, the second reference sample may comprise at least one of a reference sample that lies on the same horizontal line as the prediction target sample. or a reference sample that is in the same vertical line as the objective sample of prediction. [0033] [0034] In the method and apparatus for encoding / decoding a video signal according to the present invention, each of the first reference sample and the second reference sample can be adjacent to different limits of the current block. [0035] [0036] In the method and apparatus for encoding / decoding a video signal according to the present invention, a position of the second reference sample can be determined based on a directionality of the intra-prediction mode. [0037] [0038] In the method and apparatus for encoding / decoding a video signal according to the present invention, the second prediction sample can be generated based on a weighted sum of the first prediction sample and the second reference sample. [0039] [0040] In the method and apparatus for encoding / decoding a video signal according to the present invention, the weights applied to each of the first prediction sample and the second reference sample can be determined based on a position of the first reference sample and a position of the second reference sample. [0041] In the method and apparatus for encoding / decoding a video signal according to the present invention, if the second prediction sample is generated it can be determined according to a directionality of the intra-prediction mode. [0042] [0043] The features briefly summarized above for the present invention are only illustrative aspects of the detailed description of the invention which follows, but do not limit the scope of the invention. [0044] [0045] Advantageous effects [0046] [0047] According to the present invention, an intra-prediction can be effected efficiently for a target coding / decoding block. [0048] [0049] According to the present invention, intra-prediction can be performed based on a weighted prediction using a plurality of reference samples. [0050] [0051] The effects obtainable by the present invention are not limited to the effects mentioned above, and other effects not mentioned can be clearly understood by those skilled in the art from the following description. [0052] [0053] Description of the drawings [0054] [0055] Figure 1 is a block diagram illustrating a device for encoding a video according to an embodiment of the present invention. [0056] Figure 2 is a block diagram illustrating a device for decoding a video according to an embodiment of the present invention. [0057] Figure 3 is a diagram illustrating an example of a hierarchical partition of an encoding block based on a tree structure according to an embodiment of the present invention. [0058] Figure 4 is a diagram illustrating a type of partition in which binary tree-based partitioning is allowed according to an embodiment of the present invention. [0059] Fig. 5 is a diagram illustrating an example in which only a binary tree-based partition of a predetermined type according to an embodiment of the present invention is allowed. [0060] Figure 6 is a diagram for explaining an example in which the information related to the allowed number of binary tree partition is encoded / decoded, according to an embodiment to which the present invention is applied. [0061] Figure 7 is a diagram illustrating a partition mode applicable to a coding block according to an embodiment of the present invention. [0062] Fig. 8 is a diagram illustrating types of predefined intraprediction modes for a device for encoding / decoding a video according to an embodiment of the present invention. [0063] Fig. 9 is a diagram illustrating a type of extended intraprediction modes according to an embodiment of the present invention. [0064] Fig. 10 is a flow chart briefly illustrating an intraprediction method according to an embodiment of the present invention. [0065] Fig. 11 is a diagram illustrating a method of correcting a prediction sample of a current block based on differential information from neighboring samples according to an embodiment of the present invention. [0066] Figures 12 and 13 are diagrams illustrating a method for correcting a prediction sample based on a predetermined correction filter according to an embodiment of the present invention. [0067] Figure 14 shows a range of reference samples for intraprediction according to an embodiment to which the present invention is applied. [0068] Figures 15 to 17 illustrate an example of filtering in reference samples according to an embodiment of the present invention. [0069] Figure 18 is a diagram showing an example of deriving a right reference sample or a lower reference sample using a plurality of reference samples. [0070] Figures 19 and 20 are diagrams for explaining a determination of a right reference sample and a lower reference sample for a non-square block, according to an embodiment of the present invention. [0071] Figures 21 and 22 are diagrams illustrating a one-dimensional reference sample group in which the reference samples are rearranged in an ifnea. [0072] Figure 23 is a diagram for expirating a distance between a first reference sample and a prediction target sample. [0073] Figures 24 and 25 are diagrams showing the positions of a first reference sample and a second reference sample. [0074] Figure 26 is a diagram showing the positions of a first reference sample and a second reference sample. [0075] Figure 27 is a flow diagram that shows processes of obtaining a residual sample according to a reaiization to which the present invention is applied. [0076] [0077] Mode of the invention [0078] [0079] A variety of modifications can be made to the present invention and there are several embodiments of the present invention, the examples of which will now be provided with reference to the drawings and will be described in detail. However, the present invention is not limited thereto, and exemplary embodiments may be construed as including all modifications, equivalents or substitutes in a technical concept and a technical aspect of the present invention. The similar reference numbers refer to the similar item described in the drawings. [0080] [0081] The terms used in the memory, "first", "second", etc. they can be used to describe several components, but the components should not be considered as limited to the terms. The terms are used to distinguish a component from another component. For example, the "first" component may be referred to as the "second" component without departing from the scope of the present invention, and the "second" component may also be referred to in a manner similar to the "first" component. The term 'and / or' includes a merger of a quantity of elements or any of a number of terms. [0082] [0083] It will be understood that when one refers simply to an element as 'connected to' or 'gathered to' another element without being 'directly connected to' or 'directly coupled to' another element in the present description, it can be 'directly connected to' or 'directly harvested to' another element or be connected or stored to another element, having the other element that intervenes between them. In contrast, it should be understood that when an element is referred to as "directly coupled" or "directly connected" to another element, there are no intervening elements present. [0084] [0085] The terms used in the present specification are simply used to describe particular embodiments, and are not intended to limit the present invention. An expression used in the singular covers the expression of the plural, unless it has a clearly different meaning in the context. In the present specification, it should be understood that terms such as "including", "having", etc. they intend to indicate the existence of the characteristics, numbers, stages, actions, elements, parts or combinations thereof described in the report, and do not intend to exclude the possibility that one or more characteristics, numbers, stages, actions, elements, parts or combinations thereof may exist or be added. [0086] [0087] Next, they will describe preferred embodiments of the present invention in detail with reference to the accompanying drawings. In the following, the same constituent elements in the drawings are indicated with the same reference numbers, and a repeated description of the same elements will be omitted. [0088] [0089] Figure 1 is a block diagram illustrating a device for encoding a video according to an embodiment of the present invention. [0090] Referring to Figure 1, the device 100 for encoding a video may include: an image partitioning module 110, prediction modules 120 and 125, a transformation module 130, a quantization module 135, a reorganization module 160, an entropy coding module 165, an inverse quantization module 140, a reverse transformation module 145, a filter module 150 and a memory 155. [0091] The constituent parts shown in Figure 1 are shown independently to represent different characteristics of each other in the device for encoding a video. Therefore, it does not mean that each constituent part is constituted in a separate hardware or software constituent unit. In other words, each constituent part includes each of the constituent parts listed for convenience. Therefore, at least two constituent parts of each constituent part can be combined to form a constituent part or a constituent part can be divided into a plurality of constituent parts to perform each function. The embodiment in which each constituent part and the embodiment in which a constituent part is divided are also included in the scope of the present invention, if they do not depart from the essence of the present invention. [0092] [0093] In addition, some of the constituents may not be indispensable constituents that perform essential functions of the present invention, but may be selective constituents that improve only the performance thereof. The present invention can be implemented by including only the essential constituent parts to implement the essence of the present invention, except the constituents used to improve performance. The structure that includes only the indispensable constituents, except the selective constituents used to improve only the performance, is also included in the scope of the present invention. [0094] [0095] The image partitioning module 110 can divide an input image into one or more processing units. Here, the processing unit can be a prediction unit (PU), a transformation unit (TU) or a coding unit (CU). The image partitioning module 110 can divide an image into combinations of multiple coding units, prediction units and transformation units, and can encode an image by selecting a fusion of coding units, prediction units and transformation units with a criterion default (for example, depending on the cost). [0096] [0097] For example, an image can be divided into several coding units. A recursive tree structure, such as a quadruple tree structure, can be used to divide an image into coding units. A coding unit that is divided into other coding units with an image or a larger coding unit as a root may be partitioned with secondary nodes corresponding to the number of partitioned coding units. A coding unit that is no longer partitioned by a predetermined constraint serves as a leaf node. That is, when it is assumed that only a square partition is possible for a coding unit, a coding unit can be divided as a maximum in four other coding units. [0098] [0099] Hereinafter, in the embodiment of the present invention, the coding unit may mean a unit carrying out the coding, or a unit performing the decoding. [0100] [0101] A prediction unit can be one of the partitions divided into a square or rectangular shape that has the same size in a single coding unit, or a prediction unit can be one of the partitioned partitions to have a different shape / size in one single coding unit. [0102] [0103] When a prediction unit subjected to intra-prediction is generated based on a coding unit and the coding unit is not the smallest coding unit, the intra-prediction can be performed without dividing the coding unit into multiple prediction units NxN. [0104] [0105] The prediction modules 120 and 125 may include an interpredication module 120 performing the interprediction and an intrapredication module 125 which performs the intraprediction. It can be determined whether to perform interprediction or intraprediction for the prediction unit, and detailed information (for example, an intraprediction mode, a motion vector, a reference image, etc.) according to each prediction method. Here, the processing unit subject to prediction may be different from the processing unit for which the prediction method and detailed content is determined. For example, the prediction method, the prediction mode, etc. they can be determined by the prediction unit, and the transformation unit can perform the prediction. A residual value (residual block) can be entered between the generated prediction block and an original block to the transformation module 130. In addition, the information of the prediction mode, the information of the motion vector, etc. used for the prediction can be encoded with the residual value by the entropy coding module 165 and can be transmitted to a device to decode a video. When a particular coding mode is used, it is possible to transmit to a device to decode video by encoding the original block as it is without generating the prediction block through the prediction modules 120 and 125. [0106] The interpredication module 120 can predict the prediction unit based on the information of at least one of a previous image or a subsequent image of the current image, or it can predict the prediction unit based on the information of some regions encoded in the image current, in some cases. The interpredication module 120 may include an interpolation module of reference images, a motion prediction module and a motion compensation module. [0107] [0108] The reference image interpolation module may receive reference image information from the memory 155 and may generate pixel information of a whole pixel or less than the entire pixel of the reference image. In the case of light pixels, an interpolation filter based on 8-lead DCT with different filter coefficients can be used to generate pixel information of a whole pixel or less than an integer pixel in units of 1/4 pixel. In the case of chromatic signals, an interpolation filter based on 4-lead DCT having a different filter coefficient can be used to generate pixel information of one whole pixel or less than one whole pixel in units of 1/8 pixel . [0109] [0110] The motion prediction module can perform the prediction of movement based on the reference image interpolated by the reference image interpolation module. As methods to calculate a motion vector, several methods can be used, such as a block matching algorithm based on full search (FBMA), a three-stage search (TSS), a new three-stage search algorithm (NTS) ), etc. The motion vector can have a motion vector value in units of 1/2 pixel or 1/4 pixel based on an interpolated pixel. The motion prediction module can predict a current prediction unit by changing the motion prediction method. Various methods can be used as motion prediction methods, such as the omission method, the fusion method, the AMVP (Advanced motion vector prediction) method, the intrablock copy method, etc. [0111] [0112] The intra-prediction module 125 can generate a prediction unit based on reference pixel information adjacent to a current block which is pixel information in the current image. When the neighbor block of the current prediction unit is a block subjected to interprediction and, therefore, a reference pixel is a pixel subjected to interprediction, the reference pixel included in the block subjected to interprediction can be replaced by pixel information of reference of a neighboring block subject to intraprediction. That is, when a reference pixel is not available, at least one reference pixel of available reference pixels can be used in place of non-available reference pixel information. [0113] [0114] Prediction modes in intraprediction can include a directional prediction mode that uses reference pixel information depending on the direction of the prediction and a non-directional prediction mode that does not use directional information to make the prediction. A mode for predicting luma information may be different in a way to predict chroma information, and to predict chroma information one may use the information of the intra-prediction mode used to predict the luma information or the signal information of the luma. Luma predicted. [0115] [0116] When performing the intraprediction, when the size of the prediction unit is the same as the size of the transformation unit, the intra prediction can be made in the prediction unit depending on the pixels located on the left, the upper left and the top of the prediction unit. However, when performing the intra-prediction, when the size of the prediction unit is different from the size of the transformation unit, the intra-prediction can be performed using a reference pixel based on the transformation unit. In addition, intra-prediction using an NxN partition can be used only for the smallest coding unit. [0117] [0118] In the intraprediction method, a prediction block can be generated after applying an AIS filter (intra-adaptive smoothing) at a reference pixel as a function of the prediction modes. The type of AIS filter applied to the reference pixel may vary. To perform the intra-prediction method, an intra-prediction mode of the current prediction unit can be predicted from the intra-prediction mode of the prediction unit adjacent to the current prediction unit. In predicting the prediction mode of the current prediction unit by using information from mode predicted from the neighboring prediction unit, when the intra prediction mode of the current prediction unit is the same as the intra prediction mode of the neighboring prediction unit, the information indicates that the prediction modes of the current prediction unit and the neighboring prediction unit are equal to each other can be transmitted using predetermined signaling information. When the prediction mode of the current prediction unit is different from the prediction mode of the neighboring prediction unit, the entropy coding can be performed to encode the prediction mode information of the current block. [0119] [0120] In addition, a residual block that includes information about a residual value that is different between the prediction unit under prediction and the original block of the prediction unit can be generated based on the prediction units generated by the prediction modules 120 and 125. The residual block generated can be introduced into the transformation module 130. [0121] [0122] The transformation module 130 can transform the residual block including the residual value information between the original block and the prediction unit generated by the prediction modules 120 and 125 by the use of a transformation method, such as discrete transform of cosine (DCT), discrete sine transform (DST), and KLT. The application of DCT, DST or KLT to transform the residual block can be determined as a function of the information of the intra-prediction mode of the prediction unit used to generate the residual block. [0123] The quantization module 135 can quantize the transformed values in a frequency domain by the transformation module 130. The quantization coefficients may vary according to the block or the importance of an image. The values calculated by the quantization module 135 can be provided to the inverse quantization module 140 and the reorganization module 160. [0124] [0125] The reorganization module 160 can rearrange the coefficients of the quantized residual values. [0126] [0127] The reorganization module 160 can change a coefficient in the form of a two-dimensional block into a coefficient in the form of a vector one-dimensional through a method of coefficient exploration. For example, the reorganization module 160 may scan from a DC coefficient to a coefficient in a high frequency domain using a zigzag scanning method to change the coefficients to be in the form of one-dimensional vectors. According to the size of the unit of transformation and the mode of intraprediction, the exploration in vertical direction where the coefficients are explored in the form of two-dimensional blocks in the direction of the column or the exploration in horizontal direction where the coefficients in the form of blocks are explored two-dimensional, you can use the direction of the row instead of the zigzag scan. That is to say, the method of exploration between zigzag, exploration in vertical direction and exploration in horizontal direction can be determined according to the size of the unit of transformation and the mode of intraprediction. [0128] [0129] The entropy coding module 165 can perform the entropy coding based on the values calculated by the reorganization module 160. The entropy coding can use several coding methods, for example, exponential Golomb coding, variable length coding adapted to context (CAVLC) and coding of binary arithmetic adapted to the context (CABAC). [0130] [0131] The entropy coding module 165 may encode a variety of information, such as residual value coefficient information and block type information of the coding unit, prediction mode information, partition unit information, unit information prediction, transformation unit information, motion vector information, reference frame information, block interpolation information, filtering information, etc. of the reorganization module 160 and the prediction modules 120 and 125. [0132] [0133] The entropy coding module 165 can encode by entropy the input coefficients of the coding unit of the reorganization module 160. [0134] [0135] The inverse quantization module 140 can quantize inversely the values quantized by the quantization module 135 and the inverse transformation module 145 can inversely transform the values transformed by the transformation module 130. The residual value generated by the inverse quantization module 140 and the inverse transformation module 145 can be combined with the prediction unit predicted by a motion estimation module, a motion compensation module and the intraprediction module of the prediction modules 120 and 125, so that a reconstructed block can be generated. [0136] [0137] The filter module 150 may include at least one of a deblocking filter, a displacement correction unit and an adaptive loop filter (ALF). [0138] [0139] The unblocking filter can eliminate the distortion of the block that occurs due to the limits between the blocks in the reconstructed image. To determine if the unblocking should be performed, the pixels included in several rows or columns in the block can be a basis for determining if the unblocking filter is applied to the current block. When the unblocking filter is applied to the block, a strong filter or a weak filter can be applied depending on the required unlocking filtering force. In addition, when applying the unblocking filter, filtering in horizontal direction and filtering in vertical direction can be processed in parallel. [0140] [0141] The offset correction module can correct the offset with the original image in units of one pixel in the image subject to unlocking. To perform offset correction on a particular image, it is possible to use a method to apply the offset in consideration of the edge information of each pixel or a pixel partitioning method of an image in the predetermined number of regions, determining a region that is subject to carry out a displacement, and apply the displacement to the determined region. [0142] [0143] Adaptive loop filtering (ALF) can be performed according to the value obtained when comparing the filtered reconstructed image and the original image. The pixels included in the image can be divided into predefined groups, a filter can be determined that will be applied to each of the groups and an individual filtering can be performed for each group. The information on whether to apply ALF and a light signal can be transmitted by coding units (CU). The shape and filter coefficient of a filter for ALF can vary depending on each block. In addition, the filter for ALF in the same form (fixed form) can be applied independently of the characteristics of the destination block of the application. [0144] [0145] The memory 155 may store the reconstructed block or the image calculated through the filter module 150. The stored reconstructed block or image may be provided to the prediction modules 120 and 125 to perform the interprediction. [0146] [0147] Figure 2 is a block diagram illustrating a device for decoding a video according to an embodiment of the present invention. [0148] [0149] Referring to Figure 2, the device 200 for decoding a video may include: an entropy decoding module 210, a reorganization module 215, a reverse quantization module 220, a reverse transformation module 225, prediction modules 230 and 235, a filter module 240 and a memory 245. [0150] [0151] When a bit stream of video is input from the device to encode a video, the input bitstream can be decoded according to a reverse process of the device to encode a video. [0152] [0153] The entropy decoding module 210 can perform the entropha decoding according to an inverse entropy coding process of the entropy coding module of the device to encode a video. For example, according to the methods performed by the device to encode a video, several methods can be applied, such as Golomb's exponential coding, context-adapted variable length coding (CAVLC) and binary arithmetic coding adapted to the context (CABAC). ). [0154] [0155] The entropy decoding module 210 can decode information about the intraprediction and interprediction performed by the device to encode a video. [0156] [0157] The reorganization module 215 can perform a reorganization in the entropy of the bit stream decoded by the decoding module of entropfa 210 based on the reorganization method used in the device to encode a video. The reorganization module can reconstruct and reorganize the coefficients in the form of one-dimensional vectors to the coefficient in the form of two-dimensional blocks. The reorganization module 215 can receive information related to the scanning of coefficients performed in the device to encode a video and can perform a reorganization through a method of inverse exploration of the coefficients according to the order of scanning performed in the device to encode a video. [0158] [0159] The inverse quantization module 220 can perform an inverse quantization based on a quantization parameter received from the device to encode a video and the reorganized coefficients of the block. [0160] [0161] The inverse transformation module 225 can perform the inverse transformation, that is, inverse DCT, inverse DST and inverse KLT, which is the inverse process of transformation, ie, DCT, DST and KLT, performed by the transformation module in the result of quantification by the device to encode a video. The inverse transformation can be performed as a function of a transfer unit determined by the device to encode a video. The reverse transform module 225 of the device for decoding a video can selectively perform transformation schemes (eg, DCT, DST and KLT) depending on multiple data, such as the prediction method, the size of the current block, the prediction address, etc. [0162] [0163] The prediction modules 230 and 235 can generate a prediction block based on information about the prediction block generation received from the entropy decoding module 210 and the previously decoded image or block information received from the memory 245. [0164] [0165] As described above, like the operation of the device to encode a video, when performing the intra-prediction, when the size of the prediction unit is the same as the size of the transformation unit, the intra-prediction can be performed in the unit of prediction depending on the pixels located on the left, top left and top of the prediction unit. When performing the intraprediction, when the size of the prediction unit is different from the size of the transformation unit, the intra-prediction can be performed using a reference pixel based on the transformation unit. In addition, intra-prediction using an NxN partition can be used only for the smallest coding unit. [0166] [0167] The prediction modules 230 and 235 may include a prediction unit determination module, an interpredication module and an intrapredication module. The determination module of the prediction unit may receive a variety of information, such as information of the prediction unit, information of the prediction mode of an intraprediction method, information on the prediction of movement of an interprediction method, etc. From the entropy decoding module 210, it can divide a current coding unit into prediction units, and can determine if interprediction or intraprediction is performed in the prediction unit. By using the information required in the interprediction of the current prediction unit received from the device for encoding a video, the interpredication module 230 can perform the interprediction in the current prediction unit according to the information of at least one previous image or a subsequent image of the current image, including the current prediction unit. Alternatively, interprediction can be performed based on the information of some prereconstructed regions in the current image, including the current prediction unit. [0168] [0169] To perform the interprediction, it can be determined for the coding unit which of a hop mode, a fusion mode, an AMVP mode and a block copy mode is used as a prediction method of movement of the prediction unit included in the coding unit. [0170] [0171] The intrapredication module 235 can generate a prediction block based on pixel information in the current image. When the prediction unit is a prediction unit subject to intra-prediction, the intra-prediction can be performed based on the information of the prediction mode of the prediction unit received from the device to encode a video. The intrapredication module 235 may include an intra-adaptive smoothing filter (AIS), a reference pixel interpolation module and a DC filter. The AIS filter performs filtering in the pixel of reference of the current block, and the filter application can be determined according to the prediction mode of the current prediction unit. The AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit and the AIS filter information received from the device to encode a video. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied. [0172] [0173] When the prediction mode of the prediction unit is a prediction mode in which the intra-prediction is performed as a function of the pixel value obtained by interpolating the reference pixel, the reference pixel interpolation module can interpolate the reference pixel to generate the reference pixel of a whole pixel or less than a whole pixel. When the prediction mode of the current prediction unit is a prediction mode in which a prediction block is generated without interpolation of the reference pixel, the reference pixel can not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is a CC mode. [0174] [0175] The reconstructed block or image can be provided to the filter module 240. The filter module 240 can include the unlock filter, the offset correction module and the ALF. [0176] [0177] Information on whether or not the unlock filter applies to the corresponding block or image, and information on which strong and weak filters are applied when the unlock filter is applied can be received from the device to encode a video. The unlock filter of the device for decoding a video can receive information about the unlock filter of the device for encoding a video, and can perform a unlock filtering in the corresponding block. [0178] [0179] The offset correction module may perform the offset correction on the reconstructed image based on the type of offset correction and the offset value information applied to an image when performing the coding. [0180] [0181] The ALF can be applied to the coding unit as a function of the information on whether to apply the ALF, the information of the ALF coefficient, etc., received from the device to encode a video. The ALF information can be provided as included in a particular set of parameters. [0182] [0183] The memory 245 can store the reconstructed image or block for use as a reference image or block and can provide the reconstructed image to an output module. [0184] [0185] As described above, in the embodiment of the present invention, for convenience of explanation, the coding unit is used as a term that represents a unit for coding, but the coding unit can serve as a unit that performs decoding, as well as coding. [0186] [0187] In addition, a current block can represent an objective block to be encoded / decoded. And, the current block can represent a block of coding tree (or an encoding tree unit), a coding block (or a coding unit), a transformation block (or a transformation unit), a block of prediction (or a prediction unit), or the like, depending on a coding / decoding stage. [0188] [0189] An image can be encoded / decoded by dividing into base blocks that have a square shape or a non-square shape. At this time, the base block can be referred to as a coding tree unit. The coding tree unit can be defined as a coding unit of the largest size allowed within a sequence or segment. The information on whether the encoder tree unit has a square shape or if it has a non-square shape or the information on the size of the encoder tree unit can be signaled through a set of sequence parameters, a set of image parameters or a segment header. The unit of the coding tree can be divided into smaller partitions. At this time, if it is assumed that the depth of a partition generated by dividing the coding tree unit is 1, the depth of a partition generated by dividing the partition having depth 1 can be defined as 2. That is, a partition generated by dividing a partition that has a depth k in the coding tree unit can be defined as having a depth of k + 1. [0190] [0191] An arbitrary size partition generated by dividing an encoding tree unit can be defined as a coding unit. The coding unit can be recursively divided or divided into base units to perform prediction, quantization, transformation or loop filtering, and the like. For example, a partition of arbitrary size generated by dividing the coding unit can be defined as a unit of coding, or it can be defined as a unit of transformation or a unit of prediction, which is a base unit for making the prediction, quantification , transformation or filtering in loop and the like. [0192] [0193] The partition of a coding tree unit or a coding unit may be performed based on at least one of a vertical line and a horizontal line. In addition, the number of vertical lines or horizontal lines dividing the coding tree unit or the coding unit may be at least one or more. For example, the unit of the coding tree or the coding unit can be divided into two partitions using a vertical line or a horizontal line, or the unit of the coding tree or the coding unit can be divided into three partitions using two lines vertical or two horizontal lines. Alternatively, the unit of the coding tree or the coding unit can be divided into four partitions having a length and a width of 1/2 using a vertical line and a horizontal line. [0194] [0195] When a coding tree unit or a coding unit is divided into a plurality of partitions using at least one vertical line or at least one horizontal line, the partitions may have a uniform size or a different size. Alternatively, any partition may have a different size of the remaining partitions. [0196] [0197] In the embodiments described below, it is assumed that a coding tree unit or a coding unit is divided into a quadruple tree structure or a binary tree structure. However, it is also possible to divide a coding tree unit or a unit of encoding using a greater number of vertical lines or a greater number of horizontal lines. [0198] [0199] Figure 3 is a diagram illustrating an example of a hierarchical partition of an encoding block based on a tree structure according to an embodiment of the present invention. [0200] [0201] An input video signal is decoded in predetermined block units. Such a predetermined unit for decoding the video input signal is a coding block. The coding block can be a unit that performs intra / inter prediction, transformation and quantification. In addition, a prediction mode (eg, intraprediction mode or interprediction mode) is determined in units of a coding block, and the prediction blocks included in the coding block can share the determined prediction mode. The coding block can be a square or non-square block having an arbitrary size in a range of 8x8 to 64x64, or it can be a square or non-square block having a size of 128x128, 256x256 or more. [0202] [0203] Specifically, the coding block can be divided hierarchically as a function of at least one of a quadruple tree and a binary tree. Here, the quadruple tree-based partition can mean that a 2Nx2N coding block is divided into four NxN coding blocks, and the binary tree-based partition can mean that one block of coding is divided into two blocks of coding. Even if binary tree-based partitioning is performed, a block of square-shaped coding can exist in the lower depth. [0204] [0205] The partition based on binary trees can be performed symmetrically or asymmetrically. The block of coding divided according to the binary tree can be a square block or a non-square block, such as a rectangular shape. For example, a partition type in which binary tree-based partitioning is allowed may comprise at least one of a symmetric type of 2NxN (non-square horizontal directional coding unit) or Nx2N (vertical square non-square encoding unit) , asymmetric type of nLx2N, nRx2N, 2NxnU or 2NxnD. [0206] Partition based on binary tree can be allowed in a limited way to a partition of symmetric or asymmetric type. In this case, the construction of the unit of the coding tree with square blocks may correspond to the partition CU of quadruple tree, and the construction of the unit of the coding tree with non-square symmetrical blocks may correspond to the division of binary tree. The construction of the coding tree unit with square blocks and symmetrical non-square blocks may correspond to the CU partition of quadruple and binary tree. [0207] [0208] Partition based on binary tree can be done in a coding block where the quadruple tree-based partition is no longer performed. The quadruple tree-based partition can no longer be performed in the partitioned coding block based on the binary tree. [0209] [0210] In addition, the partition of a lower depth can be determined according to the type of partition of a higher depth. For example, if partition based on binary tree is allowed in two or more depths, only the same type as the binary tree partition of the upper depth in the lower depth can be allowed. For example, if the partition based on the binary tree in the upper depth is done with the type 2NxN, the partition based on the binary tree in the lower depth is also done with the type 2NxN. Alternatively, if the binary tree-based partition in the upper depth is performed with the Nx2N type, the binary tree-based partition in the lower depth is also done with the Nx2N type. [0211] [0212] On the contrary, it is also possible to allow, at a lower depth, only a different type of a binary tree partition of a higher depth. [0213] [0214] It may be possible to limit only a specific type of partition based on binary tree to be used for sequence, segment, coding tree unit or coding unit. As an example, only the 2NxN type or the Nx2N type of binary tree-based partition for the encoding tree unit can be allowed. An available partition type can be predefined in an encoder or a decoder. Or the information about the type of partition available or about the type of partition not available can be encoded and then sent through a bit stream. [0215] Figure 5 is a diagram illustrating an example in which only one specific type of partition based on binary tree is allowed. Figure 5A shows an example in which only the Nx2N type of binary tree-based partition is allowed, and Figure 5B shows an example in which only the 2NxN type of partition based on binary tree is allowed. To implement the adaptive partition based on the quadruple tree or binary tree, you can use the information that indicates the partition based on quadruple tree, the information about the size / depth of the block of coding that the partition based on quadruple tree allows, the information which indicates the partition based on binary tree, the information about the size / depth of the block of coding that allows the partition based on binary tree, the information about the size / depth of the coding block in which the partition based on binary tree, the information on whether the partition based on binary tree is made in a vertical direction or a horizontal direction, etc. [0216] [0217] In addition, information can be obtained on the number of times a binary tree partition is allowed, a depth to which binary tree partitioning is allowed, or the number of depths to which binary tree partitioning is allowed for a coding tree unit or a specific coding unit. The information may be encoded in units of a coding tree unit or a coding unit, and may be transmitted to a decoder through a bit stream. [0218] [0219] For example, a syntax 'max_binary_depth_idx_minus1' indicating a maximum depth to which the partition of the binary tree is allowed can be encoded / decoded through a bit stream. In this case, max_binary_depth_idx_minus1 1 can indicate the maximum depth at which the partition of the binary tree is allowed. [0220] [0221] With reference to the example shown in Figure 6, in Figure 6, the division of the binary tree has been done for a coding unit having a depth of 2 and a coding unit having a depth of 3. Accordingly, at minus one of the data that indicates the number of times the partition of the binary tree has been carried out in the unit of the coding tree (that is, 2 times), the information that indicates the maximum depth at which the partition of the binary tree was allowed in the unit of the coding tree (that is, the depth 3), or the number of depths in which the partition of the binary tree was made in the unit of the tree of encoding (ie, 2 (depth 2 and depth 3)) can be encoded / decoded through a bit stream. [0222] [0223] As another example, at least one of the data on the number of times the partition of the binary tree is allowed, the depth at which the partition of the binary tree is allowed, or the number of depths to which the partition is allowed. of the binary tree can be obtained for each sequence or each sector. For example, the information can be encoded in units of a sequence, an image or a division unit and transmitted through a bit stream. Consequently, at least one of the numbers of the partition of the binary tree in a first segment, the maximum depth in which the partition of the binary tree is allowed in the first segment, or the number of depths in which the partition of the binary tree performed in the first segment can be the difference of a second segment. For example, in the first segment, the binary tree partition can be allowed only for one depth, whereas, in the second segment, the binary tree partition can be allowed for two depths. [0224] [0225] As another example, the number of times the partition of the binary tree is allowed, the depth at which the partition of the binary tree is allowed, or the number of depths to which the partition of the binary tree is allowed can be configured in a different according to a time-level identifier (TemporalID) of a segment or an image. Here, the temporary level identifier (TemporalID) is used to identify each of a plurality of video layers that have a scalability of at least one of view, spatial, temporal or quality. [0226] [0227] As shown in Figure 3, the first coding block 300 with the partition depth (division depth) of k can be divided into multiple second blocks of coding based on the quadruple tree. For example, the second coding blocks 310 to 340 can be square blocks that are half the width and half the height of the first coding block, and the partition depth of the second coding block can be increased to k + 1. . [0228] The second coding block 310 with the partition depth of k + 1 can be divided into multiple third coding blocks with the partition depth of k + 2. The partition of the second coding block 310 can be made using selectively one of the four trees and the binary tree depending on a partitioning method. Here, the partition method can be determined based on at least one of the information indicating the partition based on quadruple trees and the information indicating the partition based on binary trees. [0229] [0230] When the second coding block 310 is divided according to the quadruple tree, the second coding block 310 can be divided into four third coding blocks 310a having half the width and half of the second coding block, and the partition depth of the third coding block 310a can be increased to k + 2. In contrast, when the second coding block 310 is divided as a function of the binary tree, the second coding block 310 can be divided into two third coding blocks. Here, each of the two third coding blocks can be a non-square block having an average width and half the height of the second coding block, and the depth of the partition can be increased to k + 2. The second block of coding can be determined as a non-square block of a horizontal or vertical address that depends on a partition address, and the partition address can be determined according to the information on whether the partition based on binary tree is made in a vertical direction or a horizontal direction. [0231] [0232] Meanwhile, the second coding block 310 can be determined as a leaf coding block that is no longer partitioned as a function of the quadruple tree or the binary tree. In this case, the sheet coding block can be used as a prediction block or a transformation block. [0233] [0234] Like the partition of the second coding block 310, the third coding block 310a can be determined as a sheet coding block, or it can be further divided based on the quadruple tree or the binary tree. [0235] Meanwhile, the third block of coding 310b partitioned based on the binary tree can be further divided into the coding blocks 310b-2 of a vertical direction or the coding blocks 310b-3 of a horizontal direction based on the binary tree, and the Depth of partition of the relevant coding blocks can be increased to k + 3. Alternatively, the third coding block 310b can be determined as a sheet coding block 310b-1 that is no longer partitioned based on the binary tree. In this case, the coding block 310b-1 can be used as a prediction block or a transformation block. However, the above partitioning process can be performed in a limited way depending on at least one of the information about the size / depth of the coding block that allows the partition based on quadruple trees, the information about the size / depth is allowed of the coding block of that binary tree based on the partition, and the information on the size / depth of the coding block of that partition based on binary tree is not allowed. [0236] [0237] A number of a candidate representing a size of a coding block may be limited to a predetermined number, or a size of a coding block in a predetermined unit may have a fixed value. As an example, the size of the coding block in a sequence or in an image can be limited to 256x256, 128x128 or 32x32. The information indicating the size of the block of coding in the sequence or in the image can be indicated by a sequence header or an image header. [0238] [0239] As a result of the partition based on a quadruple tree and a binary tree, a coding unit can be represented as a square or rectangular shape of an arbitrary size. [0240] [0241] A coding block is encoded using at least one of the jump, intraprediction, interprediction or hopping methods. Once a coding block is determined, a prediction block can be determined through the predictive partition of the coding block. The predictive partition of the coding block can be done by means of a partition mode (Part_mode) that indicates a partition type of the coding block. A size or shape of the prediction block can be determine according to the partition mode of the coding block. For example, a size of a prediction block determined according to the partition mode may be equal to or smaller than a size of a coding block. [0242] [0243] Figure 7 is a diagram illustrating a partition mode that can be applied to an encoding block when the coding block is encoded by interprediction. [0244] [0245] When a coding block is encoded by interprediction, one of the 8 partition modes can be applied to the coding block, as in the example shown in Figure 7. [0246] When a coding block is encoded by intra-prediction, a partition mode PART_2Nx2N or a partition mode PART_NxN can be applied to the coding block. [0247] [0248] PART_NxN can be applied when a coding block has a minimum size. Here, the minimum size of the coding block can be predefined in an encoder and a decoder. Or, the information on the minimum size of the coding block can be signaled through a bit stream. For example, the minimum size of the coding block can be signaled through a segment header, so that the minimum size of the coding block can be defined per segment. [0249] [0250] In general, a prediction block can have a size of 64x64 to 4x4. However, when a coding block is encoded by interprediction, it can be restricted that the prediction block does not have a size of 4x4 to reduce the memory bandwidth when motion compensation is performed. [0251] [0252] Figure 8 is a diagram illustrating types of predefined intraprediction modes for a device for encoding / decoding a video according to a realization of the present invention. [0253] [0254] The device for encoding / decoding a video can perform intra-prediction using one of the predefined intra-prediction modes. Predefined intraprediction modes for intraprediction can include non-directional prediction modes (eg, a flat mode, a DC mode) and 33 directional prediction modes. [0255] [0256] Alternatively, to improve the accuracy of the prediction, a greater number of directional prediction modes can be used than the 33 directional prediction modes. That is, the extended directional prediction modes M can be defined by subdividing the angles of the directional prediction modes (M> 33), and a directional prediction mode having a predetermined angle can be derived using at least one of the 33 predefined directional prediction modes. [0257] [0258] A greater number of intra-prediction modes than 35 intra-prediction modes shown in Figure 8 can be used. For example, a greater number of intra-prediction modes may be used than the intra-prediction modes by subdividing the angles of the directional prediction modes or by deriving a directional prediction mode having a predetermined angle using at least one of a predefined number of modes of directional prediction. At this time, the use of a greater number of intraprediction modes than the 35 modes of intraprediction can be referred to as an extended intraprediction mode. [0259] [0260] Figure 9 shows an example of the extended intra-prediction modes, and the extended intra-prediction modes can include two non-directional prediction modes and 65 modes of extended directional prediction. The same numbers of the extended intra-prediction modes can be used for a luminance component and a chroma component, or a different number of intra-prediction modes can be used for each component. For example, 67 extended intra-prediction modes can be used for the luma component, and 35 intra-prediction modes can be used for the chroma component. [0261] [0262] Alternatively, depending on the chroma format, a different number of intraprediction modes may be used to perform the intraprediction. For example, in the case of the 4: 2: 0 format, 67 intra-prediction modes can be used for the luma component to perform the intra-prediction and 35 intra-prediction modes can be used for the chroma component. In the case of the 4: 4: 4 format, 67 intra-prediction modes can be used, both for the luma component as for the chroma component to perform the intraprediction. [0263] [0264] Alternatively, depending on the size and / or shape of the block, a different number of intraprediction modes may be used to perform the intraprediction. That is, depending on the size and / or shape of the PU or CU, 35 modes of intraprediction or 67 modes of intraprediction can be used to perform the intraprediction. For example, when the CU or PU has a size smaller than 64x64 or is asymmetrically divided, 35 intra-prediction modes can be used to perform the intra-prediction. When the size of the CU or PU is equal to or greater than 64x64, 67 intra-prediction modes can be used to perform the intraprediction. 65 ways of directional intra-prediction can be allowed for Intra_2Nx2N, and only 35 modes of directional intra-prediction can be allowed for Intra_NxN. [0265] [0266] The size of a block to which the extended intra-prediction mode is applied can be configured differently for each sequence, image or segment. For example, it is stated that the extended intra-prediction mode is applied to a block (eg, CU or PU) that is larger than 64x64 in the first division. On the other hand, it is established that the extended intra-prediction mode is applied to a block that has a size greater than 32x32 in the second segment. The information representing a size of a block to which the extended intra-prediction mode is applied can be signaled in units of a sequence, an image or a segment. For example, the information indicating the size of the block to which the extended intra-prediction mode applies can be defined as 'log2_extended_intra_mode_size_minus4' obtained by taking a logarithm of the block size and then subtracting the whole number 4. For example, if a value of log2_extended_intra_mode_size_minus4 is 0, it can indicate that the extended intraprediction mode can be applied to a block that has a size equal to or greater than 16x16. And if a value of log2_extended_intra_mode_size_minus4 is 1, it can indicate that the extended intraprediction mode can be applied to a block that has a size equal to or greater than 32x32. [0267] [0268] As described above, the number of intra-prediction modes can be determined by considering at least one of a color component, a chroma format and a size or shape of a block. In addition, the number of candidates for intra-prediction mode (eg, the number of MPM) used to determine an intra-prediction mode of a current block for encoding / decoding can also be determined according to at least one of a color component, a color format, and the size or shape of a block. The drawings will describe a method for determining an intra-prediction mode of a current block for encoding / decoding and a method for performing an intra-prediction using the determined intra-prediction mode. [0269] [0270] Fig. 10 is a flow chart briefly illustrating an intraprediction method according to an embodiment of the present invention. [0271] Referring to Figure 10, an intra-prediction mode of the current block can be determined in step S1000. [0272] [0273] Specifically, the intra-prediction mode of the current block can be derived based on a candidate list and an index. Here, the candidate list contains multiple candidates, and the multiple candidates can be determined in function of an intra-prediction mode of the neighboring block adjacent to the current block. The neighboring block can include at least one of the blocks located at the top, the bottom, the left, the right and the corner of the current block. The index can specify one of the multiple candidates from the list of candidates. The candidate specified by the index can be set in the intra-prediction mode of the current block. [0274] [0275] An intra-prediction mode used for intra-prediction in the neighboring block can be established as a candidate. In addition, an intra-prediction mode having similar directionality to that of the intra-prediction mode of the neighboring block can be established as a candidate. Here, the intra-prediction mode having a similar directionality can be determined by adding or subtracting a predetermined constant value to or from the intra-prediction mode of the neighboring block. The predetermined constant value can be an integer number, such as one, two or more. [0276] [0277] The candidate list may also include a predetermined mode. The default mode can include at least one of a flat mode, a DC mode, a vertical mode and a horizontal mode. The default mode can be add in an adaptive way taking into account the maximum number of candidates that can be included in the list of candidates of the current block. [0278] [0279] The maximum number of candidates that can be included in the list of candidates can be three, four, five, six or more. The maximum number of candidates that can be included in the candidate list can be a pre-established value in the device for encoding / decoding a video, or it can be determined in a variable manner according to a characteristic of the current block. The characteristic can mean the location / size / shape of the block, the number / type of intraprediction modes that the block can use, a type of color, a color format, etc. Alternatively, information indicating the maximum number of candidates that can be included in the candidate list can be noted separately, and the maximum number of candidates that can be included in the candidate list can be determined in a variable way using the information. The information indicating the maximum number of candidates can be indicated in at least one of a sequence level, an image level, a division level and a block level. [0280] [0281] When the extended intra-prediction modes and the predefined intra-prediction modes are selectively used, the intra-prediction modes of the neighboring blocks can be transformed into indices corresponding to the extended intra-predictive modes, or in indices corresponding to the intra-predictive modes 35, thus Candidates can be derived. For transformation to an index, a predefined table can be used, or a scale operation based on a predetermined value can be used. Here, the predefined table can define a mapping relationship between different groups of intraprediction modes (for example, extended intraprediction modes and 35 intraprediction modes). [0282] [0283] For example, when the left neighbor block uses the 35 intraprediction modes and the intraprediction mode of the left neighbor block is 10 (a horizontal mode), it can be transformed into an index of 16 corresponding to a horizontal mode in the extended intraprediction modes. [0284] [0285] Alternatively, when the upper neighbor block uses the extended intra-predictive modes and the intra-predictive mode, the upper neighboring block has an index of 50 (a vertical mode), it can be transformed into a index of 26 corresponding to a vertical mode in the 35 modes of intraprediction. [0286] [0287] Based on the method described above for determining the intra-prediction mode, the intra-prediction mode can be derived independently for each component of the luminance and the chroma component, or the intra-prediction mode of the chroma component can be derived depending on the intra-prediction mode of the component. luma [0288] Specifically, the intra-prediction mode of the chroma component can be determined as a function of the intra-prediction mode of the luma component as shown in the following Table 1. [0289] [0290] [0291] [0292] [0293] In Table 1, intra_chroma_pred_mode means information signaled to specify the intra-prediction mode of the chroma component, and IntraPredModeY indicates the intra-prediction mode of the luma component. [0294] [0295] With reference to Figure 10, a reference sample can be derived for the intra-prediction of the current block in step S1010. [0296] [0297] Specifically, a reference sample for intraprediction can be derived based on a neighbor sample of the current block. The neighbor sample may be a reconstructed sample of the neighbor block, and the reconstructed sample may be a reconstructed sample before a loop filter or reconstructed sample is applied after the loop filter is applied. [0298] [0299] A neighbor sample reconstructed before the current block can be used as a reference sample, and a neighbor sample filtered based on a filter Default internal can be used as a reference sample. Filtering neighboring samples using an intra filter can also be referred to as smoothing reference samples. The intra filter may include at least one of the first intra filters applied to multiple neighboring samples located on the same horizontal line and the second intra filter applied to multiple neighboring samples located on the same vertical line. Depending on the positions of the neighboring samples, one of the first intra filter and the second intra filter can be selectively applied, or both intra filters can be applied. At this time, at least one filter coefficient of the first intra filter or the second intra filter can be (1,2, 1), but is not limited thereto. [0300] [0301] The filtering can be performed adaptively as a function of at least one of the intra-prediction modes of the current block and the size of the transformation block for the current block. For example, when the intra-predictive mode of the current block is DC mode, vertical mode or horizontal mode, filtering may not be performed. When the size of the transformation block is NxM, filtering can not be performed. Here, N and M can be the same values or different values, or they can be values of 4, 8, 16 or more. For example, if the size of the transformation block is 4x4, filtering can not be performed. Alternatively, the filtering can be performed selectively as a function of the result of a comparison of a predefined threshold and the difference between the intra-prediction mode of the current block and the vertical mode (or the horizontal mode). For example, when the difference between the intra-prediction mode of the current block and the vertical mode is greater than a threshold, filtering can be performed. The threshold can be defined for each size of the transformation block as shown in Table 2. [0302] T l 2 [0303] [0304] [0305] [0306] [0307] The internal filter can be determined as one of the multiple internal filter candidates predefined in the device to encode / decode a video. For this purpose, an index can be indicated that specifies an internal filter of the current block among the multiple candidates of internal filter. Alternatively, the intra filter can be determined based on at least one of the sizes / shapes of the current block, the size / shapes of the Transformation block, the information about the intensity of the filter and the variations of the neighboring samples. [0308] [0309] Referring to Figure 10, the intra-prediction can be performed using the intra-prediction mode of the current block and the reference sample in step S1020. [0310] [0311] That is, the prediction sample of the current block can be obtained using the intra-prediction mode determined in step S1000 and the reference sample derived in step S1010. However, in the case of intra-prediction, a delimiting sample of the neighboring block may be used and, therefore, the quality of the prediction image may decrease. Therefore, a correction process can be performed on the prediction sample generated through the prediction process described above, and will be described in detail with reference to figures 11 to 13. However, the correction process is not limited to be applied only to the sample of intraprediction, and may be applied to a sample of interprediction or the reconstructed sample. [0312] [0313] Fig. 11 is a diagram illustrating a method of correcting a prediction sample of a current block based on differential information from neighboring samples according to an embodiment of the present invention. [0314] [0315] The prediction sample of the current block can be corrected based on the differential information of multiple neighboring samples for the current block. The correction can be made in all the prediction samples in the current block, or it can be done in prediction samples in predetermined partial regions. The partial regions may be a row / column or multiple rows / columns, and these may be preset regions for correction in the device to encode / decode a video. For example, the correction can be made in a row / column located in a limit of the current block or can be made in a plurality of rows / columns from a limit of the current block. Alternatively, the partial regions can be determined variably depending on at least one of the sizes / shapes of the current block and the intra-prediction mode. [0316] [0317] Neighboring samples may belong to neighboring blocks located in the upper part, left and in the upper left corner of the current block. The number of neighboring samples used for correction can be two, three, four or more. The positions of the neighboring samples can be determined in a variable manner depending on the position of the prediction sample which is the correction target in the current block. Alternatively, some of the neighboring samples may have fixed positions regardless of the position of the prediction sample which is the target of correction, and the remaining neighboring samples may have variable positions depending on the position of the prediction sample which is the target of correction. [0318] [0319] The differential information of neighboring samples may mean a differential sample between neighboring samples, or may mean a value obtained by scaling the differential sample by a predetermined constant value (eg, one, two, three, etc.). Here, the predetermined constant value can be determined by considering the position of the prediction sample that is the correction target, the position of the column or row that includes the prediction sample that is the correction target, the position of the sample of prediction within the column or row, etc. [0320] [0321] For example, when the intra-prediction mode of the current block is vertical mode, the differential samples between the upper left neighbor sample p (-1, -1) and the neighboring samples p (-1, y) adjacent to the left end of the block Current can be used to obtain the final prediction sample as shown in Equation 1. [0322] [Equation 1] [0323] P (0, y ) = P (0, y ) ( p (-1, y ) - p (-1, -1)) >> 1 for y = 0 ... N -1 [0324] [0325] For example, when the intra-prediction mode of the current block is the horizontal mode, the differential samples between the upper left neighbor sample p (-1, -1) and the neighboring samples p (x, -1) adjacent to the upper limit of the block Current can be used to obtain the final prediction sample as shown in Equation 2. [0326] [Equation 2] [0327] P ( x , 0) = p ( x , 0) + (( p ( x , -1) - p (-1, -1)) >> 1 for x = 0 ... N -1 [0328] [0329] For example, when the intraprediction mode of the current block is the vertical mode, the differential samples between the upper left neighbor sample p (-1, -1) and the neighboring samples p (-1, y) adjacent to the left limit, the current block can be used to obtain the final prediction sample. Here, the differential sample can be added to the prediction sample, or the differential sample can be scaled to a predetermined constant value, and then added to the prediction sample. The default constant value used in scaling can be determined differently depending on the column and / or row. For example, the prediction sample can be corrected as shown in Equation 3 and Equation 4. [0330] [Equation 3] [0331] P (0, y) = P (0, y) + ((p (-1, y) -p (-1, -1)) >> 1 for y = 0 ... N-1 [0332] [0333] [Equation 4] [0334] P (1, y) = P (1, y) + ((P (-1, y) -P (-1, -1)) >> 2 for y = 0 ... N-1 [0335] [0336] For example, when the intra-prediction mode of the current block is the horizontal mode, the differential samples between the upper left neighbor sample p (-1, -1) and the neighboring samples p (x, -1) adjacent to the upper limit of the block Current can be used to obtain the final prediction sample, as described in the case of vertical mode. For example, the prediction sample can be corrected as shown in Equation 5 and Equation 6. [0337] [Equation 5] [0338] [0339] P (x, 0) = p (x, 0) + ((p (x, -1) -p (-1, -1)) >> 1 for x = 0 ... N-1 [0340] [0341] [Equation 6] [0342] [0343] P (x, 1) = p (x, 1) + ((p (x, -1) -p (-1, -1)) >> 2 for x = 0 ... N-1 [0344] [0345] Figures 12 and 13 are diagrams illustrating a method for correcting a prediction sample based on a predetermined correction filter according to an embodiment of the present invention. [0346] [0347] The prediction sample can be corrected based on the neighbor sample of the prediction sample which is the correction target and a predetermined correction filter. Here, the neighbor sample can be specified by an angular line of the directional prediction mode of the current block, or it can be at least one sample placed on the same angular line as the prediction sample which is the correction target. In addition, the neighbor sample can be a prediction sample in the current block, or it can be a reconstructed sample in a neighboring block reconstructed before the current block. [0348] [0349] At least one of the number of shots, the intensity and a filter coefficient of the correction filter can be determined as a function of at least one of the positions of the prediction sample that is the correction target, regardless of whether the prediction sample is the correction target is placed in the limit of the current block, the intra-prediction mode of the current block, the angle of the directional prediction mode, the prediction mode (inter or intra mode) of the neighboring block and the size / shape of the block current. [0350] [0351] Referring to Figure 12, when the directional prediction mode has an index of 2 or 34, at least one predicted / reconstructed sample placed in the lower left of the prediction sample which is the correction target and the Default correction can be used to obtain the final prediction sample. Here, the predicted / reconstructed sample in the lower left can belong to a previous line of a line that includes the prediction sample that is the correction target. The predicted / reconstructed sample in the lower left can belong to the same block as the current sample, or to the adjacent block next to the current block. [0352] [0353] The filtering of the prediction sample can be done only on the line positioned at the limit of the block, or it can be done on several lines. You can use the correction filter where at least one of the number of filter taps and a filter coefficient is different for each of the lines. For example, you can use a filter (1/2, 1/2) for the first left line closest to the limit of the block, you can use a filter (12/16, 4/16) for the second line, you can use a filter (14/16, 2/16) for the third line, and a filter (15/16, 1/16) can be used for the fourth line. [0354] [0355] Alternatively, when the directional prediction mode has an index of 3 to 6 or 30 to 33, filtering can be done at the limit of the block as shown in figure 13, and a 3-shot correction filter can be used to correct the prediction sample. The filtering can be done using the lower left sample of the prediction sample, which is the correction target, the lower sample of the lower left sample, and a 3-shot correction filter that takes as input the sample of prediction that is the goal of correction. The position of the neighbor sample used by the correction filter can be determined differently according to the directional prediction mode. The filter coefficient of the correction filter can be determined differently depending on the directional prediction mode. [0356] [0357] Different correction filters can be applied depending on whether the neighboring block is encoded in inter mode or intra mode. When the neighbor block is encoded in the intra mode, a filtering method can be used where more weighting is given to the prediction sample, as compared to when the neighboring block is encoded in the inter mode. For example, in the case that the intraprediction mode is 34, when the neighboring block is coded in the inter mode, a filter (1/2, 1/2) can be used, and when the neighboring block is coded in the intra mode, a filter can be used (4/16, 12/16). [0358] [0359] The number of lines to be filtered in the current block may vary depending on the size / shape of the current block (for example, the block of coding or the block of prediction). For example, when the size of the current block is equal to or less than 32x32, filtering can be done on a single line at the boundary of the block; otherwise, the filtering can be done in several lines, including a line in the limit of the block. [0360] [0361] Figures 12 and 13 are based on the case where the intra-prediction modes in Figure 7 are used, but can be applied in the same or similar manner to the case in which the extended intra-prediction modes are used. [0362] [0363] Figure 14 shows a range of reference samples for intraprediction according to an embodiment to which the present invention is applied. [0364] The interprediction of a current block can be done using a reference sample derived from a reconstructed sample included in a neighboring block. Here, the reconstructed sample means that the coding / decoding is completed before encoding / decoding the current block. For example, the intra-prediction for the current block can be made based on at least one of the reference samples P (-1, -1), P (-1, y) (0 <= and <= 2N-1) and P (x, -1) (0 <= x <= 2N-1). At this time, filtering in reference samples is performed selectively as a function of at least one of an intra-prediction mode (eg, index, directionality, angle, etc. of the intra-prediction mode) of the current block or the size of the block. a transformation block related to the current block. [0365] [0366] The filtering of the reference samples can be done using a predefined intra filter in an encoder and a decoder. For example, an intra filter with a filter coefficient of (1,2,1) or an intra filter with a filter coefficient of (2,3,6,3,2) can be used to obtain final reference samples for use in prediction. [0367] [0368] Alternatively, at least one of a plurality of intra filter candidates can be selected to perform filtering in reference samples. In this case, the plurality of intra filter candidates may differ from each other in at least one of a filter intensity, a filter coefficient or a derivation number (eg, a number of filter coefficients, a filter length) . A plurality of intra filter candidates can be defined in at least one of a sequence, an image, a division or a block level. That is, a sequence, an image, a division or a block in which the current block is included can use the same plurality of internal filter candidates. [0369] [0370] From here on, for convenience of explanation, it is assumed that a plurality of intra filter candidates includes a first intra filter and a second intra filter. It is also assumed that the first intra filter is a 3-shot filter (3, 1) and the second intra filter is a 5-shot filter (5, 3, 3, 2). [0371] [0372] When the reference samples are filtered by applying a first intra filter, the filtered reference samples can be derived as shown in Equation 7. [0373] [Equation 7] [0374] P (- l, - l) = (P (- 1, 0) 2 P (- 1, - 1) P (0, - 1) 2) »2 [0375] P (- 1 , y-) = (P (-1 , y 1) + 2 P (-1 , y) P (- l, y - l) 2) »2 [0376] P (jc5- 1) = (P (x 1, -1 ) + 2 P (x, ~ 1) + P (jc- 1, -1) 2) »2 [0377] [0378] When the reference samples are filtered by applying the second intra filter, the filtered reference samples can be derived as shown in the following equation 8. [0379] [Equation 8] [0380] [0381] P (-1 , y) = (2 P (- 1,>'+ 2) + 3P (-1 , y + 1) + 6P (-1, ^) + 3P (-1 , y - 1) + 2P (-1 , and - 2) 8) »4 [0382] P {x - 1) = (2P (jc + 25- 1) + 3P (* + 1, -1) +6 P {x - 1) +3 P (x - 11) + 2P (* - 2s- 1 8) »4 [0383] [0384] In the above equations 7 and 8, x can be an integer between 0 and 2N-2, and y can be an integer between 0 and 2N-2. [0385] [0386] Alternatively, depending on the position of a reference sample, one of a plurality of intra filter candidates can be determined, and filtering on the reference sample can be performed using the determined one. For example, a first intra filter can be applied to the reference samples included in a first range, and a second intra filter can be applied to the reference samples included in a second range. Here, the first rank and the second rank can be distinguished depending on whether they are adjacent to a limit of a current block, whether they are located on the upper side or on the left side of a current block, or if they are adjacent to a block. a corner of a current block. For example, as shown in Figure 15, filtering on reference samples (P (-1, -1), P (-1.0), P (-1.1), ..., P (-1 , N-1) and P (0, -1), P (1, -1), ...) that are adjacent to a limit of the current block is performed by applying a first intra filter as shown in Equation 7, and the filtering in the other reference samples that are not adjacent to a limit of the current block is done by applying a second reference filter as shown in Equation 8. It is possible to select one of a plurality of internal filter candidates depending on the type of transformation used for a current block, and perform the filtering in reference samples using the selected one. Here, the type of transformation can mean (1) a transformation scheme such as DCT, DST or KLT, (2) a mode indicator of transformation such as a 2D transformation, a 1D transformation or no transformation or (3) the number of transformations such as a first transformed and a second transformed. From here on, for convenience of description, it is assumed that the type of transformation means the transformation scheme such as DCT, DST and KLT. [0387] [0388] For example, if a current block is coded using a DCT, filtering can be done using a first internal filter, and if a current block is coded using a DST, filtering can be done using a second internal filter. Or, if a current block is coded using DCT or DST, filtering can be done using a first internal filter, and if the current block is coded using a KLT, filtering can be done using a second internal filter. [0389] [0390] The filtering can be done using a filter selected as a function of a transformation type of a current block and a position of a reference sample. For example, if a current block is coded using a DCT, filtering in the reference samples P (-1, -1), P (-1.0), P (-1.1), ..., P ( -1, N-1) and P (0, -1), P (1, -1), ..., P (N-1, -1) can be performed using a first intra filter, and filtering in Other reference samples can be made using a second intra filter. If a current block is coded using a DST, filtering in the reference samples P (-1, -1), P (-1.0), P (-1.1), ..., P (1, N) -1) and P (0, -1), P (1, -1), ..., P (N-1, -1) can be performed using a second intra filter, and filtering in other reference samples It can be done using a first intra filter. [0391] [0392] One of a plurality of internal filter candidates can be selected depending on whether a transformation type of a neighboring block that includes a reference sample is the same as a transformation type of a current block, and the filtering can be done using the internal filter candidate selected. For example, when a current block and a neighboring block use the same type of transformation, the filtering is done using a first internal filter, and when the transformation types of a current block and a neighboring block are different from each other, the second Internal filter can be used to perform filtering. [0393] [0394] It is possible to select any of a plurality of intra filter candidates depending on the type of transformation of a neighboring block and perform filtering on a reference sample using the selected one. That is, it you can select a specific filter taking into account the type of transformation of a block in which a reference sample is included. For example, as shown in Figure 16, if a block adjacent to the left / down to the left of a current block is a block coded using a DCT, and a block adjacent to the top / top right of a current block is a block encoded using a DST, the filtering of reference samples adjacent to the left / down to the left of a current block is done by applying a first internal filter and filtering in the reference samples adjacent to the top / top right of a current block is done by applying a second internal filter. [0395] [0396] In units of a predetermined region, a usable filter can be defined in the corresponding region. Here, the unit of the predetermined region can be any of a sequence, an image, a sector, a group of blocks (e.g., a row of units of coding tree) or a block (e.g., a unit of a tree). coding) Or, you can define another region that shares one or more filters. A reference sample can be filtered using a filter assigned to a region in which a current block is included. [0397] [0398] For example, as shown in Figure 17, it is possible to perform filtering on reference samples using different filters in CTU units. In this case, the information indicating whether the same filter is used in a sequence or in an image, a filter type used for each CTU, an index specifying a filter used in the corresponding CTU among an intra-available filter candidate, it can be signaled through a set of sequence parameters (SPS) or a set of image parameters (PPS). [0399] The internal filter described above can be applied in units of a coding unit. For example, filtering can be performed by applying a first intra filter or a second intra filter to reference samples around a coding unit. [0400] [0401] When a directional prediction mode or a DC mode is used, a deterioration of the image quality may occur in a block boundary. On the other hand, in the flat mode, there is an advantage that the deterioration of the quality of the image in the boundary of the block is relatively small in comparison with the previous prediction modes. [0402] [0403] The flat prediction can be made by generating a first prediction image (ie, a first prediction sample) in a horizontal direction and a second prediction image (ie, a second prediction sample) in a vertical direction using reference samples and then making a weighted prediction of the first prediction image and the second prediction image. [0404] [0405] Here, the first prediction image can be generated based on reference samples that are adjacent to the current block and placed in the horizontal direction of a prediction sample. For example, the first prediction image can be generated based on a weighted sum of reference samples located in the horizontal direction of the prediction sample, and a weight applied to each of the reference samples can be determined as a function of the distance from an objective sample of prediction or a size of the current block. Samples positioned in the horizontal direction may include a left reference sample located on the left side of the prediction target sample and a right reference sample located on the right side of the prediction target sample. At this time, the correct reference sample can be derived from a top reference sample of the current block. For example, the correct reference sample can be derived by copying a value from one of the higher reference samples, or it can be obtained by a weighted sum or an average value of the higher reference samples. Here, the top reference sample may be a reference sample located on the same vertical line as the correct reference sample, and may be a reference sample adjacent to a top right corner of the current block. Alternatively, the position of the upper reference sample can be determined differently depending on the position of the prediction target sample. [0406] [0407] The second prediction image can be generated based on reference samples that are adjacent to the current block and located in a vertical direction of a prediction sample. For example, the second prediction image can be generated based on a weighted sum of reference samples located in the vertical direction of the sample of prediction, and a weighting applied to each of the reference samples can be determined as a function of the distance from a prediction target sample or a size of the current block. Samples located in the vertical direction may include a higher reference sample located on the upper side of the prediction target sample and a lower reference sample located on the lower side of the prediction target sample. At this time, the lower reference sample can be derived from a left reference sample of the current block. For example, the lower reference sample can be derived by copying a value from one of the left reference samples, or it can be derived by a weighted sum or an average value of the left reference samples. Here, the left reference sample may be a reference sample located on the same horizontal line as the lower reference sample, and may be a reference sample adjacent to a lower left corner of the current block. Alternatively, the position of the upper reference sample can be determined differently depending on the position of the prediction target sample. [0408] [0409] As another example, it is also possible to derive the correct reference sample and the lower reference sample using a plurality of reference samples. [0410] [0411] For example, the right reference sample or the lower reference sample can be derived using the upper reference sample and the left reference sample of the current block. For example, at least one of the right reference sample or the lower reference sample can be determined as a weighted sum or an average of the upper reference sample and the left reference sample of the current block. [0412] [0413] Alternatively, we can calculate the weighted sum or the average of the upper reference sample and the left reference sample of the current block, and then we can derive the right reference sample from the weighted sum or the average value of the calculated value and the Top reference sample. If the correct reference sample is derived by calculating the weighted sum of the calculated value and the upper reference sample, the weighting can be determined by considering the size of the current block, the shape of the current block, the position of the sample of correct reference, or a distance between the correct reference sample and the upper reference sample. [0414] [0415] In addition, after calculating the weighted sum or the average of the upper reference sample and the left reference sample of the current block, the lower reference sample can be derived from the weighted sum or the average value of the calculated value and the reference sample left. If the right reference sample is derived through the weighted sum of the calculated value and the left reference sample, the weighting can be determined by considering the size of the current block, the shape of the current block, the position of the lower reference sample, or a distance between the lower reference sample and the left reference sample. [0416] [0417] The positions of multiple reference samples used to derive the right reference sample or the left reference sample may be fixed or may vary depending on the position of a prediction target sample. For example, the upper reference sample may have a fixed position such as a reference sample adjacent to the upper right corner of the current block and located on the same vertical line as the right reference sample, and the left reference sample may have a fixed position such as a reference sample adjacent to a lower left corner of the current block and located on the same horizontal line as the lower reference sample. Alternatively, when the correct reference sample is obtained, the upper reference sample having a fixed location is used, as a reference sample adjacent to the upper right corner of the current block, while the left reference sample is used as a reference sample. reference sample located on the same horizontal line as the objective sample of prediction. When the lower reference sample is obtained, the left reference sample having a fixed location is used, as a reference sample adjacent to the lower left corner of the current block, while the upper reference sample is used as a sample of reference. reference located on the same vertical line as the objective sample of prediction. [0418] [0419] Figure 18 is a diagram showing an example of deriving a right reference sample or a lower reference sample using a plurality of reference samples. It will be assumed that a current block is a block that has a size of WxH. [0420] [0421] With reference to (a) of Figure 18, first, a lower right reference sample P (W, H) based on a weighted sum or an average value of a higher reference sample P (W, -1) can be generated. and a left reference sample P (-1, H) of the current block. And, a right reference sample P (W, y) can be generated for a prediction target sample (x, y) based on the lower right reference sample P (W, H) and the upper reference sample P (W) , -one). For example, the correct prediction sample P (W, y) can be calculated as a weighted sum or an average value of the lower right reference sample P (W, H) and the upper reference sample P (W, -1) . In addition, a lower reference sample P (x, H) can be generated for the prediction target sample (x, y) based on the lower right reference sample P (W, H) and a left reference sample P (- 1 HOUR ). For example, the lower reference sample P (x, H) can be calculated as a weighted sum or an average value of the lower right reference sample P (W, H) and the left reference sample P (-1, H) . [0422] [0423] As shown (b) of Figure 18, if the correct reference sample and the lower reference sample are generated, a first prediction sample Ph (x, y) and a second prediction sample Pv (x, y) for the objective block of prediction based on the generated reference samples. At this time, the first prediction sample Ph (x, y) can be generated based on a weighted sum of the left reference sample P (-1, y) and the right reference sample P (W, y) and the second prediction sample can be generated based on a weighted sum of the upper reference sample P (x, -1) and the lower reference sample P (x, H). [0424] [0425] The positions of the reference samples used to generate the first prediction image and the second prediction image may vary according to the size or shape of the current block. That is, the positions of the upper reference sample or the left reference sample used to derive the right reference sample or the lower reference sample may vary according to the size or shape of the current block. [0426] For example, if the current block is a square block of size NxN, the correct reference sample can be derived from P (N, -1) and the lower reference sample can be derived from P (-1, N). Alternatively, the correct reference sample and the lower reference sample can be derived based on at least one of a weighted sum, an average value, a minimum value or a maximum value of P (N, -1) and P (-1 , N). On the other hand, if the current block is a non-square block, the positions of the reference samples used to derive the correct reference sample and the lower reference samples can be determined differently, depending on the shape of the current block. [0427] [0428] Figures 19 and 20 are diagrams for explaining a determination of a right reference sample and a lower reference sample for a non-square block, according to an embodiment of the present invention. [0429] As in the example shown in Figure 19, when the current block is a non-square block of size (N / 2) * N, a correct reference sample is derived based on a higher reference sample P (N / 2, -1), and a lower reference sample is derived based on a left reference sample P (-1, N). [0430] [0431] Alternatively, the correct reference sample or the lower reference sample may be derived based on at least one of a weighted sum, an average value, a minimum value or a maximum value of the upper reference sample P (N / 2, -1 ) and the left reference sample P (-1, N). For example, the correct reference sample can be derived as a weighted sum or an average of P (N / 2, -1) and P (-1, N), or it can be derived as a weighted sum or an average from the previous calculated value and the upper reference sample. Alternatively, the lower reference sample can be derived as a weighted sum or an average of P (N / 2, -1) and P (-1, N), or it can be derived as a weighted sum or an average of the previous value calculated and the left reference sample. [0432] [0433] On the other hand, as in the example shown in Figure 20, if the current block is a non-square block of size Nx (N / 2), the correct reference sample can be derived based on the upper reference sample P (N, -1) and the lower reference sample can be based on the sample of left reference P (-1, N / 2). [0434] [0435] Alternatively, it is also possible to derive the correct reference sample or the lower reference sample based on at least one of a weighted sum, an average value, a minimum value or a maximum value of the upper reference sample P (N, - 1) and the left reference sample P (-1, N / 2). For example, the correct reference sample can be derived as a weighted sum or an average of P (N, -1) and P (-1, N / 2), or it can be derived as a weighted sum or an average of the previous calculated value and the upper reference sample. Alternatively, the lower reference sample can be derived as a weighted sum or an average of P (N, -1) and P (-1, N / 2), or it can be derived as a weighted sum or an average of the previous value calculated and the left reference sample. [0436] [0437] Namely, the lower reference sample can be derived based on at least one of the lower left reference sample of the current block located in the same horizontal line as the lower reference sample or the upper right reference sample of the current block located in the same vertical line as the correct reference sample, and the correct reference sample can be derived based on at least one of the upper right reference sample of the current block located on the same vertical line as the right reference sample or the sample reference lower left of the current block located on the same horizontal line as the lower reference sample. [0438] [0439] The first prediction image can be calculated based on a weighted prediction of reference samples located on the same horizontal line as the target prediction sample. In addition, the second prediction image can be calculated based on a weighted prediction of reference samples located on the same vertical line as the target prediction sample. [0440] [0441] Alternatively, it is also possible to generate the first prediction image or the second prediction image based on an average value, a minimum value or a maximum value of reference samples. [0442] [0443] A method of deriving a reference sample or a derivative method the first prediction image or the second prediction image may be configured differently depending on whether the target prediction sample is included in a predetermined area in the current block, a size or a current block shape. Specifically, depending on the position of the prediction target sample, the number or positions of the reference samples used to derive the right or lower reference sample may be determined differently, or depending on the position of the target sample of The prediction, the weighting or the number of reference samples used to derive the first prediction image or the second prediction image can be configured differently. [0444] [0445] For example, a correct reference sample used to derive the first prediction image of the prediction target samples included in the predetermined region can be derived using only the top reference sample, and a correct reference sample used to derive the first image from Prediction of target prediction samples outside of the predetermined region can be derived based on a weighted sum or an average of a higher reference sample and a left reference sample. [0446] [0447] For example, as in the example shown in Figure 19, when the current block is a non-square block whose height is longer than a width, the correct reference sample of the prediction target sample located at (x, y) e included in the default region of the current block can be derived from P (N / 2, -1). On the other hand, the right reference sample of the prediction target sample located at (x ', y') and outside the predetermined region in the current block can be derived based on a weighted sum or an average value of P (N / 2, -1) and P (-1, N). [0448] [0449] Alternatively, as in the example shown in Figure 20, when the current block is a non-square block whose width is greater than a height, a lower reference sample of the prediction target sample located at (x, y) and included in the default region in the current block can be based on P (-1, N / 2). On the other hand, a lower reference sample of the prediction target sample located in (x ', y') and outside the predetermined region in the current block can be derived based on a weighted sum or an average value of P (N). , -1) and P (-1, N / 2). [0450] For example, the first prediction image or the second prediction image for the prediction target samples included in the predetermined region can be generated based on the weighted sum of the reference samples. On the other hand, the first prediction image or the second prediction image for the prediction target samples outside the predetermined region can be generated by an average value, a minimum value or a maximum value of reference samples or can be generated using only one of reference samples located in a predetermined position. For example, as shown in an example in Figure 19, if the current block is a non-square block whose height is longer than a width, the first prediction image for the prediction target sample located in (x, y) and included in the predetermined region can be generated using only one of a right reference sample P (N / 2, y) derived from P (N / 2, -1) or a left reference sample located in P (-1, Y). On the other hand, the first prediction image for the prediction target sample located at (x ', y') and outside the predetermined region can be generated based on a weighted sum or an average of a right reference sample P ( N / 2, y ') derived from P (N / 2, -1) and a reference sample located at P (-1, y'). [0451] [0452] Alternatively, as in an example shown in Figure 20, if the current block is a non-square block whose width is greater than a height, the second prediction image for the prediction target sample located at (x, y) and included in the default region of the current block can be generated by using only one of a lower reference sample P (x, N / 2) derived from P (-1, N / 2) or a higher reference sample located in P (x, - one). On the other hand, the second prediction image for the prediction target sample located at (x ', y') and not included in the predetermined region can be generated based on a weighted sum or an average of a lower reference sample P ( x ', N / 2) derived from P (-1, N / 2) and a reference sample located at P (-1, y'). [0453] [0454] In the embodiment described above, the predetermined region or an external region of the predetermined region may include a remaining region that excludes samples located in a boundary of the current block. The limit of the current block may include at least one of a left limit, a limit right, an upper limit or a lower limit. In addition, the number or position [0455] of the limits included in the predetermined region or the external region of the [0456] default region can be set differently according to the [0457] shape of the current block. [0458] [0459] In the flat mode, the final prediction image can be derived in [0460] function of a weighted sum, an average value, a minimum value or a maximum value of the first prediction image and the second prediction image. [0461] For example, the following Equation 9 shows an example of the generation of the final prediction image P based on the weighted sum of [0462] the first prediction image Ph and the second prediction image Pv. [0463] [Equation 9] [0464] [0465] [0466] [0467] In Equation 9, the prediction weighting w may be different [0468] according to a shape or a size of the current block, or a position of the sample [0469] prediction objective. [0470] [0471] For example, the prediction weighting w can be derived by considering a current block width, a current block height or a [0472] relationship between width and height. If the current block is a non-square block whose width is greater than the height, w can be configured so [0473] that more weight be given to the first prediction image. For another [0474] side, if the current block is a non-square block whose height is greater than the width, w can be configured so that more weight is given to the second prediction image. [0475] [0476] For example, when the current block has a square shape, the prediction weight w can have a value of 1/2. On the other hand, if the [0477] current block is a non-square block whose height is greater than the width [0478] (for example, (N / 2) xN), the prediction weighting w can be established in [0479] 1/4, and if the current block is a non-square block whose width is greater than [0480] the height (for example, Nx (N / 2)), the prediction weight w can be set to 3/4. [0481] [0482] When an intra-prediction mode of a current block is a directional prediction mode, the intra-prediction of the current block can be performed based on a directionality of the directional prediction mode. For example, Table 3 shows intra-directional parameters (intraPredAng) from Mode 2 to Mode 34, which are directional intra-predictive modes shown in Figure 8. [0483] [Table 3] [0484] [0485] [0486] [0487] [0488] In Table 3, although 33 modes of directional intra-prediction are exemplified, it is also possible that more or less modes of directional intra-prediction are defined. [0489] [0490] Based on a look-up table that defines a mapping relationship between a directional intra-directional mode and an intra-directional parameter, an intra-directional parameter can be determined for the current block. Alternatively, an intra-directional parameter for the current block can be determined in function of the information signaled through a bit stream. [0491] [0492] The intra-prediction of the current block can be performed using at least one of a left reference sample or a superior reference sample, depending on the directionality of the directional intra-predictive mode. Here, the upper reference sample means a reference sample (e.g., (-1, -1) to (2W-1, -1)) that has a y-axis coordinate smaller than a prediction sample (x, 0) included in the uppermost row in the current block and the left reference sample means a reference sample (for example, (-1, -1) to (-1, 2H-1)) that has a coordinate of the axis x smaller than a prediction sample (0, y) included in a column further to the left in the current block. [0493] [0494] It is possible to organize reference samples of the current block in a dimension according to the directionality of the intraprediction mode. Specifically, when both the upper reference sample and the left reference sample will be used in the intra-prediction of the current block, it is It is possible to select reference samples for each objective sample of prediction, assuming that they are arranged in a line in a vertical direction or a horizontal direction. [0495] [0496] For example, when the intra-directional parameter is negative (for example, in the case of the intra-prediction modes corresponding to Mode 11 to Mode 25 in Table 3), a one-dimensional reference sample group (P_ref_1D) can be constructed by means of the reorganization of the upper reference samples and the reference samples to the left in a horizontal or vertical direction. [0497] [0498] Figures 21 and 22 are diagrams illustrating a one-dimensional reference sample group in which the reference samples are rearranged in a line. [0499] [0500] If the reference samples are rearranged in the vertical direction or in the horizontal direction, it can be determined according to the directionality of the intra-prediction mode. For example, as in the example shown in Figure 21, if the index of the intra-prediction mode is 11 to 18, the top reference samples of the current block are rotated counter-clockwise so that the group of one-dimensional reference samples is generated. wherein the left reference samples and the upper reference samples are arranged in the vertical direction. [0501] [0502] On the other hand, as in the example shown in Figure 22, when the index of the intraprediction mode is 19 to 25, the left reference samples of the current block are rotated in a clockwise direction so that the sample group is generated. One-dimensional reference in which the left reference samples and the upper reference samples are arranged in the horizontal direction. [0503] [0504] If the intradirection parameter of the current block is not negative, the intra-prediction for the current block can be made using only the reference samples on the left or the higher reference samples. In this way, the one-dimensional reference sample group for the intra-prediction modes whose intra-directional parameters are not negative can be generated using only the reference samples on the left or the Superior reference samples. [0505] [0506] Based on the intradirection parameter, a reference sample determination index iIdx can be derived to specify at least one reference sample used to predict the prediction target sample. In addition, a parameter related to the weighting done, which is used to determine the weights applied to each reference sample, can be derived as a function of the intradirection parameter. For example, the following equations 10 and 11 show examples of how to derive the determination index of the reference sample and the parameter related to the weighting. [0507] [Equation 10] [0508] ildX = (y + 1) * (P ang / 32) [0509] [0510] ihecho = [(y + 1) P ang] 31 [0511] [0512] On the basis of the determination index of the reference sample, at least one reference sample can be specified for each objective sample of prediction. For example, depending on the determination index of the reference sample, a position of a reference sample in the group of one-dimensional reference samples can be specified to predict the prediction target sample in the current block. On the basis of the reference sample in the specified position, a prediction image (ie, a prediction sample) can be generated for the prediction target sample. [0513] [0514] A plurality of intraprediction modes may be used to perform the intraprediction for the current block. For example, different intra-predictive modes or different directional intra-predictive modes can be applied to each of the prediction target samples in the current block. Alternatively, different modes of intraprediction or different modes of directional intra-prediction can be applied to each of the predetermined sample groups in the current block. In this case, the predetermined sample group may represent a sub-block having a predetermined size / shape, a block including a predetermined number of prediction target samples, or a predetermined area. The number of groups of samples can be determined in a variable way according to the size / shape of the current block, the number of target samples of prediction included in the current block, the intra-prediction mode of the current block, or similar, or it may have a predefined number in the encoder and the decoder. Alternatively, it is also possible to indicate the number of sample groups included in the current block through the bit stream. [0515] [0516] A plurality of intra-prediction modes for the current block can be represented by a combination of the plurality of intra-prediction modes. For example, the plurality of intraprediction modes may be represented by a combination of a plurality of non-directional intra-prediction modes, a combination of a directional prediction mode and a non-directional intra-prediction mode, or a combination of a plurality of intra-prediction modes. directional Alternatively, the intra-prediction mode can be encoded / decoded for each unit to which different intra-prediction modes are applied. [0517] [0518] When considering the intra-prediction mode of the current block, if it is determined that the prediction target sample can not be predicted only with a reference sample, the prediction of the prediction target sample can be made using a plurality of reference samples. Specifically, according to the intra-prediction mode of the current block, it is possible to make a prediction in the prediction target sample by interpolating a reference sample in a predetermined position and a neighboring reference sample close to the reference sample in the default position. [0519] [0520] For example, when an imaginary angular line following a slope of the intra-prediction mode or an angle of the intra-prediction mode does not pass a whole pel (i.e., a reference sample in an entire position) in the one-dimensional reference sample group, a prediction image can be generated for the prediction target sample by interpolating a reference sample placed on the angular line and a reference sample adjacent to a left / right or upper / lower side of the reference sample. For example, the following Equation 11 shows an example of interpolation of two or more reference samples to generate a prediction sample P (x, y) for the prediction target sample. [0521] [Equation 11] [0522] [0523] P (x, y) = (32 - i done ) / 32 * P _ ref _1 D (x iId x 1) + i done / 32 * P _ re f _1 D (x iId x 2) The coefficients of an interpolation filter can be determined based on the parameter related to the weighting done. For example, the interpolation filter coefficients can be determined as a function of the distance between a fractional layer located on the angular line and an integer variable (that is, an entire position of each reference sample). [0524] [0525] When the intra-prediction mode of the current block is considered, if the prediction target sample can be predicted only with a reference sample, a prediction image can be generated for the prediction target sample based on a reference sample specified by the intraprediction mode of the current block. [0526] [0527] For example, an imaginary angular line that follows a slope of the intraprediction mode or an angle of the intraprediction mode passes a whole pel (i.e., a reference sample in a whole position) in the one-dimensional reference sample group, an image of prediction for the prediction, the objective sample can be generated by copying a reference sample in the whole pel or by considering a distance between a reference sample in the whole pel and the objective sample of prediction. For example, the following Equation 12 is an example of generating a prediction image P (x, y) for the prediction target sample by copying a reference sample P_ref_1D (x ildx 1) into the one-dimensional sample group specified by the intraprediction mode of the current block. [0528] [Equation 12] [0529] P (xr, y) = P _ ref _ l D (xi I dx 1) [0530] [0531] To facilitate the explanation, in the embodiments described below, a reference sample specified by the intra-prediction mode of the current block or a one-dimensional reference sample specified by the intra-prediction mode of the current block will be referred to as a first reference sample. For example, in a flat mode, reference samples used to obtain a horizontal prediction image or a vertical prediction image of the prediction target sample may be referred to as first reference samples, and in a directional intra-predictive mode, a sample of reference of the prediction of the target sample specified by the directionality of the mode of intraprediction can be referred to as a first sample of prediction referenda. In addition, a prediction sample generated by predicting the prediction target sample based on the first reference sample will be called a first prediction image (or a first prediction sample), and the intra-prediction using the first reference sample will be referred to as the first intraprediction. [0532] [0533] According to the present invention, to increase the efficiency of the prediction, it is possible to obtain a second prediction image (or a second prediction sample) for the prediction target sample by using a second reference sample in a predetermined position. Specifically, the second prediction sample for the prediction target sample can be generated by predicting the weighting of the first prediction image generated as a result of the first intraprediction and the second reference sample in the predetermined position. [0534] [0535] The generation or not of the second prediction sample can be determined depending on the size of the current block, the shape of the current block, the intra-prediction mode of the current block (for example, if it is a directional intra-predictive mode), a direction of the intra-prediction mode, a distance between the prediction target sample and the first reference sample and the like. Here, the distance between the first reference sample and the prediction target sample can be calculated based on a distance of the x-axis between the first reference sample and the prediction target sample and a distance of the y-axis between the first reference sample and the objective sample of prediction. [0536] [0537] Figure 23 is a diagram for explaining a distance between a first reference sample and a prediction target sample. In Figure 23, it is exemplified that the distance between the first reference sample and the prediction target sample is calculated by adding an absolute value of a difference of x coordinates between the first reference sample and the prediction target sample and an absolute value of a coordinate and the difference between the first reference sample and the objective sample of prediction. [0538] [0539] As an example, it is possible to compare a distance between the sample prediction objective and the first reference sample with a threshold value, and then determine whether to generate a second prediction image according to the result of the comparison. The threshold value can be determined as a function of the width, the height, the intra-prediction mode (for example, in the case of a directional intra-predictive mode) of the prediction block or a slope of the intra-prediction mode. [0540] [0541] The first reference sample used in the first intraprediction can be established as the second reference sample. For example, if a plurality of reference samples are used in the first intra-prediction, any of the plurality of reference samples can be established as the second reference sample. [0542] [0543] Alternatively, a reference sample located in a position different from the first reference sample may be established as the second reference sample. At this time, the first reference sample and the second reference sample may be adjacent to the same limit of the current block, or may be adjacent to different limits of the current block. For example, both the first reference sample and the second reference sample may be top reference samples of the current block or left reference samples of the current block, or the first reference sample or the second reference sample is the sample of reference. superior reference, while the other reference sample is the left reference sample. [0544] [0545] Figures 24 and 25 are diagrams showing the positions of a first reference sample and a second reference sample. [0546] [0547] Figure 24 shows an example in which the first reference sample and the second reference sample are adjacent to the same limit of the current block, and figure 25 shows an example in which each of the first reference sample and the second The reference sample is adjacent to different limits of the current block. [0548] [0549] Specifically, it is shown in Figure 24 that both the first reference sample and the second reference sample are the top reference samples of the current block, and is shown in the figure 25 that the first reference sample of the current block is the upper reference sample, while the second reference sample is the left reference sample of the current block. [0550] [0551] The second reference sample may include a reference sample that is closer to the objective sample of prediction. Here, the reference sample closest to the prediction target sample may include at least one of a reference sample that is on the same horizontal line as the target prediction sample or a reference sample that is on the same line vertical that the objective sample of prediction. [0552] [0553] Alternatively, a reference sample adjacent to the first reference sample can be determined as the second reference sample. [0554] [0555] As another example, the second reference sample can be determined as a function of the directionality of the intra-prediction mode of the current block. For example, the second reference sample can be specified by an imaginary angular line that follows the slope of the intra-prediction mode of the current block. For example, when the angular line extends on both sides, the reference sample located on one side of the angular line can be established as the first reference sample, and the reference sample located on the other side of the angular line will be You can set as the second reference sample. [0556] [0557] Figure 26 is a diagram showing the positions of a first reference sample and a second reference sample. If it is assumed that the intra-prediction mode of the current block is a lower left diagonal direction (for example, Mode 2 shown in Figure 8) or a higher right diagonal direction (for example, Mode 34 shown in FIG. Figure 8), when the angular line defined by the intra-prediction mode extends on both sides from the target prediction sample, the reference samples located at the positions passing through the angular line can be established as the first reference sample and the second reference sample. For example, when the intra-prediction mode of the current block is the upper-right diagonal direction, a Reference sample located at a position of r (xy 2, -1) is determined as the first reference sample and a reference to the reference sample located at a position of r (-1, xy 2) is determined as the second sample of reference for the objective sample of prediction located in (2, 2). On the other hand, when the intra-prediction mode of the current block is the lower left diagonal direction, a reference sample located in a position of r (-1, x and 2) is determined as the first reference sample and a reference sample located in a position of r (x and 2, -1) is determined as the second reference sample for the prediction target sample located in (2, 2). [0558] [0559] Alternatively, a reference sample in a predefined location can be configured as the second reference sample. For example, a reference sample adjacent to a top left corner of the current block, a reference sample adjacent to a top right corner of the current block, or a reference sample adjacent to a lower left corner of the current block may be set as the second reference sample. [0560] [0561] A plurality of reference samples can be selected as the second reference sample. For example, a plurality of reference samples satisfying a condition described above can be selected as the second reference samples for the second intraprediction. [0562] [0563] The second prediction image can be generated by the weighted sum of the first prediction image and the second reference sample. For example, the following Equation 13 represents an example of generating a second prediction image P '(x, y) for a prediction target sample (x, y) through a weighted sum of a second reference sample P_ref_2nd and a first prediction image P (x, y). [0564] [Equation 13] [0565] [0566] [0567] [0568] [0569] Since the first prediction image is generated by copying the first reference sample or by interpolating a plurality of the first reference samples, it can be understood that the second prediction image is generated through a weighted sum of the first reference sample P_ref_1st and the second reference sample P_ref_2nd. [0570] [0571] The weights assigned to each of the first prediction image and the second reference sample can be determined as a function of at least one of a size of the current block, a form of the current block, a mode of intra-prediction of the current block, a position of the prediction target sample, a position of the first reference sample or a position of the second reference sample. For example, the weights assigned to each of the first prediction image and the second reference image can be determined as a function of the distance between the prediction target sample and the first reference sample or a distance between the prediction target sample and the second reference sample. [0572] [0573] For example, when the distance between the prediction target sample and the first reference sample is f1 and the distance between the prediction target sample and the reference sample is f2, a weighted prediction parameter w can be configured as f2 / f1, f1 / f2. f2 / (f1 f2), or f2 / (f1 f2). [0574] [0575] The final prediction image of the prediction target sample can be determined as the first prediction image or the second prediction image. At this time, either to determine the first prediction image as the final prediction image or to determine the second prediction image as the final prediction image can be determined according to a current block size, a current block shape , a mode of intra-prediction of the current block, the position of the target sample of prediction or the like. For example, the final prediction image of the prediction target samples included in a first area in the current block is determined as the first prediction image, while the final prediction image of the prediction target samples included in a second area , which is different from the first area, is determined as the second prediction image. [0576] [0577] Figure 27 is a flow chart illustrating processes for obtaining a residual sample according to an embodiment to which the present invention is applied. [0578] First, a residual coefficient of a current block S2710 can be obtained. A decoder can obtain a residual coefficient through a coefficient scanning method. For example, the decoder can perform a diagonal scan, a coefficient scan using a zigzag scan, a top right scan, a vertical scan or a horizontal scan, and can obtain residual coefficients in the form of a two-dimensional block. [0579] [0580] An inverse quantification can be performed on the residual coefficient of the current block S2720. [0581] [0582] It is possible to determine if an inverse transformation should be omitted in the residual coefficient discarded from the current block S2730. Specifically, the decoder can determine whether the inverse transformation should be omitted in at least one of the horizontal or vertical direction of the current block. When the application of the inverse transformation is determined in at least one of the horizontal or vertical directions of the current block, a residual sample of the current block can be obtained by inversely transforming the dequantized residual coefficient of the current block S2740. Here, the inverse transformation can be performed using at least one of DCT, DST and KLT. [0583] [0584] When the inverse transform is omitted in both the horizontal and vertical directions of the current block, the inverse transformation is not performed in the horizontal and vertical direction of the current block. In this case, the residual sample of the current block can be obtained by scaling the dequantized residual coefficient with a predetermined value S2750. [0585] [0586] Jumping the inverse transform in the horizontal direction means that the inverse transform is not done in the horizontal direction, but the inverse transform is done in the vertical direction. At this time, the scale can be made in the horizontal direction. [0587] [0588] Bypassing the inverse transform in the vertical direction means that the inverse transform is not done in the vertical direction, but the inverse transform is done in the horizontal direction. At this time, the scale can be performed in the vertical direction. [0589] It can be determined whether or not a reverse transformation jump technique can be used for the current block, depending on the type of partition of the current block. For example, if the current block is generated through a partition based on a binary tree, the reverse transformation skip scheme may be restricted for the current block. Therefore, when the current block is generated through the binary tree-based partition, the residual sample of the current block can be obtained by inverse transformation of the current block. Furthermore, when the current block is generated through the binary tree-based partition, the encoding / decoding of the information indicating whether the reverse transformation is omitted (eg, transform_skip_flag) can be omitted. [0590] [0591] Alternatively, when the current block is generated through the binary tree-based partition, it is possible to limit the inverse transformation jump scheme to at least one of the horizontal or vertical direction. Here, the direction in which the reverse transform hopping scheme is limited can be determined as a function of the decoded bitstream information, or it can be determined adaptively as a function of at least one of a size of the current block, a form of the current block, or an intraprediction mode of the current block. [0592] [0593] For example, when the current block is a non-square block that has a width greater than a height, the reverse transformation skip scheme can be allowed only in the vertical direction and restricted in the horizontal direction. That is, when the current block is 2NxN, the inverse transformation is done in the horizontal direction of the current block, and the inverse transformation can be performed selectively in the vertical direction. [0594] [0595] On the other hand, when the current block is a non-square block that has a height greater than a width, the reverse transformation skip scheme can be allowed only in the horizontal direction and restricted in the vertical direction. That is, when the current block is Nx2N, the inverse transformation is performed in the vertical direction of the current block, and the inverse transformation can be performed selectively in the horizontal direction. [0596] In contrast to the previous example, when the current block is a non-square block that has a width greater than a height, the reverse transformation skip scheme can be allowed only in the horizontal direction, and when the current block is a non-square block having a height greater than a width, the reverse transformation jump scheme can be allowed only in the vertical direction. [0597] [0598] The information that indicates whether or not to omit the inverse transform with respect to the horizontal direction or the information indicating whether the inverse transformation with respect to the vertical direction should be omitted can be signaled through a bit stream. For example, the information that indicates whether or not to reverse transform the horizontal direction is a 1-bit indicator, 'hor_transform_skip_flag', and the information that indicates whether the inverse transformation in the vertical direction should be omitted is an indicator 1 bit 'ver_transform_skip_flag'. The encoder can encode at least one of 'hor_transform_skip_flag' or 'ver_transform_skip_flag' according to the shape of the current block. In addition, the decoder can determine whether or not the reverse transformation is omitted in the horizontal direction or in the vertical direction using at least one of "hor_transform_skip_flag" or "ver_transform_skip_flag". [0599] [0600] It can be configured to omit the inverse transformation for any address of the current block depending on the partition type of the current block. For example, if the current block is generated through a partition based on a binary tree, the inverse transformation in the horizontal or vertical direction can be omitted. That is, if the current block is generated by a partition based on a binary tree, it can be determined that the inverse transformation for the current block is omitted in at least one horizontal or vertical address without coding / decoding information (for example, transform_skip_flag, hor_transform_skip_flag, ver_transform_skip_flag) that indicates whether or not the reverse transformation of the current block is omitted. [0601] [0602] Although the embodiments described above have been described on the basis of a series of stages or flowcharts, they do not limit the order of the time series of the invention, and may be performed simultaneously or in different orders as necessary. In addition, each of the components (for example, units, modules, etc.) that constitute the block diagram in the embodiments described above can be implemented by a hardware or software device, and a plurality of components. Or a plurality of components can be combined and implemented by a single hardware or software device. The embodiments described above can be implemented in the form of program instructions that can be executed through various computer components and recorded on a computer readable recording medium. The computer readable recording medium may include one of or a combination of program commands, data files, data structures and the like. Examples of computer readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical recording media such as CD-ROM and DVD; magnetooptical means such as optical discs; and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory and the like. The hardware device can be configured to operate as one or more software modules to perform the process according to the present invention, and vice versa. [0603] [0604] Industrial applicability [0605] [0606] The present invention can be applied to electronic devices that can encode / decode a video.
权利要求:
Claims (15) [1] 1. A method for decoding a video, comprising the method: determine an intraprediction mode of a current block; determining, as a function of the intra-prediction mode, a first reference sample of a prediction target sample included in the current block; generate a first prediction sample for the objective sample of prediction using the first reference sample; Y generate a second prediction sample for the prediction target sample using the first prediction sample and a second reference sample located in a different position from the first reference sample. [2] 2. The method of claim 1, wherein the second reference sample comprises at least one of a reference sample that is on the same horizontal line as the target prediction sample or a reference sample that is in a same vertical line as the objective sample of prediction. [3] 3. The method of claim 1, wherein each of the first reference sample and the second reference sample is adjacent to different limits of the current block. [4] 4. The method of claim 3, wherein a position of the second reference sample is determined based on a directionality of the intraprediction mode. [5] The method of claim 1, wherein the second prediction sample is generated based on a weighted sum of the first prediction sample and the second reference sample. [6] The method of claim 5, wherein the weights applied to each of the first prediction sample and the second reference sample are determined based on a position of the first reference sample and a position of the second sample of reference. reference. [7] The method of claim 1, wherein if the second prediction sample is generated it is determined according to a directionality of the intra-prediction mode. [8] 8. A method for encoding a video, comprising the method: determine an intraprediction mode of a current block; determining, as a function of the intra-prediction mode, a first reference sample of a prediction target sample included in the current block; generate a first prediction sample for the objective sample of prediction using the first reference sample; Y generate a second prediction sample for the prediction target sample using the first prediction sample and a second reference sample located in a different position from the first reference sample. [9] The method of claim 8, wherein the second reference sample comprises at least one of a reference sample that lies on the same horizontal line as the prediction target sample or a reference sample that is in a same vertical line as the objective sample of prediction. [10] The method of claim 8, wherein each of the first reference sample and the second reference sample is adjacent to different limits of the current block. [11] The method of claim 10, wherein a position of the second reference sample is determined based on a directionality of the intraprediction mode. [12] The method of claim 8, wherein the second prediction sample is generated based on a weighted sum of the first prediction sample and the second reference sample. [13] The method of claim 12, wherein the weights applied to each of the first prediction sample and the second sample of referenda are determined based on a position of the first reference sample and a position of the second reference sample. [14] 14. The method of claim 8, wherein if the second prediction sample is generated it is determined according to a directionality of the intraprediction mode. [15] 15. An apparatus for decoding a video, the apparatus comprising: an intra-prediction unit for determining an intra-prediction mode of a current block, to determine, based on the intra-prediction mode, a first reference sample of a prediction target sample included in the current block, to generate a first prediction sample for the target prediction sample using the first reference sample, and to generate a second prediction sample for the objective prediction sample using the first prediction sample and a second reference sample located in a different position from the first reference sample.
类似技术:
公开号 | 公开日 | 专利标题 ES2703607B2|2021-05-13|Method and apparatus for processing video signals ES2724568B2|2021-05-19|Method and apparatus for processing a video signal ES2739668B1|2021-12-03|METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNALS ES2800509B1|2021-12-21|METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNALS ES2724570A2|2019-09-12|Method and apparatus for processing video signals | ES2711189A2|2019-04-30|METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNALS | ES2710234B1|2020-03-09|Procedure and device for processing video signals ES2737874B2|2020-10-16|METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNAL ES2892473T3|2022-02-04|Method and device for performing image decoding based on intra-prediction in image coding systems ES2711474A2|2019-05-03|Method and device for processing video signal ES2711223A2|2019-04-30|Method and device for processing video signal ES2711473A2|2019-05-03|Method and apparatus for processing video signal ES2699749B2|2020-07-06|Method and apparatus for processing a video signal ES2737845B2|2021-05-19|METHOD AND APPARATUS TO PROCESS VIDEO SIGNAL ES2703458A2|2019-03-08|Video signal processing method and device CA3065922A1|2019-03-14|Method and device for processing video signal ES2711230A2|2019-04-30|Method and apparatus for processing video signal CA3065490A1|2018-11-22|Video signal processing in which intra prediction is performed in units of sub-blocks partitioned from coding block ES2711209A2|2019-04-30|Method and device for processing video signal
同族专利:
公开号 | 公开日 ES2711473R1|2021-04-07| US11240494B2|2022-02-01| EP3518535A1|2019-07-31| KR20180031614A|2018-03-28| US11190759B2|2021-11-30| US20190394460A1|2019-12-26| CN109716762A|2019-05-03| US10834386B2|2020-11-10| EP3518535A4|2020-04-22| US20210105462A1|2021-04-08| US20210195174A1|2021-06-24| WO2018056701A1|2018-03-29| US20210014485A1|2021-01-14|
引用文献:
公开号 | 申请日 | 公开日 | 申请人 | 专利标题 KR101510108B1|2009-08-17|2015-04-10|삼성전자주식회사|Method and apparatus for encoding video, and method and apparatus for decoding video| US9083974B2|2010-05-17|2015-07-14|Lg Electronics Inc.|Intra prediction modes| KR102043218B1|2010-05-25|2019-11-11|엘지전자 주식회사|New planar prediction mode| US8902978B2|2010-05-30|2014-12-02|Lg Electronics Inc.|Enhanced intra prediction mode signaling| KR101263090B1|2010-11-08|2013-05-09|성균관대학교산학협력단|Methods of encoding and decoding using multi-level prediction and apparatuses for using the same| CN107197257B|2010-12-08|2020-09-08|Lg 电子株式会社|Intra prediction method performed by encoding apparatus and decoding apparatus| US9693054B2|2010-12-22|2017-06-27|Lg Electronics Inc.|Intra prediction method and apparatus based on interpolation| US9420294B2|2011-02-23|2016-08-16|Lg Electronics Inc.|Intra-prediction method using filtering, and apparatus using the method| CA3082413C|2011-04-25|2022-01-25|Lg Electronics Inc.|Intra-prediction method, and video encoder and decoder using same| KR20120140181A|2011-06-20|2012-12-28|한국전자통신연구원|Method and apparatus for encoding and decoding using filtering for prediction block boundary| RU2627033C1|2011-06-28|2017-08-03|Самсунг Электроникс Ко., Лтд.|Method and device for coding and decoding image using internal prediction| GB2501535A|2012-04-26|2013-10-30|Sony Corp|Chrominance Processing in High Efficiency Video Codecs| WO2014003421A1|2012-06-25|2014-01-03|한양대학교 산학협력단|Video encoding and decoding method| US9461876B2|2012-08-29|2016-10-04|Loci|System and method for fuzzy concept mapping, voting ontology crowd sourcing, and technology prediction| US20150016516A1|2013-07-15|2015-01-15|Samsung Electronics Co., Ltd.|Method for intra prediction improvements for oblique modes in video coding| US10129542B2|2013-10-17|2018-11-13|Futurewei Technologies, Inc.|Reference pixel selection and filtering for intra coding of depth map| WO2017018664A1|2015-07-28|2017-02-02|엘지전자|Intra prediction mode-based image processing method and apparatus therefor| EP3367688A4|2015-10-21|2018-10-24|Sharp Kabushiki Kaisha|Predictive image generation device, image decoding device, and image encoding device| KR102028016B1|2016-01-18|2019-10-02|한양대학교 산학협력단|Method and apparatus for video coding/decoding using intra prediction| WO2017190288A1|2016-05-04|2017-11-09|Microsoft Technology Licensing, Llc|Intra-picture prediction using non-adjacent reference lines of sample values| WO2018047995A1|2016-09-08|2018-03-15|엘지전자|Intra-prediction mode-based image processing method and apparatus therefor|CA3082413C|2011-04-25|2022-01-25|Lg Electronics Inc.|Intra-prediction method, and video encoder and decoder using same| WO2018216862A1|2017-05-24|2018-11-29|엘지전자 주식회사|Method and device for decoding image according to intra prediction in image coding system| US10728542B2|2018-04-09|2020-07-28|Tencent America LLC|Methods and apparatuses for sub-block motion vector prediction| JP2021528901A|2018-07-14|2021-10-21|エルジー エレクトロニクス インコーポレイティドLg Electronics Inc.|Video decoding methods and devices that use intra-prediction-related information in video coding systems|
法律状态:
2019-05-03| BA2A| Patent application published|Ref document number: 2711473 Country of ref document: ES Kind code of ref document: A2 Effective date: 20190503 | 2021-04-07| EC2A| Search report published|Ref document number: 2711473 Country of ref document: ES Kind code of ref document: R1 Effective date: 20210329 |
优先权:
[返回顶部]
申请号 | 申请日 | 专利标题 KR20160120079|2016-09-20| PCT/KR2017/010353|WO2018056701A1|2016-09-20|2017-09-20|Method and apparatus for processing video signal| 相关专利
Sulfonates, polymers, resist compositions and patterning process
Washing machine
Washing machine
Device for fixture finishing and tension adjusting of membrane
Structure for Equipping Band in a Plane Cathode Ray Tube
Process for preparation of 7 alpha-carboxyl 9, 11-epoxy steroids and intermediates useful therein an
国家/地区
|