History

av1: do not apply grain, update decoding time

Sigrid Solveig Haflínudóttir committed 56 years ago

Commit 82829c51 parent 5cc548d1 file · +15 −10Browse files

Unified · Split

decoder_av1.c+15−10
@@ -62,7 +62,6 @@ decode(void *x) · 61 unmodified lines
62 62
63 start = nanosec();63 start = nanosec();
64 res = dav1d_get_picture(a->c, &pic);64 res = dav1d_get_picture(a->c, &pic);
65 d->decodetime = nanosec() - start;
66 if(res < 0){65 if(res < 0){
67 if(res != DAV1D_ERR(EAGAIN)){66 if(res != DAV1D_ERR(EAGAIN)){
68 werrstr("dav1d_get_picture: %d", res);67 werrstr("dav1d_get_picture: %d", res);
@@ -80,15 +79,18 @@ decode(void *x) · 11 unmodified lines
80 werrstr("unsupported bits per component: %d", pic.p.bpc);79 werrstr("unsupported bits per component: %d", pic.p.bpc);
81 res = -1;80 res = -1;
82 break;81 break;
83 }else if((f = newframe(pic.p.w, pic.p.h, pic.data, pic.stride[0], pic.stride[1])) != nil){82 }else{
84 memset(&f->crop, 0, sizeof(f->crop));83 if((f = newframe(pic.p.w, pic.p.h, pic.data, pic.stride[0], pic.stride[1])) != nil){
85 f->dt = (pic.m.timestamp - lasttimestamp) * d->timebase * 1000000000ULL;84 memset(&f->crop, 0, sizeof(f->crop));
86 lasttimestamp = pic.m.timestamp;85 f->dt = (pic.m.timestamp - lasttimestamp) * d->timebase * 1000000000ULL;
87 dav1d_picture_unref(&pic);86 lasttimestamp = pic.m.timestamp;
88 87
89 if(sendp(d->frames, f) < 0){88 if(sendp(d->frames, f) < 0){
90 free(f);89 dav1d_picture_unref(&pic);
91 break;90 free(f);
91 break;
92 }
93 dav1d_picture_unref(&pic);
92 }94 }
93 }95 }
94 96
@@ -98,6 +100,8 @@ decode(void *x) · 3 unmodified lines
98 werrstr("dav1d_send_data: %d", res);100 werrstr("dav1d_send_data: %d", res);
99 break;101 break;
100 }102 }
103 }else{
104 d->decodetime = nanosec() - start;
101 }105 }
102 }106 }
103 if(res != 0)107 if(res != 0)
@@ -131,6 +135,7 @@ av1open(Decoder *d) · 27 unmodified lines
131 dav1d_default_settings(&av1s);135 dav1d_default_settings(&av1s);
132 av1s.n_frame_threads = nproc;136 av1s.n_frame_threads = nproc;
133 av1s.n_tile_threads = nproc;137 av1s.n_tile_threads = nproc;
138 av1s.apply_grain = 0;
134 139
135 if((res = dav1d_open(&a->c, &av1s)) != 0){140 if((res = dav1d_open(&a->c, &av1s)) != 0){
136 werrstr("dav1d_open: %d", res);141 werrstr("dav1d_open: %d", res);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t