| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Aspect ratio modification video filter | 2 * Aspect ratio modification video filter |
| 3 * Copyright (c) 2010 Bobby Bingham | 3 * Copyright (c) 2010 Bobby Bingham |
| 4 | 4 |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 if(aspect->aspect.den == 0) | 53 if(aspect->aspect.den == 0) |
| 54 aspect->aspect = (AVRational) {0, 1}; | 54 aspect->aspect = (AVRational) {0, 1}; |
| 55 | 55 |
| 56 return 0; | 56 return 0; |
| 57 } | 57 } |
| 58 | 58 |
| 59 static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref) | 59 static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref) |
| 60 { | 60 { |
| 61 AspectContext *aspect = link->dst->priv; | 61 AspectContext *aspect = link->dst->priv; |
| 62 | 62 |
| 63 picref->pixel_aspect = aspect->aspect; | 63 picref->video->pixel_aspect = aspect->aspect; |
| 64 avfilter_start_frame(link->dst->outputs[0], picref); | 64 avfilter_start_frame(link->dst->outputs[0], picref); |
| 65 } | 65 } |
| 66 | 66 |
| 67 #if CONFIG_ASPECT_FILTER | 67 #if CONFIG_ASPECT_FILTER |
| 68 /* for aspect filter, convert from frame aspect ratio to pixel aspect ratio */ | 68 /* for aspect filter, convert from frame aspect ratio to pixel aspect ratio */ |
| 69 static int frameaspect_config_props(AVFilterLink *inlink) | 69 static int frameaspect_config_props(AVFilterLink *inlink) |
| 70 { | 70 { |
| 71 AspectContext *aspect = inlink->dst->priv; | 71 AspectContext *aspect = inlink->dst->priv; |
| 72 | 72 |
| 73 av_reduce(&aspect->aspect.num, &aspect->aspect.den, | 73 av_reduce(&aspect->aspect.num, &aspect->aspect.den, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 .start_frame = start_frame, | 114 .start_frame = start_frame, |
| 115 .end_frame = avfilter_null_end_frame
}, | 115 .end_frame = avfilter_null_end_frame
}, |
| 116 { .name = NULL}}, | 116 { .name = NULL}}, |
| 117 | 117 |
| 118 .outputs = (AVFilterPad[]) {{ .name = "default", | 118 .outputs = (AVFilterPad[]) {{ .name = "default", |
| 119 .type = AVMEDIA_TYPE_VIDEO, }, | 119 .type = AVMEDIA_TYPE_VIDEO, }, |
| 120 { .name = NULL}}, | 120 { .name = NULL}}, |
| 121 }; | 121 }; |
| 122 #endif /* CONFIG_PIXELASPECT_FILTER */ | 122 #endif /* CONFIG_PIXELASPECT_FILTER */ |
| 123 | 123 |
| OLD | NEW |