History

avfilter/drawutils: remove redundant xyz format check

The code above this does a whitelist on desc->flags, which now includes the (disallowed) AV_PIX_FMT_FLAG_XYZ for XYZ formats. So there is no more need for a separate check, here.

Niklas Haas committed 3 years ago

Commit d312a331 parent 57c16321 file · +0 −3Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/drawutils.c+0−3
@@ -22,7 +22,6 @@ · 21 unmodified lines
22#include <string.h>22#include <string.h>
23 23
24#include "libavutil/avassert.h"24#include "libavutil/avassert.h"
25#include "libavutil/avstring.h"
26#include "libavutil/avutil.h"25#include "libavutil/avutil.h"
27#include "libavutil/csp.h"26#include "libavutil/csp.h"
28#include "libavutil/intreadwrite.h"27#include "libavutil/intreadwrite.h"
@@ -94,8 +93,6 @@ int ff_draw_init2(FFDrawContext *draw, enum AVPixelFormat format, enum AVColorSp · 65 unmodified lines
94 return AVERROR(ENOSYS);93 return AVERROR(ENOSYS);
95 if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))94 if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))
96 return AVERROR(ENOSYS);95 return AVERROR(ENOSYS);
97 if (av_strstart(desc->name, "xyz", NULL))
98 return AVERROR(ENOSYS);
99 if (csp == AVCOL_SPC_UNSPECIFIED)96 if (csp == AVCOL_SPC_UNSPECIFIED)
100 csp = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? AVCOL_SPC_RGB : AVCOL_SPC_SMPTE170M;97 csp = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? AVCOL_SPC_RGB : AVCOL_SPC_SMPTE170M;
101 if (!(desc->flags & AV_PIX_FMT_FLAG_RGB) && !(luma = av_csp_luma_coeffs_from_avcsp(csp)))98 if (!(desc->flags & AV_PIX_FMT_FLAG_RGB) && !(luma = av_csp_luma_coeffs_from_avcsp(csp)))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t