On Mon, Jan 13, 2014 at 09:00:39PM +0100, Kostya Shishkov wrote:
> --- a/libavcodec/dxtory.c
> +++ b/libavcodec/dxtory.c
> @@ -182,6 +570,97 @@ static int dxtory_decode_v2(AVCodecContext *avctx,
> AVFrame *pic,
> +static int dxtory_decode_v2_444(AVCodecContext *avctx, AVFrame *pic,
> + const uint8_t *src, int src_size)
> +{
> + if (!nslices || avctx->height % nslices) {
> + avpriv_request_sample(avctx, "%d slices for %dx%d", nslices,
> + avctx->width, avctx->height);
> + return AVERROR(ENOSYS);
> + }
> @@ -29,8 +29,78 @@
> +static int dxtory_decode_v2_565(AVCodecContext *avctx, AVFrame *pic,
> + const uint8_t *src, int src_size, int is_565)
> +{
> +
> + if (!nslices || avctx->height % nslices) {
> + avpriv_request_sample(avctx, "%d slices for %dx%d", nslices,
> + avctx->width, avctx->height);
> + return AVERROR(ENOSYS);
> + }
> +}
> +
> +static int dxtory_decode_v2_rgb(AVCodecContext *avctx, AVFrame *pic,
> + const uint8_t *src, int src_size)
> +{
> +
> + if (!nslices || avctx->height % nslices) {
> + avpriv_request_sample(avctx, "%d slices for %dx%d", nslices,
> + avctx->width, avctx->height);
> + return AVERROR(ENOSYS);
> + }
> +}
> +
> +static int dxtory_decode_v2_410(AVCodecContext *avctx, AVFrame *pic,
> + const uint8_t *src, int src_size)
> +{
> +
> + if (!nslices || avctx->height % nslices) {
> + avpriv_request_sample(avctx, "%d slices for %dx%d", nslices,
> + avctx->width, avctx->height);
> + return AVERROR(ENOSYS);
> + }
We usually return PATCHESWELCOME after avpriv_request_sample().
> + slice_height = avctx->height / nslices;
> + if ((avctx->width & 3) || (slice_height & 3)) {
> + avpriv_request_sample(avctx, "slice dimensions %dx%d",
> + avctx->width, slice_height);
> + }
> +}
Why no return here?
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel