video: remove useless mp_imgfmt_desc.avformat field
Had 1 user; easily replaced.
This commit is contained in:
1 parent
d291673d40
commit
eb27baf5ec
3 files changed
+2
-5
No files matched your search
@@ -41,7 +41,6 @@ struct mp_imgfmt_entry {
|
||||
// - sets MP_IMGFLAG_HAS_COMPS|MP_IMGFLAG_NE if num_planes>0
|
||||
// - sets MP_IMGFLAG_TYPE_UINT if no other type set
|
||||
// - sets id to mp_imgfmt_list[] implied format
|
||||
// - sets avformat to AV_PIX_FMT_NONE
|
||||
struct mp_imgfmt_desc desc;
|
||||
};
|
||||
|
||||
@@ -395,7 +394,6 @@ static bool mp_imgfmt_get_desc_from_pixdesc(int mpfmt, struct mp_imgfmt_desc *ou
|
||||
|
||||
struct mp_imgfmt_desc desc = {
|
||||
.id = mpfmt,
|
||||
.avformat = fmt,
|
||||
.chroma_xs = pd->log2_chroma_w,
|
||||
.chroma_ys = pd->log2_chroma_h,
|
||||
};
|
||||
@@ -507,7 +505,6 @@ static bool get_native_desc(int mpfmt, struct mp_imgfmt_desc *desc)
|
||||
// Fill in some fields mp_imgfmt_entry.desc is not required to set.
|
||||
|
||||
desc->id = mpfmt;
|
||||
desc->avformat = AV_PIX_FMT_NONE;
|
||||
|
||||
for (int n = 0; n < MP_NUM_COMPONENTS; n++) {
|
||||
struct mp_imgfmt_comp_desc *cd = &desc->comps[n];
|
||||
|
||||
@@ -118,7 +118,6 @@ struct mp_imgfmt_comp_desc {
|
||||
|
||||
struct mp_imgfmt_desc {
|
||||
int id; // IMGFMT_*
|
||||
int avformat; // AV_PIX_FMT_* (or AV_PIX_FMT_NONE)
|
||||
int flags; // MP_IMGFLAG_* bitfield
|
||||
int8_t num_planes;
|
||||
int8_t chroma_xs, chroma_ys; // chroma shift (i.e. log2 of chroma pixel size)
|
||||
|
||||
+2
-1
@@ -393,9 +393,10 @@ static const int endian_swaps[][2] = {
|
||||
// might reduce the effective bit depth in some cases.
|
||||
struct mp_image *mp_img_swap_to_native(struct mp_image *img)
|
||||
{
|
||||
int avfmt = imgfmt2pixfmt(img->imgfmt);
|
||||
int to = AV_PIX_FMT_NONE;
|
||||
for (int n = 0; endian_swaps[n][0] != AV_PIX_FMT_NONE; n++) {
|
||||
if (endian_swaps[n][0] == img->fmt.avformat)
|
||||
if (endian_swaps[n][0] == avfmt)
|
||||
to = endian_swaps[n][1];
|
||||
}
|
||||
if (to == AV_PIX_FMT_NONE || !mp_image_make_writeable(img))
|
||||
|
||||
Reference in new issue
Block a user