This only adds a subset of the frame rates that can be stored, a full list would be more than 500 entries. Such full list could (and should) be added if it has a usecase but the number of users of even the now added rates seem rather small. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>tags/n1.1
| @@ -325,6 +325,72 @@ const AVRational avpriv_frame_rate_tab[16] = { | |||||
| { 0, 0}, | { 0, 0}, | ||||
| }; | }; | ||||
| const AVRational ff_mpeg2_frame_rate_tab[] = { | |||||
| { 1, 1}, | |||||
| { 2, 1}, | |||||
| { 3, 1}, | |||||
| { 4, 1}, | |||||
| { 5, 1}, | |||||
| { 6, 1}, | |||||
| { 8, 1}, | |||||
| { 9, 1}, | |||||
| { 10, 1}, | |||||
| { 12, 1}, | |||||
| { 15, 1}, | |||||
| { 16, 1}, | |||||
| { 18, 1}, | |||||
| { 20, 1}, | |||||
| { 24, 1}, | |||||
| { 25, 1}, | |||||
| { 30, 1}, | |||||
| { 32, 1}, | |||||
| { 36, 1}, | |||||
| { 40, 1}, | |||||
| { 45, 1}, | |||||
| { 48, 1}, | |||||
| { 50, 1}, | |||||
| { 60, 1}, | |||||
| { 72, 1}, | |||||
| { 75, 1}, | |||||
| { 80, 1}, | |||||
| { 90, 1}, | |||||
| { 96, 1}, | |||||
| { 100, 1}, | |||||
| { 120, 1}, | |||||
| { 150, 1}, | |||||
| { 180, 1}, | |||||
| { 200, 1}, | |||||
| { 240, 1}, | |||||
| { 750, 1001}, | |||||
| { 800, 1001}, | |||||
| { 960, 1001}, | |||||
| { 1000, 1001}, | |||||
| { 1200, 1001}, | |||||
| { 1250, 1001}, | |||||
| { 1500, 1001}, | |||||
| { 1600, 1001}, | |||||
| { 1875, 1001}, | |||||
| { 2000, 1001}, | |||||
| { 2400, 1001}, | |||||
| { 2500, 1001}, | |||||
| { 3000, 1001}, | |||||
| { 3750, 1001}, | |||||
| { 4000, 1001}, | |||||
| { 4800, 1001}, | |||||
| { 5000, 1001}, | |||||
| { 6000, 1001}, | |||||
| { 7500, 1001}, | |||||
| { 8000, 1001}, | |||||
| { 10000, 1001}, | |||||
| { 12000, 1001}, | |||||
| { 15000, 1001}, | |||||
| { 20000, 1001}, | |||||
| { 24000, 1001}, | |||||
| { 30000, 1001}, | |||||
| { 60000, 1001}, | |||||
| { 0, 0}, | |||||
| }; | |||||
| const float ff_mpeg1_aspect[16]={ | const float ff_mpeg1_aspect[16]={ | ||||
| 0.0000, | 0.0000, | ||||
| 1.0000, | 1.0000, | ||||
| @@ -49,6 +49,7 @@ extern const uint8_t ff_mpeg12_mbPatTable[64][2]; | |||||
| extern const uint8_t ff_mpeg12_mbMotionVectorTable[17][2]; | extern const uint8_t ff_mpeg12_mbMotionVectorTable[17][2]; | ||||
| extern const AVRational avpriv_frame_rate_tab[]; | extern const AVRational avpriv_frame_rate_tab[]; | ||||
| extern const AVRational ff_mpeg2_frame_rate_tab[]; | |||||
| extern const float ff_mpeg1_aspect[16]; | extern const float ff_mpeg1_aspect[16]; | ||||
| extern const AVRational ff_mpeg2_aspect[16]; | extern const AVRational ff_mpeg2_aspect[16]; | ||||
| @@ -998,7 +998,7 @@ AVCodec ff_mpeg2video_encoder = { | |||||
| .init = encode_init, | .init = encode_init, | ||||
| .encode2 = ff_MPV_encode_picture, | .encode2 = ff_MPV_encode_picture, | ||||
| .close = ff_MPV_encode_end, | .close = ff_MPV_encode_end, | ||||
| .supported_framerates = avpriv_frame_rate_tab + 1, | |||||
| .supported_framerates = ff_mpeg2_frame_rate_tab, | |||||
| .pix_fmts = (const enum PixelFormat[]){ | .pix_fmts = (const enum PixelFormat[]){ | ||||
| PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE | PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE | ||||
| }, | }, | ||||