rtpjpegpay: Ceil jpeg dimensions, instead of floor
authorSebastian Rasmussen <sebrn@axis.com>
Thu, 24 Nov 2011 12:58:01 +0000 (13:58 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 5 Dec 2011 09:48:54 +0000 (10:48 +0100)
commitc090201ca59f4d16df8af7390472b5eebfa86cab
tree3686cdd55113f607376c91ef0601e98557f325eb
parent0249a73a3e134b4b0c61864484a1654a9130a836
rtpjpegpay: Ceil jpeg dimensions, instead of floor

A JPEG image inside an RTP stream has a preceeding RFC2435 header that
conveys width/height. The dimensions in this header are limited to be
multiples of 8. Since JPEG uses an MCU of 8x8 pixels any image must
already indirectly have image data dimensions that are rounded up in
order to contain enough data to render the image. Therefore this fix
safely rounds the image dimensions in the RFC2435 header up to the
closest multiple of 8.
gst/rtp/gstrtpjpegpay.c