A processing apparatus which performs entropy encoding, the processing apparatus comprising: a first memory configured to store a reference frame which is restored after encoding, and a processor comprising a second memory, the second memory configured to store reference pixel values, the processor configured to: divide a frame in video content into a plurality of coding units, CUs, and encode the plurality of CUs in a diagonal order to generate an encoded frame; wherein the encoding type is determined on a CU-by-CU basis, wherein when a first CU is encoded based on an inter encoding type, the processor is further configured to load, from the first memory, a first partial region of the reference frame corresponding to first position information of the first CU to the second memory, wherein the first partial region is formed by extending a region corresponding to the first CU in right, left, up and down directions, in the reference frame and encode the first CU based on the first partial region of the reference frame stored in the second memory, wherein, when the first CU is encoded based on an intra encoding type, the processor is further configured to encode the first CU based on a first reference pixel value, a second reference pixel value, and a left pixel value of the first CU corresponding to the first position information, wherein the first reference pixel value corresponds to a pixel that is above the first CU and the second reference pixel value corresponds to a pixel above a CU right adjacent the first CU and the first and second reference pixel values are stored in the second memory, and, upon completing the encoding of the first CU, restore the encoded first CU, store a third reference pixel value included in the restored first CU in the second memory, and delete a reference pixel value that is not used in intra encoding of a next CU among the reference pixel values stored in the second memory, wherein the second memory has higher speed and a smaller capacity than the first memory. a first memory configured to store a reference frame which is restored after encoding, and a processor comprising a second memory, the second memory configured to store reference pixel values, the processor configured to: divide a frame in video content into a plurality of coding units, CUs, and encode the plurality of CUs in a diagonal order to generate an encoded frame; wherein the encoding type is determined on a CU-by-CU basis, wherein when a first CU is encoded based on an inter encoding type, the processor is further configured to load, from the first memory, a first partial region of the reference frame corresponding to first position information of the first CU to the second memory, wherein the first partial region is formed by extending a region corresponding to the first CU in right, left, up and down directions, in the reference frame and encode the first CU based on the first partial region of the reference frame stored in the second memory, wherein, when the first CU is encoded based on an intra encoding type, the processor is further configured to encode the first CU based on a first reference pixel value, a second reference pixel value, and a left pixel value of the first CU corresponding to the first position information, wherein the first reference pixel value corresponds to a pixel that is above the first CU and the second reference pixel value corresponds to a pixel above a CU right adjacent the first CU and the first and second reference pixel values are stored in the second memory, and, upon completing the encoding of the first CU, restore the encoded first CU, store a third reference pixel value included in the restored first CU in the second memory, and delete a reference pixel value that is not used in intra encoding of a next CU among the reference pixel values stored in the second memory, wherein the second memory has higher speed and a smaller capacity than the first memory. divide a frame in video content into a plurality of coding units, CUs, and encode the plurality of CUs in a diagonal order to generate an encoded frame; wherein the encoding type is determined on a CU-by-CU basis, wherein when a first CU is encoded based on an inter encoding type, the processor is further configured to load, from the first memory, a first partial region of the reference frame corresponding to first position information of the first CU to the second memory, wherein the first partial region is formed by extending a region corresponding to the first CU in right, left, up and down directions, in the reference frame and encode the first CU based on the first partial region of the reference frame stored in the second memory, wherein, when the first CU is encoded based on an intra encoding type, the processor is further configured to encode the first CU based on a first reference pixel value, a second reference pixel value, and a left pixel value of the first CU corresponding to the first position information, wherein the first reference pixel value corresponds to a pixel that is above the first CU and the second reference pixel value corresponds to a pixel above a CU right adjacent the first CU and the first and second reference pixel values are stored in the second memory, and, upon completing the encoding of the first CU, restore the encoded first CU, store a third reference pixel value included in the restored first CU in the second memory, and delete a reference pixel value that is not used in intra encoding of a next CU among the reference pixel values stored in the second memory, wherein the second memory has higher speed and a smaller capacity than the first memory.