Method and apparatus for video encoding based on internal bitdepth increment, method and apparatus for video decoding based on internal bitdepth increment

Dynamically based on the bit depth of the restoration image reduced by descaling for reducing the expanded bit depth range is, and the dynamic range based on the bit depth of the input image, and determines the scaling a way as to match the pixel values ​​of the input image generating the internal image of the bit depth extension by applying a scaling method for, and video based on each maximum coding unit within the image of the extended bit depth, for encoding to determine the encoding unit according to the tree structure, bit depth extension this coding method is disclosed.