...
|
...
|
@@ -108,17 +108,17 @@ AVFilterFormats *ff_merge_formats(AVFilterFormats *a, AVFilterFormats *b,
|
108
|
108
|
To avoid that, pretend that there are no common formats to force the
|
109
|
109
|
insertion of a conversion filter. */
|
110
|
110
|
if (type == AVMEDIA_TYPE_VIDEO)
|
111
|
|
- for (i = 0; i < a->format_count; i++)
|
112
|
|
- for (j = 0; j < b->format_count; j++) {
|
113
|
|
- const AVPixFmtDescriptor *adesc = av_pix_fmt_desc_get(a->formats[i]);
|
114
|
|
- const AVPixFmtDescriptor *bdesc = av_pix_fmt_desc_get(b->formats[j]);
|
115
|
|
- alpha2 |= adesc->flags & bdesc->flags & PIX_FMT_ALPHA;
|
116
|
|
- chroma2|= adesc->nb_components > 1 && bdesc->nb_components > 1;
|
117
|
|
- if (a->formats[i] == b->formats[j]) {
|
118
|
|
- alpha1 |= adesc->flags & PIX_FMT_ALPHA;
|
119
|
|
- chroma1|= adesc->nb_components > 1;
|
|
111
|
+ for (i = 0; i < a->format_count; i++)
|
|
112
|
+ for (j = 0; j < b->format_count; j++) {
|
|
113
|
+ const AVPixFmtDescriptor *adesc = av_pix_fmt_desc_get(a->formats[i]);
|
|
114
|
+ const AVPixFmtDescriptor *bdesc = av_pix_fmt_desc_get(b->formats[j]);
|
|
115
|
+ alpha2 |= adesc->flags & bdesc->flags & PIX_FMT_ALPHA;
|
|
116
|
+ chroma2|= adesc->nb_components > 1 && bdesc->nb_components > 1;
|
|
117
|
+ if (a->formats[i] == b->formats[j]) {
|
|
118
|
+ alpha1 |= adesc->flags & PIX_FMT_ALPHA;
|
|
119
|
+ chroma1|= adesc->nb_components > 1;
|
|
120
|
+ }
|
120
|
121
|
}
|
121
|
|
- }
|
122
|
122
|
|
123
|
123
|
// If chroma or alpha can be lost through merging then do not merge
|
124
|
124
|
if (alpha2 > alpha1 || chroma2 > chroma1)
|