mirror of
https://github.com/facefusion/facefusion.git
synced 2026-06-02 19:01:35 +02:00
rename methods (#1102)
This commit is contained in:
@@ -7,7 +7,7 @@ from tests.assert_helper import get_test_example_file, get_test_examples_directo
|
||||
from facefusion import state_manager
|
||||
from facefusion.download import conditional_download
|
||||
from facefusion.libraries import vpx as vpx_module
|
||||
from facefusion.video_encoder import create_vpx_encoder, destroy_vpx_encoder, encode_vpx
|
||||
from facefusion.video_encoder import create_vpx_encoder, destroy_vpx_encoder, encode_vpx_buffer
|
||||
from facefusion.vision import read_video_frame
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@ def test_create_vpx_encoder() -> None:
|
||||
assert create_vpx_encoder(0, 0, 0) is None
|
||||
|
||||
|
||||
# TODO: rename to test_encode_vpx_buffer
|
||||
def test_encode_vpx() -> None:
|
||||
def test_encode_vpx_buffer() -> None:
|
||||
vision_frame = read_video_frame(get_test_example_file('target-240p.mp4'))
|
||||
height, width = vision_frame.shape[:2]
|
||||
vpx_encoder = create_vpx_encoder(width, height, 1000)
|
||||
@@ -34,8 +33,8 @@ def test_encode_vpx() -> None:
|
||||
buffer_valid = cv2.cvtColor(vision_frame, cv2.COLOR_BGR2YUV_I420).tobytes()
|
||||
buffer_invalid = bytes(0)
|
||||
|
||||
assert encode_vpx(vpx_encoder, buffer_valid, width, height, 3, 1)
|
||||
assert encode_vpx(vpx_encoder, buffer_invalid, width, height, 0, 0) == b''
|
||||
assert encode_vpx_buffer(vpx_encoder, buffer_valid, width, height, 3, 1)
|
||||
assert encode_vpx_buffer(vpx_encoder, buffer_invalid, width, height, 0, 0) == b''
|
||||
|
||||
|
||||
def test_destroy_vpx_encoder() -> None:
|
||||
|
||||
Reference in New Issue
Block a user