unbreak the y4m provider

Originally committed to SVN as r3541.
This commit is contained in:
Karl Blomster 2009-09-19 21:34:40 +00:00
parent 7ba66342b0
commit 57d549f538

View file

@ -123,9 +123,9 @@ void YUV4MPEGVideoProvider::LoadVideo(const wxString _filename) {
case Y4M_PIXFMT_420JPEG: case Y4M_PIXFMT_420JPEG:
case Y4M_PIXFMT_420MPEG2: case Y4M_PIXFMT_420MPEG2:
case Y4M_PIXFMT_420PALDV: case Y4M_PIXFMT_420PALDV:
chroma_sz = (w * h) / 2; break; chroma_sz = (w * h) >> 2; break;
case Y4M_PIXFMT_422: case Y4M_PIXFMT_422:
chroma_sz = (w / 2) * h; break; // should be safe to assume that width is mod2 chroma_sz = (w * h) >> 1; break;
/// @todo add support for more pixel formats /// @todo add support for more pixel formats
default: default:
throw wxString(_T("Unsupported pixel format")); throw wxString(_T("Unsupported pixel format"));