In this paper, we propose two-layer coding algorithm to improve the performance of the H.264-based lossless (H.264-LS) image coding. From universal access point of view, the proposed method is based on the H.264 lossy image coding with other CABAC layer to compensate the lossy portion. Besides, the H.264-LS with DPCM (H.264-LS_DPCM) and H.264-LS achieve different coding performance in use of CABAC and CAVLC entropy coders without the DCT and quantization. We further suggest an adaptive entropy coding (AEC) algorithm to determine the best entropy coder by using the image content variations, which is calculated from the sum of absolute difference of intra prediction. Simulation results show that the proposed AEC method have good correct detection rates and improvement of compression rate for H.264-LS and H.264-LS_DPCM coders. The two-layer H.264-LS almost have the same compression rate than the H.264-LS_DPCM.