}
/* encoder management */
-AVCodec *first_avcodec = NULL;
+static AVCodec *first_avcodec = NULL;
AVCodec *av_codec_next(AVCodec *c){
if(c) return c->next;
*width = ALIGN(*width , w_align);
*height= ALIGN(*height, h_align);
+ if(s->codec_id == CODEC_ID_H264)
+ *height+=2; // some of the optimized chroma MC reads one line too much
}
int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){
{"dct8x8", "high profile 8x8 transform (H.264)", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_8X8DCT, INT_MIN, INT_MAX, V|E, "flags2"},
{"fastpskip", "fast pskip (H.264)", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_FASTPSKIP, INT_MIN, INT_MAX, V|E, "flags2"},
{"aud", "access unit delimiters (H.264)", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_AUD, INT_MIN, INT_MAX, V|E, "flags2"},
-{"brdo", "b-frame rate-distortion optimization", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_BRDO, INT_MIN, INT_MAX, V|E, "flags2"},
{"skiprd", "RD optimal MB level residual skipping", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_SKIP_RD, INT_MIN, INT_MAX, V|E, "flags2"},
{"complexityblur", "reduce fluctuations in qp (before curve compression)", OFFSET(complexityblur), FF_OPT_TYPE_FLOAT, 20.0, FLT_MIN, FLT_MAX, V|E},
{"deblockalpha", "in-loop deblocking filter alphac0 parameter", OFFSET(deblockalpha), FF_OPT_TYPE_INT, DEFAULT, -6, 6, V|E},
AVCodec *avcodec_find_encoder_by_name(const char *name)
{
AVCodec *p;
+ if (!name)
+ return NULL;
p = first_avcodec;
while (p) {
if (p->encode != NULL && strcmp(name,p->name) == 0)
AVCodec *avcodec_find_decoder_by_name(const char *name)
{
AVCodec *p;
+ if (!name)
+ return NULL;
p = first_avcodec;
while (p) {
if (p->decode != NULL && strcmp(name,p->name) == 0)
int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str)
{
int i;
- int n = sizeof(video_frame_size_abbrs) / sizeof(VideoFrameSizeAbbr);
+ int n = FF_ARRAY_ELEMS(video_frame_size_abbrs);
const char *p;
int frame_width = 0, frame_height = 0;
int av_parse_video_frame_rate(AVRational *frame_rate, const char *arg)
{
int i;
- int n = sizeof(video_frame_rate_abbrs) / sizeof(VideoFrameRateAbbr);
+ int n = FF_ARRAY_ELEMS(video_frame_rate_abbrs);
char* cp;
/* First, we check our abbreviation table */