summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/ldverify.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-01-02 04:59:11 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-01-02 04:59:11 +0000
commit80cd316a2ad134c67ca028a606266bb733a025b6 (patch)
treee198baaf50207b99fd46fb4696cdcda17e94ab65 /src/tools/ldverify.c
parent1ded844ee73ec0768de1b7ccba5491c92fd4ad5a (diff)
Bulk conversion of bitmap_t * to bitmap_t & . With this change the
parameters for the global SCREEN_UPDATE callback match the parameters for the driver_device version. Added allocate() and deallocate() methods to bitmap_t to permit cleaner handling of bitmaps in drivers and modern devices. [Aaron Giles]
Diffstat (limited to 'src/tools/ldverify.c')
-rw-r--r--src/tools/ldverify.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tools/ldverify.c b/src/tools/ldverify.c
index b8161384bf9..63f7adc7b6a 100644
--- a/src/tools/ldverify.c
+++ b/src/tools/ldverify.c
@@ -159,7 +159,7 @@ static void *open_avi(const char *filename, movie_info *info)
read_avi - read a frame from an AVI file
-------------------------------------------------*/
-static int read_avi(void *file, int frame, bitmap_t *bitmap, INT16 *lsound, INT16 *rsound, int *samples)
+static int read_avi(void *file, int frame, bitmap_t &bitmap, INT16 *lsound, INT16 *rsound, int *samples)
{
const avi_movie_info *aviinfo = avi_get_movie_info((avi_file *)file);
UINT32 firstsample = ((UINT64)aviinfo->audio_samplerate * (UINT64)frame * (UINT64)aviinfo->video_sampletime + aviinfo->video_timescale - 1) / (UINT64)aviinfo->video_timescale;
@@ -258,7 +258,7 @@ static void *open_chd(const char *filename, movie_info *info)
read_chd - read a frame from a CHD file
-------------------------------------------------*/
-static int read_chd(void *file, int frame, bitmap_t *bitmap, INT16 *lsound, INT16 *rsound, int *samples)
+static int read_chd(void *file, int frame, bitmap_t &bitmap, INT16 *lsound, INT16 *rsound, int *samples)
{
av_codec_decompress_config avconfig = { 0 };
int interlace_factor = chdinterlaced ? 2 : 1;
@@ -272,7 +272,7 @@ static int read_chd(void *file, int frame, bitmap_t *bitmap, INT16 *lsound, INT1
for (fieldnum = 0; fieldnum < interlace_factor; fieldnum++)
{
/* make a fake bitmap for this field */
- avconfig.video = new(&fakebitmap) bitmap_t(&bitmap->pix16(fieldnum), bitmap->width(), bitmap->height() / interlace_factor, bitmap->rowpixels() * interlace_factor, bitmap->format());
+ avconfig.video = new(&fakebitmap) bitmap_t(&bitmap.pix16(fieldnum), bitmap.width(), bitmap.height() / interlace_factor, bitmap.rowpixels() * interlace_factor, bitmap.format());
/* configure the codec */
avconfig.maxsamples = 48000;
@@ -342,7 +342,7 @@ static void init_video(video_info *video)
verify_video - verify video frame
-------------------------------------------------*/
-static void verify_video(video_info *video, int frame, bitmap_t *bitmap)
+static void verify_video(video_info *video, int frame, bitmap_t &bitmap)
{
const int fields_per_frame = 2;
int fieldnum;
@@ -363,7 +363,7 @@ static void verify_video(video_info *video, int frame, bitmap_t *bitmap)
fprintf(stderr, "%6d.%d...\r", frame, fieldnum);
/* parse the VBI data */
- vbi_parse_all(&bitmap->pix16(fieldnum), bitmap->rowpixels() * 2, bitmap->width(), 8, &metadata);
+ vbi_parse_all(&bitmap.pix16(fieldnum), bitmap.rowpixels() * 2, bitmap.width(), 8, &metadata);
/* if we have data in both 17 and 18, it should match */
if (metadata.line17 != 0 && metadata.line18 != 0 && metadata.line17 != metadata.line18)
@@ -519,15 +519,15 @@ static void verify_video(video_info *video, int frame, bitmap_t *bitmap)
/* now examine the active video signal */
pixels = 0;
- for (y = 22*2 + fieldnum; y < bitmap->height(); y += 2)
+ for (y = 22*2 + fieldnum; y < bitmap.height(); y += 2)
{
for (x = 16; x < 720 - 16; x++)
{
- yhisto[bitmap->pix16(y, x) >> 8]++;
+ yhisto[bitmap.pix16(y, x) >> 8]++;
if (x % 2 == 0)
- cbhisto[bitmap->pix16(y, x) & 0xff]++;
+ cbhisto[bitmap.pix16(y, x) & 0xff]++;
else
- crhisto[bitmap->pix16(y, x) & 0xff]++;
+ crhisto[bitmap.pix16(y, x) & 0xff]++;
}
pixels += 720 - 16 - 16;
}
@@ -613,9 +613,9 @@ static void verify_video(video_info *video, int frame, bitmap_t *bitmap)
verify_video_final - final verification
-------------------------------------------------*/
-static void verify_video_final(video_info *video, int frame, bitmap_t *bitmap)
+static void verify_video_final(video_info *video, int frame, bitmap_t &bitmap)
{
- int fields_per_frame = (bitmap->height() >= 288) ? 2 : 1;
+ int fields_per_frame = (bitmap.height() >= 288) ? 2 : 1;
int field = frame * fields_per_frame;
/* did we ever see any white flags? */