equal
deleted
inserted
replaced
206 avcodec_get_context_defaults3(g_pVideo, g_pVCodec); |
206 avcodec_get_context_defaults3(g_pVideo, g_pVCodec); |
207 g_pVideo->codec_id = g_pVCodec->id; |
207 g_pVideo->codec_id = g_pVCodec->id; |
208 |
208 |
209 // put parameters |
209 // put parameters |
210 // resolution must be a multiple of two |
210 // resolution must be a multiple of two |
211 g_pVideo->width = g_Width; |
211 g_pVideo->width = g_Width & ~1; // make even (dimensions should be even) |
212 g_pVideo->height = g_Height; |
212 g_pVideo->height = g_Height & ~1; // make even |
213 /* time base: this is the fundamental unit of time (in seconds) in terms |
213 /* time base: this is the fundamental unit of time (in seconds) in terms |
214 of which frame timestamps are represented. for fixed-fps content, |
214 of which frame timestamps are represented. for fixed-fps content, |
215 timebase should be 1/framerate and timestamp increments should be |
215 timebase should be 1/framerate and timestamp increments should be |
216 identically 1. */ |
216 identically 1. */ |
217 g_pVideo->time_base.den = g_Framerate.num; |
217 g_pVideo->time_base.den = g_Framerate.num; |
342 int VQuality, int AQuality) |
342 int VQuality, int AQuality) |
343 { |
343 { |
344 AddFileLogRaw = pAddFileLogRaw; |
344 AddFileLogRaw = pAddFileLogRaw; |
345 av_log_set_callback( &LogCallback ); |
345 av_log_set_callback( &LogCallback ); |
346 |
346 |
347 g_Width = Width & ~1; // make even (dimensions should be even) |
347 g_Width = Width; |
348 g_Height = Height & ~1; // make even |
348 g_Height = Height; |
349 g_Framerate.num = FramerateNum; |
349 g_Framerate.num = FramerateNum; |
350 g_Framerate.den = FramerateDen; |
350 g_Framerate.den = FramerateDen; |
351 g_VQuality = VQuality; |
351 g_VQuality = VQuality; |
352 g_AQuality = AQuality; |
352 g_AQuality = AQuality; |
353 g_pPreset = pVPreset; |
353 g_pPreset = pVPreset; |