[visual_resize] take unsigned rows, cols

dankamongmen/windows-tester
nick black 3 years ago
parent 23eaac9ced
commit 9989d6732a
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1752,7 +1752,7 @@ typedef struct ncvisual_implementation {
struct ncplane* (*visual_subtitle)(struct ncplane* parent, const struct ncvisual* ncv);
int rowalign; // rowstride base, can be 0 for no padding
// do a persistent resize, changing the ncv itself
int (*visual_resize)(struct ncvisual* ncv, int rows, int cols);
int (*visual_resize)(struct ncvisual* ncv, unsigned rows, unsigned cols);
void (*visual_destroy)(struct ncvisual* ncv);
bool canopen_images;
bool canopen_videos;

@ -607,7 +607,7 @@ ffmpeg_resize_internal(const ncvisual* ncv, int rows, int* stride, int cols,
}
// resize frame, converting to RGBA (if necessary) along the way
int ffmpeg_resize(ncvisual* n, int rows, int cols){
int ffmpeg_resize(ncvisual* n, unsigned rows, unsigned cols){
struct blitterargs bargs = {};
int stride;
void* data = ffmpeg_resize_internal(n, rows, &stride, cols, &bargs);

@ -126,7 +126,7 @@ int oiio_decode_loop(ncvisual* ncv){
}
// resize, converting to RGBA (if necessary) along the way
int oiio_resize(ncvisual* nc, int rows, int cols) {
int oiio_resize(ncvisual* nc, unsigned rows, unsigned cols) {
//fprintf(stderr, "%d/%d -> %d/%d on the resize\n", nc->pixy, nc->pixx, rows, cols);
auto ibuf = std::make_unique<OIIO::ImageBuf>();
if(nc->details->ibuf && (nc->pixx != cols || nc->pixy != rows)){ // scale it

Loading…
Cancel
Save