Mercurial > mplayer.hg
view linux/strsep.c @ 8462:800d77666843
Support the latest development code from XViD dev-api-3 CVS
branch. Still compatible (at compile time) with the stable XViD code.
Adds :
- GMC, global motion compensation (gmc)
- quarter pixel motion estimation (qpel)
- B frames (max_bframes, bquant_ratio, bquant_offset)
- half-resolution U&V encoding (reduced)
- ?? (me_colour)
Based on a patch by Marco "elcabesa" Belli <elcabesa at inwind dot it>.
Also :
* renamed option "br" to "bitrate".
* renamed option "quality" to "me_quality" and defaults to 4 (fast and
still not that bad).
* added option "4mv", was previously silently included in quality 4, 5
and 6.
author | rguyom |
---|---|
date | Sun, 15 Dec 2002 18:35:11 +0000 |
parents | cbf0fed4d211 |
children |
line wrap: on
line source
/* strsep implementation for systems that do not have it in libc */ #include <stdio.h> #include <string.h> #include "../config.h" #ifndef HAVE_STRSEP char *strsep(char **stringp, const char *delim) { char *begin, *end; begin = *stringp; if(begin == NULL) return NULL; if(delim[0] == '\0' || delim[1] == '\0') { char ch = delim[0]; if(ch == '\0') end = NULL; else { if(*begin == ch) end = begin; else if(*begin == '\0') end = NULL; else end = strchr(begin + 1, ch); } } else end = strpbrk(begin, delim); if(end) { *end++ = '\0'; *stringp = end; } else *stringp = NULL; return begin; } #endif