- if (strncmp("420jpeg",tokstart,7)==0)
- pix_fmt = PIX_FMT_YUV420P;
- else if (strncmp("420mpeg2",tokstart,8)==0)
- pix_fmt = PIX_FMT_YUV420P;
- else if (strncmp("420paldv", tokstart, 8)==0)
- pix_fmt = PIX_FMT_YUV420P;
- else if (strncmp("411", tokstart, 3)==0)
- pix_fmt = PIX_FMT_YUV411P;
- else if (strncmp("422", tokstart, 3)==0)
- pix_fmt = PIX_FMT_YUV422P;
- else if (strncmp("444alpha", tokstart, 8)==0) {
- av_log(s, AV_LOG_ERROR, "Cannot handle 4:4:4:4 YUV4MPEG stream.\n");
+ if (strncmp("420jpeg", tokstart, 7) == 0) {
+ pix_fmt = AV_PIX_FMT_YUV420P;
+ chroma_sample_location = AVCHROMA_LOC_CENTER;
+ } else if (strncmp("420mpeg2", tokstart, 8) == 0) {
+ pix_fmt = AV_PIX_FMT_YUV420P;
+ chroma_sample_location = AVCHROMA_LOC_LEFT;
+ } else if (strncmp("420paldv", tokstart, 8) == 0) {
+ pix_fmt = AV_PIX_FMT_YUV420P;
+ chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
+ } else if (strncmp("420", tokstart, 3) == 0) {
+ pix_fmt = AV_PIX_FMT_YUV420P;
+ chroma_sample_location = AVCHROMA_LOC_CENTER;
+ } else if (strncmp("411", tokstart, 3) == 0)
+ pix_fmt = AV_PIX_FMT_YUV411P;
+ else if (strncmp("422", tokstart, 3) == 0)
+ pix_fmt = AV_PIX_FMT_YUV422P;
+ else if (strncmp("444alpha", tokstart, 8) == 0 ) {
+ av_log(s, AV_LOG_ERROR, "Cannot handle 4:4:4:4 "
+ "YUV4MPEG stream.\n");