Method and apparatus for decoding a video signal

    公开(公告)号:US12120352B2

    公开(公告)日:2024-10-15

    申请号:US17208100

    申请日:2021-03-22

    摘要: The present invention relates to a method for decoding a video signal, comprising the steps of: acquiring a transform size flag of the current macroblock from a video signal; checking the number of non-zero transform coefficients at each pixel position in a first transform block which corresponds to the transform size flag; changing a scan order of the first transform block by prioritizing the position of the pixel having the greatest number of the non-zero transform coefficients in the first transform block; determining the number of the non-zero transform coefficients at each pixel position in a second transform block, and setting the changed scan order of the first transform block as an initialized scan order of the second transform block; adding the number of the non-zero transform coefficients at each pixel position in the first transform block and the number of the non-zero transform coefficients at each pixel position in the second transform block, and changing the scan order of the second transform block by prioritizing the position of the pixel having the greatest number of the non-zero transform coefficients; and decoding the transform coefficients arranged in the scan order changed in the previous step, wherein the first transform block and the second transform block have sizes corresponding to the transform size flag, and are contained in the current macroblock.