Opened 12 years ago
Closed 12 years ago
#2578 closed defect (fixed)
avcodec_find_best_pix_fmt_of_list gives wrong format
Reported by: | str | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
avcodec_find_best_pix_fmt_of_list gives me AV_PIX_FMT_PAL8 instead of AV_PIX_FMT_GRAY8, although src is AV_PIX_FMT_GRAY8 and it is contained in the list.
How to reproduce:
Use the ffmpeg API and try to call avcodec_find_best_pix_fmt_of_list with src = GRAY8. As destination list I used the list of png encoder, which contains GRAY8 as well as PAL8.
Change History (6)
follow-up: 2 comment:1 by , 12 years ago
comment:2 by , 12 years ago
Replying to cehoyos:
Is this also reproducible with current git head?
How can I reproduce this problem?
Yes. This problem also occurs in git head.
I already explained how to reproduce:
Simply call
avcodec_find_best_pix_fmt_of_list(pix_fmt_list, AV_PIX_FMT_GRAY8, 0, 0)
with the pix_fmt_list taken from png encoder for example.
comment:3 by , 12 years ago
What I meant was:
Assuming this is not reproducible with ffmpeg
(or is it?), could you provide source code that allows to reproduce the problem?
comment:4 by , 12 years ago
Version: | 1.2 → git-master |
---|
comment:5 by , 12 years ago
AVPixelFormat list[] = {PIX_FMT_PAL8, PIX_FMT_GRAY8}; AVPixelFormat src = PIX_FMT_GRAY8; AVPixelFormat res = avcodec_find_best_pix_fmt_of_list(list, src, 0, 0); //res is PIX_FMT_PAL8 instead of PIX_FMT_GRAY8
comment:6 by , 12 years ago
Reproduced by developer: | set |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Is this also reproducible with current git head?
How can I reproduce this problem?