mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/libx264: set supported pix_fmts at runtime rather than build time
This partially reverts a change in behavior introduced in2a111c99a6
. Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit7e60c74329
)
This commit is contained in:
parent
650cb712ef
commit
d8104977bb
@ -911,14 +911,16 @@ static const enum AVPixelFormat pix_fmts_8bit_rgb[] = {
|
||||
|
||||
static av_cold void X264_init_static(AVCodec *codec)
|
||||
{
|
||||
if (X264_BIT_DEPTH == 8)
|
||||
#if X264_BUILD < 153
|
||||
if (x264_bit_depth == 8)
|
||||
codec->pix_fmts = pix_fmts_8bit;
|
||||
else if (X264_BIT_DEPTH == 9)
|
||||
else if (x264_bit_depth == 9)
|
||||
codec->pix_fmts = pix_fmts_9bit;
|
||||
else if (X264_BIT_DEPTH == 10)
|
||||
else if (x264_bit_depth == 10)
|
||||
codec->pix_fmts = pix_fmts_10bit;
|
||||
else /* X264_BIT_DEPTH == 0 */
|
||||
codec->pix_fmts = pix_fmts;
|
||||
#else
|
||||
codec->pix_fmts = pix_fmts;
|
||||
#endif
|
||||
}
|
||||
|
||||
#define OFFSET(x) offsetof(X264Context, x)
|
||||
|
Loading…
Reference in New Issue
Block a user