Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/preview' into gfx-rdp
Browse files Browse the repository at this point in the history
  • Loading branch information
rasky committed Mar 16, 2024
2 parents 46cc9ff + 8dfd116 commit 596490a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/videoplayer/videoplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main(void) {
fclose(f);

mpeg2_t mp2;
mpeg2_open(&mp2, "rom:/movie.m1v");
mpeg2_open(&mp2, "rom:/movie.m1v", display_get_width(), display_get_height());

wav64_t music;
wav64_open(&music, "movie.wav64");
Expand Down
2 changes: 1 addition & 1 deletion include/mpeg2.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ typedef struct {
yuv_blitter_t yuv_blitter;
} mpeg2_t;

void mpeg2_open(mpeg2_t *mp2, const char *fn);
void mpeg2_open(mpeg2_t *mp2, const char *fn, int output_width, int output_height);
float mpeg2_get_framerate(mpeg2_t *mp2);
bool mpeg2_next_frame(mpeg2_t *mp2);
void mpeg2_draw_frame(mpeg2_t *mp2, display_context_t disp);
Expand Down
4 changes: 2 additions & 2 deletions src/video/mpeg2.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void rsp_mpeg1_set_quant_matrix(bool intra, const uint8_t quant_mtx[64]) {
#define PL_MPEG_IMPLEMENTATION
#include "pl_mpeg/pl_mpeg.h"

void mpeg2_open(mpeg2_t *mp2, const char *fn) {
void mpeg2_open(mpeg2_t *mp2, const char *fn, int output_width, int output_height) {
memset(mp2, 0, sizeof(mpeg2_t));

rsp_mpeg1_init();
Expand Down Expand Up @@ -126,7 +126,7 @@ void mpeg2_open(mpeg2_t *mp2, const char *fn) {
// Create a YUV blitter for this resolution
mp2->yuv_blitter = yuv_blitter_new_fmv(
width, height,
display_get_width(), display_get_height(),
output_width, output_height,
NULL);
}

Expand Down

0 comments on commit 596490a

Please sign in to comment.