Improve check to apply X265 API workaround
Not a perfect check, since the commit in the x265 repo that introduces it doesn't bump the X265_BUILD constant like it probably should have. There's still a range of x265 commits from 2024-10-04 to 2024-11-12 where fceux will not build against the development version of x265. If that's the case, just update to the latest x265. Research shows: https://bitbucket.org/multicoreware/x265_git@c8c9d22075b26aa279b4d634c61889ca3d49656e: - X265_BUILD: 209 -> 210 - MAX_SCALABLE_LAYERS: undefined https://bitbucket.org/multicoreware/x265_git@c69c113960834400545bc4bce2830ff51dcb86b3: - API change introduced; workaround needed - X265_BUILD: 210 - MAX_SCALABLE_LAYERS: defined https://bitbucket.org/multicoreware/x265_git@78e5b703b186fe184bf91bb37df82f64059b3f61: - API change reverted; using our workaround now breaks the fceux build - X265_BUILD: 213 - MAX_SCALABLE_LAYERS: still defined https://bitbucket.org/multicoreware/x265_git@451add89e81d45134b9d41168ceeb5516bf62d0b: - X265_BUILD: 213 -> 214 - MAX_SCALABLE_LAYERS: still defined - Using our workaround still breaks the fceux build
This commit is contained in:
parent
fe65681012
commit
2caf314fd5
|
@ -461,8 +461,8 @@ static int encode_frame( unsigned char *inBuf, int width, int height )
|
|||
pic->stride[1] = width/2;
|
||||
pic->stride[2] = width/2;
|
||||
|
||||
#ifdef MAX_SCALABLE_LAYERS
|
||||
/* Handle API changes for scalable layers output in x265 4.0 */
|
||||
#if X265_BUILD >= 210 && X265_BUILD <= 213 && defined(MAX_SCALABLE_LAYERS)
|
||||
/* Handle temporary API changes for scalable layers output in x265 4.0 */
|
||||
x265_picture *pics[MAX_SCALABLE_LAYERS] = {NULL};
|
||||
pics[0] = pic;
|
||||
ret = x265_encoder_encode( hdl, &nal, &i_nal, pic, pics );
|
||||
|
@ -501,8 +501,8 @@ static int close(void)
|
|||
/* Flush delayed frames */
|
||||
while( hdl != NULL )
|
||||
{
|
||||
#ifdef MAX_SCALABLE_LAYERS
|
||||
/* Handle API changes for scalable layers output in x265 4.0 */
|
||||
#if X265_BUILD >= 210 && X265_BUILD <= 213 && defined(MAX_SCALABLE_LAYERS)
|
||||
/* Handle temporary API changes for scalable layers output in x265 4.0 */
|
||||
x265_picture *pics[MAX_SCALABLE_LAYERS] = {NULL};
|
||||
pics[0] = pic;
|
||||
ret = x265_encoder_encode( hdl, &nal, &i_nal, pic, pics );
|
||||
|
|
Loading…
Reference in New Issue