1. A method for lossless coding of image and video media, comprising: splitting input image data into block portions; for an individual one of the block portions, selecting one of multiple available differential pulse code modulation (DPCM) prediction modes to apply to the block portion that out of the available DPCM prediction modes yields a closer to optimal symbol distribution of an entropy encoder; applying the selected DPCM prediction mode to the block portion; and entropy encoding DPCM residuals of the block portion.