Commit b9e941fb authored by stefano's avatar stefano

Cosmetics: make more compact the code for handle_jpeg(), this also allows

vertical alignment. Improve readability.

git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@31186 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 08d1a1fe
......@@ -761,20 +761,11 @@ int sws_getColorspaceDetails(SwsContext *c, int **inv_table, int *srcRange, int
static int handle_jpeg(enum PixelFormat *format)
{
switch (*format) {
case PIX_FMT_YUVJ420P:
*format = PIX_FMT_YUV420P;
return 1;
case PIX_FMT_YUVJ422P:
*format = PIX_FMT_YUV422P;
return 1;
case PIX_FMT_YUVJ444P:
*format = PIX_FMT_YUV444P;
return 1;
case PIX_FMT_YUVJ440P:
*format = PIX_FMT_YUV440P;
return 1;
default:
return 0;
case PIX_FMT_YUVJ420P: *format = PIX_FMT_YUV420P; return 1;
case PIX_FMT_YUVJ422P: *format = PIX_FMT_YUV422P; return 1;
case PIX_FMT_YUVJ444P: *format = PIX_FMT_YUV444P; return 1;
case PIX_FMT_YUVJ440P: *format = PIX_FMT_YUV440P; return 1;
default: return 0;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment